From b9539302145038ff5850f20b130e4a004bfef930 Mon Sep 17 00:00:00 2001 From: james58899 Date: Wed, 27 Jun 2018 15:23:35 +0800 Subject: [PATCH] add comment in build.js --- build.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index 8f7777dd1..d3fef86a5 100644 --- a/build.js +++ b/build.js @@ -4,18 +4,21 @@ const fs = require('fs') const path = require('path'); const mkdirp = require('mkdirp'); -const srcDir = './'; -const outDir = 'out/'; -const matcher = '/**/*.shtml'; +const srcDir = './'; // shtml base dir +const outDir = 'out/'; // build output dir +const matcher = '/**/*.shtml'; // shtml file matcher const parser = new ssi(srcDir, outDir, matcher); +// find all shtml file in srcDir glob(srcDir + matcher, (err, match) => { if (err) throw err; + // exclude node_module and inc dir match.filter(i => !i.match('node_modules') && !i.match('/inc/')).forEach(file => { console.log('Reading:', file); + // skip if parse failed try { const out = file.replace(srcDir, outDir).replace('.shtml', '.html'); const dir = path.dirname(out);