forked from ivnivnch/foundation-apps-modal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
31 lines (27 loc) · 971 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
require('gulp-release-easy')(gulp);
gulp.task('server', ['build'], function () {
return gulp.src(['demo', 'node_modules', 'dist',
'node_modules/foundation-apps/js/angular/' // include url to modal template html
])
.pipe($.webserver({
port: 8080,
livereload: true,
open: true
}));
});
gulp.task('build', function () {
gulp.src(['src/**/*.js'])
.pipe($.angularFilesort())
.pipe($.concat('foundation-apps-modal.js'))
.pipe($.wrap('\'use strict\';\n\n<%= contents %>\n\n'))
.pipe(gulp.dest('dist'));
return gulp.src(['dist/foundation-apps-modal.js'])
.pipe($.rename('foundation-apps-modal.standalone.js'))
.pipe($.replace('[\'foundation\']', '[]'))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['server'], function () {
gulp.watch('src/**/*.js', ['build']);
});