Use coffee script for gulp
This commit is contained in:
parent
534d3b11f4
commit
f012d89d72
11 changed files with 97 additions and 109 deletions
3
gulp/build.coffee
Normal file
3
gulp/build.coffee
Normal file
|
@ -0,0 +1,3 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'build', ['clean', 'styles', 'scripts', 'fonts', 'images']
|
6
gulp/clean.coffee
Normal file
6
gulp/clean.coffee
Normal file
|
@ -0,0 +1,6 @@
|
|||
gulp = require 'gulp'
|
||||
del = require 'del'
|
||||
|
||||
gulp.task 'clean', ->
|
||||
del.sync 'output_*/assets/{css,fonts,images,js}'
|
||||
del.sync gulp.config.outputDir + '/{css,fonts,images,js}'
|
3
gulp/default.coffee
Normal file
3
gulp/default.coffee
Normal file
|
@ -0,0 +1,3 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'default', ['build', 'watch']
|
5
gulp/fonts.coffee
Normal file
5
gulp/fonts.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'fonts', ->
|
||||
gulp.src gulp.config.bowerDir + '/font-awesome/fonts/*'
|
||||
.pipe gulp.dest gulp.config.outputDir + '/fonts'
|
11
gulp/images.coffee
Normal file
11
gulp/images.coffee
Normal file
|
@ -0,0 +1,11 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'images', -> gulp.start 'copy-images', 'meetup-thumbnails'
|
||||
|
||||
gulp.task 'meetup-thumbnails', ->
|
||||
gulp.src gulp.config.assetsDir + '/images/meetups/originals/*'
|
||||
.pipe gulp.plugins.imageResize height: '80'
|
||||
.pipe gulp.dest gulp.config.outputDir + '/images/meetups/thumbnails'
|
||||
|
||||
gulp.task 'copy-images', ->
|
||||
gulp.copy gulp.config.assetsDir + '/images/**/*', gulp.config.outputDir + '/images'
|
6
gulp/minify-prod-html.coffee
Normal file
6
gulp/minify-prod-html.coffee
Normal file
|
@ -0,0 +1,6 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'minify-prod-html', ->
|
||||
gulp.src 'output_prod/**/*.html'
|
||||
.pipe gulp.plugins.htmlmin 'collapseWhitespace': true
|
||||
.pipe gulp.dest 'output_prod'
|
8
gulp/scripts.coffee
Normal file
8
gulp/scripts.coffee
Normal file
|
@ -0,0 +1,8 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'scripts', ->
|
||||
gulp.js [
|
||||
gulp.config.bowerDir + '/jquery/dist/jquery.js',
|
||||
gulp.config.bowerDir + '/bootstrap-sass/assets/javascripts/bootstrap.js',
|
||||
gulp.config.assetsDir + '/' + gulp.config.jsPattern
|
||||
], 'site.js'
|
7
gulp/styles.coffee
Normal file
7
gulp/styles.coffee
Normal file
|
@ -0,0 +1,7 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'styles', ->
|
||||
gulp.css [
|
||||
gulp.config.bowerDir + '/font-awesome/css/font-awesome.css',
|
||||
gulp.config.assetsDir + '/sass/site.sass'
|
||||
], 'site.css'
|
5
gulp/watch.coffee
Normal file
5
gulp/watch.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
gulp = require 'gulp'
|
||||
|
||||
gulp.task 'watch', ->
|
||||
gulp.watch gulp.config.sassPattern, ['styles']
|
||||
gulp.watch gulp.config.assetsDir + gulp.config.jsPattern, ['scripts']
|
Loading…
Add table
Add a link
Reference in a new issue