Select Git revision
duniter.iss
-
Cédric Moreau authoredCédric Moreau authored
gulpfile.js 17.30 KiB
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
cleanCss = require('gulp-clean-css'),
base64 = require('gulp-base64'),
rename = require('gulp-rename'),
ngConstant = require('gulp-ng-constant'),
fs = require("fs"),
argv = require('yargs').argv,
header = require('gulp-header'),
footer = require('gulp-footer'),
removeCode = require('gulp-remove-code'),
removeHtml = require('gulp-html-remove'),
templateCache = require('gulp-angular-templatecache'),
ngTranslate = require('gulp-angular-translate'),
ngAnnotate = require('gulp-ng-annotate'),
es = require('event-stream'),
zip = require('gulp-zip'),
del = require('del'),
useref = require('gulp-useref'),
filter = require('gulp-filter'),
uglify = require('gulp-uglify'),
csso = require('gulp-csso'),
replace = require('gulp-replace'),
rev = require('gulp-rev'),
revReplace = require('gulp-rev-replace'),
clean = require('gulp-clean'),
htmlmin = require('gulp-htmlmin'),
jshint = require('gulp-jshint'),
markdown = require('gulp-markdown'),
sourcemaps = require('gulp-sourcemaps');
var paths = {
sass: ['./scss/**/*.scss'],
config: ['./app/config.json'],
templatecache: ['./www/templates/**/*.html'],
ng_translate: ['./www/i18n/locale-*.json'],
ng_annotate: ['./www/js/**/*.js', '!./www/js/vendor/*.js'],
// plugins:
templatecache_plugin: ['./www/plugins/*/templates/**/*.html'],
ng_translate_plugin: ['./www/plugins/*/i18n/locale-*.json'],
ng_annotate_plugin: ['./www/plugins/*/**/*.js', '!./www/plugins/*/js/vendor/*.js'],
css_plugin: ['./www/plugins/*/css/**/*.css'],
license_md: ['./www/license/*.md']
};
gulp.task('serve:before', [
'sass',
'templatecache',
'ng_annotate',
'ng_translate',
'templatecache_plugin',
'ng_annotate_plugin',
'ng_translate_plugin',
'css_plugin',
'license_md']);
gulp.task('watch', function() {
gulp.watch(paths.sass, ['sass']);
gulp.watch(paths.templatecache, ['templatecache']);
gulp.watch(paths.ng_annotate, ['ng_annotate']);
gulp.watch(paths.ng_translate, ['ng_translate']);
// plugins:
gulp.watch(paths.templatecache_plugin, ['templatecache_plugin']);
gulp.watch(paths.ng_annotate_plugin, ['ng_annotate_plugin']);
gulp.watch(paths.ng_translate_plugin, ['ng_translate_plugin']);
gulp.watch(paths.css_plugin, ['css_plugin']);
gulp.watch(paths.license_md, ['license_md']);
});