mirror of https://github.com/rancher/api-ui.git
Added PR feedback
This commit is contained in:
parent
c21d0c8a6b
commit
1f76ae125a
19
gulpfile.js
19
gulpfile.js
|
|
@ -102,15 +102,16 @@ gulp.task('bootstrap', function() {
|
|||
.pipe(gulp.dest(VERSION_DIST));
|
||||
});
|
||||
|
||||
gulp.task('livereload', function() {
|
||||
gulp.watch('./gulpfile.js', ['server:reload']);
|
||||
gulp.watch('styles/**', ['css']);
|
||||
gulp.watch('src/**', ['js']);
|
||||
gulp.watch('templates/**', ['js']);
|
||||
gulp.watch('partials/**', ['js']);
|
||||
gulp.task('livereload', function(cb) {
|
||||
gulp.watch('./gulpfile.js', gulp.series('server:reload'));
|
||||
gulp.watch('styles/**', gulp.series('css'));
|
||||
gulp.watch('src/**', gulp.series('js'));
|
||||
gulp.watch('templates/**', gulp.series('js'));
|
||||
gulp.watch('partials/**', gulp.series('js'));
|
||||
cb();
|
||||
})
|
||||
|
||||
gulp.task('src', gulp.series('js','minjs','css','mincss','bootstrap'));
|
||||
gulp.task('src', gulp.series('minjs','mincss','bootstrap'));
|
||||
|
||||
gulp.task('tarball', gulp.series('src', function() {
|
||||
return gulp.src([VERSION_DIST+'/**'], {base: DIST})
|
||||
|
|
@ -119,10 +120,10 @@ gulp.task('tarball', gulp.series('src', function() {
|
|||
.pipe(gulp.dest(DIST));
|
||||
}));
|
||||
|
||||
gulp.task('build', gulp.series('src', 'tarball'), () => {});
|
||||
gulp.task('build', gulp.series('tarball'), () => {});
|
||||
gulp.task('default', gulp.series('build'));
|
||||
|
||||
gulp.task('server', gulp.series('build','livereload', function() {
|
||||
gulp.task('server', gulp.series('build', 'livereload', function() {
|
||||
var cors = function(req, res, next) {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
next();
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/rancherio/api-ui.git"
|
||||
},
|
||||
"engine": {
|
||||
"node": ">= 14.14"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "./node_modules/.bin/gulp server",
|
||||
"clean": "./node_modules/.bin/gulp clean",
|
||||
|
|
|
|||
Loading…
Reference in New Issue