You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
468 B
19 lines
468 B
'use strict'; |
|
const path = require('path'); |
|
const sh = require('shelljs'); |
|
const renderPug = require('./render-pug'); |
|
|
|
const srcPath = path.resolve(path.dirname(__filename), '../src'); |
|
|
|
sh.find(srcPath).forEach(_processFile); |
|
|
|
function _processFile(filePath) { |
|
if ( |
|
filePath.match(/\.pug$/) |
|
&& !filePath.match(/include/) |
|
&& !filePath.match(/mixin/) |
|
&& !filePath.match(/\/pug\/layouts\//) |
|
) { |
|
renderPug(filePath); |
|
} |
|
} |