mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
updated gulpfiles to add minification for all js output
This commit is contained in:
parent
c7b7f7eaf6
commit
54f629c268
@ -115,6 +115,12 @@ gulp.task('js-minify', function () {
|
||||
.pipe(gulp.dest('./urbit/app/chat/js/'));
|
||||
});
|
||||
|
||||
gulp.task('tile-js-minify', function () {
|
||||
return gulp.src('./urbit/app/chat/js/tile.js')
|
||||
.pipe(minify())
|
||||
.pipe(gulp.dest('./urbit/app/chat/js/'));
|
||||
});
|
||||
|
||||
gulp.task('js-cachebust', function(cb) {
|
||||
return Promise.resolve(
|
||||
exec('git log', function (err, stdout, stderr) {
|
||||
@ -139,7 +145,9 @@ gulp.task('urbit-copy', function () {
|
||||
|
||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify', 'js-cachebust'))
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-dev',
|
||||
gulp.series(
|
||||
@ -156,7 +164,8 @@ gulp.task('bundle-prod',
|
||||
gulp.series(
|
||||
gulp.parallel(
|
||||
'css-bundle',
|
||||
'js-bundle-prod'
|
||||
'js-bundle-prod',
|
||||
'tile-js-bundle-prod',
|
||||
),
|
||||
'urbit-copy'
|
||||
)
|
||||
|
@ -104,6 +104,12 @@ gulp.task('js-minify', function () {
|
||||
.pipe(gulp.dest('./urbit/app/clock/js/'));
|
||||
});
|
||||
|
||||
gulp.task('tile-js-minify', function () {
|
||||
return gulp.src('./urbit/app/clock/js/tile.js')
|
||||
.pipe(minify())
|
||||
.pipe(gulp.dest('./urbit/app/clock/js/'));
|
||||
});
|
||||
|
||||
gulp.task('urbit-copy', function () {
|
||||
let ret = gulp.src('urbit/**/*');
|
||||
|
||||
@ -115,6 +121,10 @@ gulp.task('urbit-copy', function () {
|
||||
});
|
||||
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-prod', gulp.series('tile-js-bundle-prod', 'urbit-copy'));
|
||||
|
||||
gulp.task('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||
gulp.task('watch', gulp.series('default', function() {
|
||||
|
@ -101,7 +101,7 @@ gulp.task('urbit-copy', function () {
|
||||
});
|
||||
|
||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify', 'js-cachebust'))
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||
|
||||
gulp.task('bundle-dev',
|
||||
gulp.series(
|
||||
|
@ -115,6 +115,12 @@ gulp.task('js-minify', function () {
|
||||
.pipe(gulp.dest('./urbit/app/write/js/'));
|
||||
});
|
||||
|
||||
gulp.task('tile-js-minify', function () {
|
||||
return gulp.src('./urbit/app/write/js/tile.js')
|
||||
.pipe(minify())
|
||||
.pipe(gulp.dest('./urbit/app/write/js/'));
|
||||
});
|
||||
|
||||
gulp.task('js-cachebust', function(cb) {
|
||||
return Promise.resolve(
|
||||
exec('git log', function (err, stdout, stderr) {
|
||||
@ -139,7 +145,9 @@ gulp.task('urbit-copy', function () {
|
||||
|
||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify', 'js-cachebust'))
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-dev',
|
||||
gulp.series(
|
||||
@ -156,7 +164,8 @@ gulp.task('bundle-prod',
|
||||
gulp.series(
|
||||
gulp.parallel(
|
||||
'css-bundle',
|
||||
'js-bundle-prod'
|
||||
'js-bundle-prod',
|
||||
'tile-js-bundle-prod',
|
||||
),
|
||||
'urbit-copy'
|
||||
)
|
||||
|
@ -104,6 +104,12 @@ gulp.task('js-minify', function () {
|
||||
.pipe(gulp.dest('./urbit/app/timer/js/'));
|
||||
});
|
||||
|
||||
gulp.task('tile-js-minify', function () {
|
||||
return gulp.src('./urbit/app/timer/js/tile.js')
|
||||
.pipe(minify())
|
||||
.pipe(gulp.dest('./urbit/app/timer/js/'));
|
||||
});
|
||||
|
||||
gulp.task('urbit-copy', function () {
|
||||
let ret = gulp.src('urbit/**/*');
|
||||
|
||||
@ -115,6 +121,10 @@ gulp.task('urbit-copy', function () {
|
||||
});
|
||||
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-prod', gulp.series('tile-js-bundle-prod', 'urbit-copy'));
|
||||
|
||||
gulp.task('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||
gulp.task('watch', gulp.series('default', function() {
|
||||
|
@ -104,6 +104,12 @@ gulp.task('js-minify', function () {
|
||||
.pipe(gulp.dest('./urbit/app/weather/js/'));
|
||||
});
|
||||
|
||||
gulp.task('tile-js-minify', function () {
|
||||
return gulp.src('./urbit/app/weather/js/tile.js')
|
||||
.pipe(minify())
|
||||
.pipe(gulp.dest('./urbit/app/weather/js/'));
|
||||
});
|
||||
|
||||
gulp.task('urbit-copy', function () {
|
||||
let ret = gulp.src('urbit/**/*');
|
||||
|
||||
@ -115,6 +121,10 @@ gulp.task('urbit-copy', function () {
|
||||
});
|
||||
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-prod', gulp.series('tile-js-bundle-prod', 'urbit-copy'));
|
||||
|
||||
gulp.task('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||
gulp.task('watch', gulp.series('default', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user