LoginSignup
1
1

More than 5 years have passed since last update.

gulp をごっくんごくごく #Jade 編

Last updated at Posted at 2015-05-09

環境

  • OS X Yosemite 10.10.3

前提

  • Node.js v0.11.16
  • npm 2.3.0
  • Gulp 3.8.11

gulp-jade をインストール

$ npm install gulp-jade --save-dev

gulpfile.js を作成

$ vim gulpfile.js

中身をこんな感じに

各種パスはご自身の環境に合わせてください

var gulp = require('gulp');
var jade = require('gulp-jade');

gulp.task('jade',function(){
    return gulp.src(['./*.jade'])
        .pipe(jade({ pretty: true}))
        .pipe(gulp.dest('./'));
});

gulp.task('watch',function(){
    gulp.watch('./*.jade',function(event){
        gulp.run('jade');   
    });
});

gulp.task('default',function(){
    gulp.run('watch');
});

実行

$ gulp
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1