mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Gulp Upgrade
This commit is contained in:
parent
d61d5ce0f7
commit
d7e7ba30ba
2 changed files with 51 additions and 50 deletions
|
@ -6,6 +6,7 @@ var concat = require('gulp-concat'),
|
||||||
uglify = require('gulp-uglify'),
|
uglify = require('gulp-uglify'),
|
||||||
csslint = require('gulp-csslint'),
|
csslint = require('gulp-csslint'),
|
||||||
jshint = require('gulp-jshint'),
|
jshint = require('gulp-jshint'),
|
||||||
|
mustache = require('gulp-mustache'),
|
||||||
less = require('gulp-less'),
|
less = require('gulp-less'),
|
||||||
autoprefixer = require('gulp-autoprefixer'),
|
autoprefixer = require('gulp-autoprefixer'),
|
||||||
cssmin = require('gulp-cssmin'),
|
cssmin = require('gulp-cssmin'),
|
||||||
|
@ -19,35 +20,18 @@ var concat = require('gulp-concat'),
|
||||||
isDev = (util.env.dev) ? true : false;
|
isDev = (util.env.dev) ? true : false;
|
||||||
isProduction = !isDev;
|
isProduction = !isDev;
|
||||||
|
|
||||||
// Global build task
|
|
||||||
gulp.task('build', [
|
|
||||||
'css',
|
|
||||||
'fonts',
|
|
||||||
'js',
|
|
||||||
'img',
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
// Watch task
|
|
||||||
gulp.task('watch', function(){
|
|
||||||
gulp.watch('js/**/*.js', ['js']);
|
|
||||||
gulp.watch('css/*.less', ['css']);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// JS task
|
// JS task
|
||||||
gulp.task('js', function() {
|
gulp.task('js', function() {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'bower_components/jquery/dist/jquery.js',
|
'node_modules/jquery/dist/jquery.js',
|
||||||
'bower_components/js-cookie/src/js.cookie.js',
|
'node_modules/handlebars/dist/handlebars.js',
|
||||||
'bower_components/handlebars/handlebars.js',
|
'node_modules/handlebars-intl/dist/handlebars-intl-with-locales.js',
|
||||||
'bower_components/handlebars-helper-intl/dist/handlebars-intl-with-locales.js',
|
'node_modules/sammy/lib/sammy.js',
|
||||||
'bower_components/sammy/lib/sammy.js',
|
'node_modules/sammy/lib/plugins/sammy.handlebars.js',
|
||||||
'bower_components/sammy/lib/plugins/sammy.handlebars.js',
|
'node_modules/sammy/lib/plugins/sammy.json.js',
|
||||||
'bower_components/sammy/lib/plugins/sammy.json.js',
|
'node_modules/sammy/lib/plugins/sammy.storage.js',
|
||||||
'bower_components/sammy/lib/plugins/sammy.storage.js',
|
'node_modules/bootstrap/dist/js/bootstrap.js',
|
||||||
'bower_components/bootstrap/dist/js/bootstrap.js',
|
'node_modules/isotope-layout/dist/isotope.pkgd.js',
|
||||||
'bower_components/isotope-layout/dist/isotope.pkgd.js',
|
|
||||||
'js/yunohost/y18n.js',
|
'js/yunohost/y18n.js',
|
||||||
'js/yunohost/main.js',
|
'js/yunohost/main.js',
|
||||||
'js/yunohost/helpers.js',
|
'js/yunohost/helpers.js',
|
||||||
|
@ -71,17 +55,17 @@ gulp.task('js-lint', function() {
|
||||||
// Fonts
|
// Fonts
|
||||||
gulp.task('fonts', function() {
|
gulp.task('fonts', function() {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'bower_components/fork-awesome/fonts/*',
|
'node_modules/fork-awesome/fonts/*',
|
||||||
'bower_components/source-code-pro/EOT/*.eot',
|
'node_modules/source-code-pro/EOT/*.eot',
|
||||||
'bower_components/source-code-pro/OTF/*.otf',
|
'node_modules/source-code-pro/OTF/*.otf',
|
||||||
'bower_components/source-code-pro/TTF/*.ttf',
|
'node_modules/source-code-pro/TTF/*.ttf',
|
||||||
'bower_components/source-code-pro/WOFF/OTF/*.woff',
|
'node_modules/source-code-pro/WOFF/OTF/*.woff',
|
||||||
'bower_components/source-code-pro/WOFF2/TTF/*.woff2',
|
'node_modules/source-code-pro/WOFF2/TTF/*.woff2',
|
||||||
'bower_components/source-sans-pro/EOT/*.eot',
|
'node_modules/source-sans-pro/EOT/*.eot',
|
||||||
'bower_components/source-sans-pro/OTF/*.otf',
|
'node_modules/source-sans-pro/OTF/*.otf',
|
||||||
'bower_components/source-sans-pro/TTF/*.ttf',
|
'node_modules/source-sans-pro/TTF/*.ttf',
|
||||||
'bower_components/source-sans-pro/WOFF/OTF/*.woff',
|
'node_modules/source-sans-pro/WOFF/OTF/*.woff',
|
||||||
'bower_components/source-sans-pro/WOFF2/TTF/*.woff2',
|
'node_modules/source-sans-pro/WOFF2/TTF/*.woff2',
|
||||||
])
|
])
|
||||||
.pipe(gulp.dest('./dist/fonts'))
|
.pipe(gulp.dest('./dist/fonts'))
|
||||||
});
|
});
|
||||||
|
@ -116,3 +100,20 @@ gulp.task('img', function () {
|
||||||
.pipe(gulpif(isProduction, imagemin()))
|
.pipe(gulpif(isProduction, imagemin()))
|
||||||
.pipe(gulp.dest('./dist/img'))
|
.pipe(gulp.dest('./dist/img'))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Views task
|
||||||
|
gulp.task('views', function () {
|
||||||
|
return gulp.src('views/**/*.ms')
|
||||||
|
.pipe(gulp.dest("./dist/views"));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Global build task
|
||||||
|
gulp.task('build', gulp.series('css', 'fonts', 'js', 'img', 'views'));
|
||||||
|
|
||||||
|
|
||||||
|
// Watch task
|
||||||
|
gulp.task('watch', function() {
|
||||||
|
gulp.watch('js/**/*.js', gulp.series('js'));
|
||||||
|
gulp.watch('css/*.less', gulp.series('css'));
|
||||||
|
gulp.watch('views/**/*.ms', gulp.series('views'));
|
||||||
|
});
|
|
@ -18,18 +18,18 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/YunoHost/yunohost-admin",
|
"homepage": "https://github.com/YunoHost/yunohost-admin",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bower": "^1.7.7",
|
"gulp": "^4.0.2",
|
||||||
"gulp": "^3.9.0",
|
"gulp-autoprefixer": "^7.0.1",
|
||||||
"gulp-autoprefixer": "^2.3.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-csslint": "^1.0.1",
|
||||||
"gulp-csslint": "^0.2.0",
|
"gulp-cssmin": "^0.2.0",
|
||||||
"gulp-cssmin": "^0.1.7",
|
"gulp-if": "^3.0.0",
|
||||||
"gulp-if": "^2.0.0",
|
"gulp-imagemin": "^7.1.0",
|
||||||
"gulp-imagemin": "^2.3.0",
|
"gulp-jshint": "^2.1.0",
|
||||||
"gulp-jshint": "^1.11.2",
|
"gulp-less": "^4.0.1",
|
||||||
"gulp-less": "^3.0.3",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-uglify": "^3.0.2",
|
||||||
"gulp-uglify": "^1.2.0",
|
"gulp-mustache": "^5.0.0"
|
||||||
"gulp-util": "^3.0.7"
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue