1
Fork 0

Print number of output files

This commit is contained in:
Jake Howard 2019-06-29 18:11:10 +01:00
parent 95a94c2052
commit 2899e98e3c
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 4 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import { readFileSync, writeFileSync } from 'fs'; import { readFileSync, writeFileSync } from 'fs';
import glob from 'glob';
import Handlebars from 'handlebars'; import Handlebars from 'handlebars';
import mkdirp from 'mkdirp'; import mkdirp from 'mkdirp';
import Bundler from 'parcel-bundler'; import Bundler from 'parcel-bundler';
@ -75,4 +76,6 @@ function writeTemplate(
bar.tick(); bar.tick();
}); });
writeTemplate(template, '', {value: ''}); writeTemplate(template, '', {value: ''});
const filesOutput = glob.sync(join(BUILD_DIR, "**/index.html")).length;
console.log(`Generated ${filesOutput} files.`);
})(); })();

View file

@ -26,6 +26,7 @@
"@types/underscore": "^1.9.1", "@types/underscore": "^1.9.1",
"animate.css": "3.7.0", "animate.css": "3.7.0",
"bootstrap": "4.2.1", "bootstrap": "4.2.1",
"glob": "^7.1.4",
"handlebars": "^4.1.2", "handlebars": "^4.1.2",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"parcel-bundler": "1.12.3", "parcel-bundler": "1.12.3",