Beautified gulpfile
This commit is contained in:
parent
7dd5cfd9d1
commit
cad6848182
1 changed files with 26 additions and 27 deletions
53
gulpfile.js
53
gulpfile.js
|
@ -12,38 +12,37 @@ var livereload = require('gulp-livereload');
|
||||||
var yargs = require('yargs').argv;
|
var yargs = require('yargs').argv;
|
||||||
var minify = require('gulp-minify');
|
var minify = require('gulp-minify');
|
||||||
|
|
||||||
gulp.task('sass', function () {
|
gulp.task('sass', function() {
|
||||||
var sassStream = gulp.src('./assets/static/sass/style.scss')
|
var sassStream = gulp.src('./assets/static/sass/style.sass')
|
||||||
.pipe(sass().on('error', sass.logError))
|
.pipe(sass().on('error', sass.logError));
|
||||||
var bowerStream = gulp.src([
|
var bowerStream = gulp.src([]);
|
||||||
])
|
|
||||||
|
|
||||||
return merge(bowerStream, sassStream)
|
return merge(bowerStream, sassStream)
|
||||||
.pipe(concatCss("style.css"))
|
.pipe(concatCss("style.css"))
|
||||||
.pipe(minifyCss())
|
.pipe(minifyCss())
|
||||||
.pipe(gulp.dest('./assets/static/css'))
|
.pipe(gulp.dest('./assets/static/css'))
|
||||||
.pipe(livereload());
|
.pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('js', function () {
|
gulp.task('js', function() {
|
||||||
var jsStream = gulp.src([
|
var jsStream = gulp.src([
|
||||||
'./assets/static/js/main.js'
|
'./assets/static/js/main.js'
|
||||||
]);
|
]);
|
||||||
return jsStream
|
return jsStream
|
||||||
.pipe(concatJs('app.js'))
|
.pipe(concatJs('app.js'))
|
||||||
.pipe(minify({
|
.pipe(minify({
|
||||||
exclude: [],
|
exclude: [],
|
||||||
ignoreFiles: []
|
ignoreFiles: []
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('./assets/static/js'))
|
.pipe(gulp.dest('./assets/static/js'))
|
||||||
})
|
})
|
||||||
|
|
||||||
gulp.task('livereload', function () {
|
gulp.task('livereload', function() {
|
||||||
return gulp.src('./templates/**/*.html').pipe(livereload());
|
return gulp.src('./templates/**/*.html').pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('sass:watch', function () {
|
gulp.task('sass:watch', function() {
|
||||||
livereload.listen();
|
livereload.listen();
|
||||||
gulp.watch('./assets/static/sass/**/*', ['sass']);
|
gulp.watch('./assets/static/sass/**/*', ['sass']);
|
||||||
gulp.watch('./assets/static/templates/**/*.html', ['livereload']);
|
gulp.watch('./assets/static/templates/**/*.html', ['livereload']);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue