From 2899e98e3ce5a2a15fbc3db98f87bde5e132cc12 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 29 Jun 2019 18:11:10 +0100 Subject: [PATCH] Print number of output files --- index.ts | 3 +++ package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/index.ts b/index.ts index 30b97d7..62de88a 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,5 @@ import { readFileSync, writeFileSync } from 'fs'; +import glob from 'glob'; import Handlebars from 'handlebars'; import mkdirp from 'mkdirp'; import Bundler from 'parcel-bundler'; @@ -75,4 +76,6 @@ function writeTemplate( bar.tick(); }); writeTemplate(template, '', {value: ''}); + const filesOutput = glob.sync(join(BUILD_DIR, "**/index.html")).length; + console.log(`Generated ${filesOutput} files.`); })(); diff --git a/package.json b/package.json index 8458291..fb2115d 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@types/underscore": "^1.9.1", "animate.css": "3.7.0", "bootstrap": "4.2.1", + "glob": "^7.1.4", "handlebars": "^4.1.2", "mkdirp": "^0.5.1", "parcel-bundler": "1.12.3",