mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-23 03:27:08 -04:00
Switch file names from jade to pug.
This commit is contained in:
parent
3a2e61b163
commit
f0a9937dc6
8 changed files with 57 additions and 7 deletions
8
ghu.js
8
ghu.js
|
@ -9,7 +9,7 @@ const SRC = join(ROOT, 'src');
|
|||
const TEST = join(ROOT, 'test');
|
||||
const BUILD = join(ROOT, 'build');
|
||||
|
||||
const mapper = mapfn.p(SRC, BUILD).s('.less', '.css').s('.jade', '');
|
||||
const mapper = mapfn.p(SRC, BUILD).s('.less', '.css').s('.pug', '');
|
||||
|
||||
ghu.defaults('release');
|
||||
|
||||
|
@ -88,8 +88,8 @@ ghu.task('build:styles', runtime => {
|
|||
});
|
||||
|
||||
ghu.task('build:pages', runtime => {
|
||||
return read(`${SRC}: **/*.jade, ! **/*.tpl.jade`)
|
||||
.then(newerThan(mapper, `${SRC}/**/*.tpl.jade`))
|
||||
return read(`${SRC}: **/*.pug, ! **/*.tpl.pug`)
|
||||
.then(newerThan(mapper, `${SRC}/**/*.tpl.pug`))
|
||||
.then(pug({pkg: runtime.pkg}))
|
||||
.then(wrap('', runtime.commentHtml))
|
||||
.then(write(mapper, {overwrite: true}));
|
||||
|
@ -104,7 +104,7 @@ ghu.task('build:copy', runtime => {
|
|||
.then(wrap(runtime.commentJs))
|
||||
.then(write(mapper, {overwrite: true, cluster: true})),
|
||||
|
||||
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.jade, ! **/conf/*.json`)
|
||||
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.pug, ! **/conf/*.json`)
|
||||
.then(newerThan(mapper))
|
||||
.then(each(obj => {
|
||||
if (/index\.php$/.test(obj.source)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue