Created
July 12, 2014 18:01
-
-
Save polidog/0daf6e2371fee3459f57 to your computer and use it in GitHub Desktop.
gulpでcoffee,jade,stylusを変換するやつ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 人生初gulpfile | |
gulp = require "gulp" | |
coffee = require "gulp-coffee" | |
jade = require "gulp-jade" | |
stylus = require "gulp-stylus" | |
del = require "del" | |
paths = | |
coffee: 'src/coffee/*.coffee' | |
jade: 'src/jade/*.jade' | |
stylus: 'src/stylus/*.styl' | |
dists = | |
js: 'app/js' | |
html: 'app' | |
css: 'app/css' | |
# 削除タスク | |
gulp.task 'clean', (cb)-> | |
del ['app'], cb | |
# Coffeeのコンパイル | |
gulp.task 'coffee', -> | |
gulp.src paths.coffee | |
.pipe coffee bare:true | |
.pipe gulp.dest dists.js | |
# Jadeのコンパイル | |
gulp.task 'jade', -> | |
gulp.src paths.jade | |
.pipe jade pretty:true | |
.pipe gulp.dest dists.html | |
# stylusのコンパイル | |
gulp.task 'stylus', -> | |
gulp.src paths.stylus | |
.pipe stylus {} | |
.pipe gulp.dest dists.css | |
# watch | |
gulp.task 'watch', -> | |
gulp.watch paths.coffee, ['coffee'] | |
gulp.watch paths.jade, ['jade'] | |
gulp.watch paths.stylus, ['stylus'] | |
# 起動時の対応 | |
gulp.task 'default', ['clean','coffee','jade','stylus','watch'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ってやれば動くはず