提交 f4608731 编写于 作者: T Tieu-Philippe KHIM

remove gulp stuff

上级 1eee8985
var gulp = require('gulp');
var concat = require('gulp-concat');
var mainBowerFiles = require('main-bower-files');
var ngAnnotate = require('gulp-ng-annotate');
var templateCache = require('gulp-angular-templatecache');
var del = require('del');
var rename = require('gulp-rename');
gulp.task('clean', function() {
del('./public/*')
});
gulp.task('copy', function() {
gulp.src('./html/*.html')
.pipe(gulp.dest('./public'));
gulp.src('./css/*.css')
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./public/css'));
gulp.src('./images/*.png')
.pipe(gulp.dest('./public/images'));
gulp.src('./images/favicon.ico')
.pipe(gulp.dest('./public'));
});
gulp.task('bower', function() {
return gulp.src(mainBowerFiles())
.pipe(concat('vendor.js'))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./public/js'))
});
gulp.task('build-js', function() {
return gulp.src('./js/**/*.js')
.pipe(ngAnnotate())
.pipe(concat('main.js'))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./public/js'))
});
gulp.task('template', function () {
return gulp.src('./js/components/**/*.html')
.pipe(templateCache('templates.js', {'root': 'components/', 'module': 'glancesApp'}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./public/js'));
});
gulp.task('watch', function () {
gulp.watch(['./html/*.html','./css/*.css', './images/*.png'], ['copy']);
gulp.watch('bower.json', ['bower']);
gulp.watch('./js/**/*.js', ['build-js']);
gulp.watch('./html/plugins/*.html', ['template']);
});
gulp.task('build', ['clean', 'bower', 'build-js', 'template', 'copy']);
gulp.task('default', ['build']);
......@@ -14,11 +14,6 @@
"del": "^2.2.1",
"exports-loader": "^0.7.0",
"file-loader": "^1.1.6",
"gulp": "^3.9.1",
"gulp-angular-templatecache": "^2.0.0",
"gulp-concat": "^2.6.0",
"gulp-ng-annotate": "^2.0.0",
"gulp-rename": "^1.2.2",
"html-loader": "^0.5.5",
"ngtemplate-loader": "^2.0.1",
"style-loader": "^0.20.1",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册