Use coffeescript again for Gulp
This commit is contained in:
parent
7feff15497
commit
1000b6d78f
16 changed files with 79 additions and 104 deletions
1
gulp/build.coffee
Normal file
1
gulp/build.coffee
Normal file
|
@ -0,0 +1 @@
|
|||
gulp.task 'build', ['clean', 'styles', 'scripts', 'fonts']
|
|
@ -1 +0,0 @@
|
|||
gulp.task('build', ['clean', 'styles', 'scripts', 'fonts']);
|
7
gulp/clean.coffee
Normal file
7
gulp/clean.coffee
Normal file
|
@ -0,0 +1,7 @@
|
|||
del = require 'del'
|
||||
|
||||
gulp.task 'clean', ->
|
||||
del.sync config.fonts.outputDir
|
||||
del.sync config.js.outputDir
|
||||
del.sync config.sass.outputDir
|
||||
del.sync 'output_*/assets/{css,fonts,js}'
|
|
@ -1,8 +0,0 @@
|
|||
var del = require('del');
|
||||
|
||||
gulp.task('clean', function () {
|
||||
del.sync(config.fonts.outputDir);
|
||||
del.sync(config.js.outputDir);
|
||||
del.sync(config.sass.outputDir);
|
||||
del.sync('output_*/assets/{css,fonts,js}');
|
||||
});
|
1
gulp/default.coffee
Normal file
1
gulp/default.coffee
Normal file
|
@ -0,0 +1 @@
|
|||
gulp.task 'default', ['build', 'watch']
|
|
@ -1 +0,0 @@
|
|||
gulp.task('default', ['build', 'watch']);
|
2
gulp/fonts.coffee
Normal file
2
gulp/fonts.coffee
Normal file
|
@ -0,0 +1,2 @@
|
|||
gulp.task 'fonts', ->
|
||||
app.copy [config.bowerDir + '/font-awesome/fonts/*'], config.fonts.outputDir
|
|
@ -1,6 +0,0 @@
|
|||
gulp.task('fonts', function () {
|
||||
app.copy(
|
||||
config.bowerDir + '/font-awesome/fonts/*',
|
||||
config.fonts.outputDir
|
||||
);
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
gulp.task('minify-prod-html', function () {
|
||||
gulp.src('output_prod/**/*.html')
|
||||
.pipe(plugins.htmlmin(config.htmlmin))
|
||||
.pipe(gulp.dest('output_prod'));
|
||||
});
|
|
@ -1,7 +1,6 @@
|
|||
gulp.task('scripts', function () {
|
||||
app.js([
|
||||
gulp.task 'scripts', ->
|
||||
app.js [
|
||||
config.bowerDir + '/jquery/dist/jquery.js',
|
||||
config.bowerDir + '/bootstrap-sass/assets/javascripts/bootstrap.js',
|
||||
config.js.pattern
|
||||
], 'site.js');
|
||||
});
|
||||
config.js.sourceDir + config.js.pattern
|
||||
], 'site.js'
|
5
gulp/styles.coffee
Normal file
5
gulp/styles.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
gulp.task 'styles', ->
|
||||
app.sass [
|
||||
config.bowerDir + '/font-awesome/css/font-awesome.css',
|
||||
config.sass.sourceDir + config.sass.pattern
|
||||
], 'site.css'
|
|
@ -1,6 +0,0 @@
|
|||
gulp.task('styles', function () {
|
||||
app.sass([
|
||||
config.bowerDir + '/font-awesome/css/font-awesome.css',
|
||||
config.sass.sourceDir + '/site.sass'
|
||||
], 'site.css');
|
||||
});
|
5
gulp/watch.coffee
Normal file
5
gulp/watch.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
gulp.task 'watch', ->
|
||||
plugins.refresh.listen()
|
||||
|
||||
gulp.watch config.sass.sourceDir + config.sass.pattern, ['styles']
|
||||
gulp.watch config.js.sourceDir + config.sass.pattern, ['scripts']
|
|
@ -1,8 +0,0 @@
|
|||
gulp.task('watch', function () {
|
||||
plugins.refresh.listen();
|
||||
|
||||
gulp.watch(config.sass.sourceDir + config.sass.pattern, ['styles']);
|
||||
gulp.watch(config.sass.sourceDir + config.scss.pattern, ['styles']);
|
||||
|
||||
gulp.watch(config.js.sourceDir + config.js.pattern, ['scripts']);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue