Select Git revision
controllers.js
-
Benoit Lavenier authored
[enh] Add connection fallback at startup - fix #476
Benoit Lavenier authored[enh] Add connection fallback at startup - fix #476
gulpfile.js 23.03 KiB
'use strict';
const gulp = require('gulp'),
sass = require('gulp-sass'),
cleanCss = require('gulp-clean-css'),
base64 = require('gulp-base64-v2'),
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-es').default,
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'),
log = require('fancy-log'),
colors = require('ansi-colors');
const paths = {
license_md: ['./www/license/*.md'],
sass: ['./scss/ionic.app.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:
leafletSass: ['./scss/leaflet.app.scss'],
css_plugin: ['./www/plugins/*/css/**/*.css'],
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']
};
function appAndPluginWatch(done) {
log(colors.green('Watching source files...'));
// Licenses
gulp.watch(paths.license_md, () => appLicense());
// App
gulp.watch(paths.sass, () => appSass());
gulp.watch(paths.templatecache, () => appNgTemplate());
gulp.watch(paths.ng_annotate, (event) => appNgAnnotate(event));
gulp.watch(paths.ng_translate, () => appNgTranslate());
// Plugins
gulp.watch(paths.templatecache_plugin, () => pluginNgTemplate());
gulp.watch(paths.ng_annotate_plugin, (event) => pluginNgAnnotate(event));
gulp.watch(paths.ng_translate_plugin, () => pluginNgTranslate());
gulp.watch(paths.css_plugin.concat(paths.leafletSass), () => pluginSass());
done();