mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 09:51:36 +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/'));
|
.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) {
|
gulp.task('js-cachebust', function(cb) {
|
||||||
return Promise.resolve(
|
return Promise.resolve(
|
||||||
exec('git log', function (err, stdout, stderr) {
|
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('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('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.task('bundle-dev',
|
||||||
gulp.series(
|
gulp.series(
|
||||||
@ -156,7 +164,8 @@ gulp.task('bundle-prod',
|
|||||||
gulp.series(
|
gulp.series(
|
||||||
gulp.parallel(
|
gulp.parallel(
|
||||||
'css-bundle',
|
'css-bundle',
|
||||||
'js-bundle-prod'
|
'js-bundle-prod',
|
||||||
|
'tile-js-bundle-prod',
|
||||||
),
|
),
|
||||||
'urbit-copy'
|
'urbit-copy'
|
||||||
)
|
)
|
||||||
|
@ -104,6 +104,12 @@ gulp.task('js-minify', function () {
|
|||||||
.pipe(gulp.dest('./urbit/app/clock/js/'));
|
.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 () {
|
gulp.task('urbit-copy', function () {
|
||||||
let ret = gulp.src('urbit/**/*');
|
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-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('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||||
gulp.task('watch', gulp.series('default', function() {
|
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-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.task('bundle-dev',
|
||||||
gulp.series(
|
gulp.series(
|
||||||
|
@ -115,6 +115,12 @@ gulp.task('js-minify', function () {
|
|||||||
.pipe(gulp.dest('./urbit/app/write/js/'));
|
.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) {
|
gulp.task('js-cachebust', function(cb) {
|
||||||
return Promise.resolve(
|
return Promise.resolve(
|
||||||
exec('git log', function (err, stdout, stderr) {
|
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('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('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.task('bundle-dev',
|
||||||
gulp.series(
|
gulp.series(
|
||||||
@ -156,7 +164,8 @@ gulp.task('bundle-prod',
|
|||||||
gulp.series(
|
gulp.series(
|
||||||
gulp.parallel(
|
gulp.parallel(
|
||||||
'css-bundle',
|
'css-bundle',
|
||||||
'js-bundle-prod'
|
'js-bundle-prod',
|
||||||
|
'tile-js-bundle-prod',
|
||||||
),
|
),
|
||||||
'urbit-copy'
|
'urbit-copy'
|
||||||
)
|
)
|
||||||
|
@ -104,6 +104,12 @@ gulp.task('js-minify', function () {
|
|||||||
.pipe(gulp.dest('./urbit/app/timer/js/'));
|
.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 () {
|
gulp.task('urbit-copy', function () {
|
||||||
let ret = gulp.src('urbit/**/*');
|
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-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('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||||
gulp.task('watch', gulp.series('default', function() {
|
gulp.task('watch', gulp.series('default', function() {
|
||||||
|
@ -104,6 +104,12 @@ gulp.task('js-minify', function () {
|
|||||||
.pipe(gulp.dest('./urbit/app/weather/js/'));
|
.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 () {
|
gulp.task('urbit-copy', function () {
|
||||||
let ret = gulp.src('urbit/**/*');
|
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-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('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||||
gulp.task('watch', gulp.series('default', function() {
|
gulp.task('watch', gulp.series('default', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user