Last active
September 25, 2017 09:28
-
-
Save iktakahiro/7fa93080932eed44c3c2 to your computer and use it in GitHub Desktop.
gulp-ejs 2.0.0 で .html ファイルを出力する場合拡張子の指定が必須に ref: http://qiita.com/iktakahiro/items/5a6228a880a0a1321a39
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
import ejs from 'gulp-ejs'; | |
gulp.task('ejs', () => { | |
var json = JSON.parse(fs.readFileSync("./src/html/_layout/var.json")); | |
gulp.src(['./src/html/_page/**/*.ejs']) | |
.pipe(ejs(json, {"ext": ".html"})) // "ext" の値を指定 | |
.pipe(gulp.dest('./dist/html/')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment