summaryrefslogtreecommitdiffstats
path: root/afb-client/bower_components/angular-ui-notification/gulpfile.js
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2016-02-09 18:40:49 +0100
committerFulup Ar Foll <fulup@iot.bzh>2016-02-09 18:40:49 +0100
commit3d2fda7dd39e2363682f1fa353c951ab0d44ddfa (patch)
treeaf968a8ac5d4fde1f3cebcec5fb0973eb2bfb2cb /afb-client/bower_components/angular-ui-notification/gulpfile.js
parent12a3520ba440316c76b95d92a684666f03f7b47d (diff)
Implemented URL query parsing for initial token /opa/?token=abcde
Diffstat (limited to 'afb-client/bower_components/angular-ui-notification/gulpfile.js')
-rw-r--r--afb-client/bower_components/angular-ui-notification/gulpfile.js92
1 files changed, 92 insertions, 0 deletions
diff --git a/afb-client/bower_components/angular-ui-notification/gulpfile.js b/afb-client/bower_components/angular-ui-notification/gulpfile.js
new file mode 100644
index 0000000..f7c7d59
--- /dev/null
+++ b/afb-client/bower_components/angular-ui-notification/gulpfile.js
@@ -0,0 +1,92 @@
+var gulp = require('gulp');
+var less = require('gulp-less');
+var minifyCSS = require('gulp-minify-css');
+var csscomb = require('gulp-csscomb');
+var ngAnnotate = require('gulp-ng-annotate');
+var uglify = require('gulp-uglify');
+var jshint = require('gulp-jshint');
+var rename = require('gulp-rename');
+var header = require('gulp-header');
+var templateCache = require('gulp-angular-templatecache');
+var minifyHtml = require("gulp-minify-html");
+var concat = require('gulp-concat');
+var addsrc = require('gulp-add-src');
+var order = require("gulp-order");
+var protractor = require("gulp-protractor").protractor;
+
+var pkg = require('./package.json');
+var banner = ['/**',
+ ' * <%= pkg.name %> - <%= pkg.description %>',
+ ' * @author <%= pkg.author %>',
+ ' * @version v<%= pkg.version %>',
+ ' * @link <%= pkg.homepage %>',
+ ' * @license <%= pkg.license %>',
+ ' */',
+ ''].join('\n');
+
+ // ==== Styles
+gulp.task('styles', function() {
+ gulp.src('src/angular-ui-notification.less')
+ .pipe(less({
+ strictMath: true
+ }))
+ .pipe(csscomb())
+ .pipe(minifyCSS())
+ .pipe(rename({
+ suffix: '.min'
+ }))
+ .pipe(header(banner, { pkg : pkg }))
+ .pipe(gulp.dest('dist'))
+ .pipe(gulp.dest('demo'));
+});
+
+// ====== Templates
+gulp.task('templates', function() {
+ gulp.src(['*.html'], {cwd: 'src'})
+ .pipe(minifyHtml({
+ empty: true,
+ spare: true,
+ quotes: true
+ }))
+ .pipe(templateCache({
+ module: 'ui-notification',
+ }))
+ .pipe(rename('angular-ui-notification.templates.js'))
+ .pipe(gulp.dest("build"));
+});
+
+gulp.task('service', function() {
+ gulp.src(['src/*.js'])
+ .pipe(jshint())
+ .pipe(jshint.reporter('default'))
+ .pipe(jshint.reporter('fail'))
+ .pipe(ngAnnotate())
+ .pipe(addsrc('build/*.js'))
+ .pipe(order([
+ 'src/*.js',
+ 'build/angular-ui-notification.templates.js'
+ ]))
+ .pipe(concat('angular-ui-notification.js'))
+ .pipe(uglify())
+ .pipe(rename({
+ suffix: '.min'
+ }))
+ .pipe(header(banner, { pkg : pkg }))
+ .pipe(gulp.dest('dist'))
+ .pipe(gulp.dest('demo'));
+});
+
+// ======
+gulp.task('e2eTest', function() {
+ gulp.src(['./test/**/*_spec.js'])
+ .pipe(protractor({
+ configFile: "protractor_conf.js",
+ }))
+ .on('error', function(e) {throw e});
+});
+
+gulp.task('tests', ['e2eTest']);
+gulp.task('build', ['templates', 'service', 'styles']);
+gulp.task('deploy', ['build', 'tests']);
+
+gulp.task('default', ['deploy'], function() {}); \ No newline at end of file