--- a/tools/pre-prod.js Tue May 28 04:04:37 2019 +0000
+++ b/tools/pre-prod.js Wed May 29 23:07:11 2019 +0100
@@ -1,6 +1,8 @@
* Runs after Hugo has built the site
* * Cleans, Minifies and Optimises hugo output
+ * USAGE: node tools/pre-prod [path to hugo output] /*****************************************************************************
@@ -17,7 +19,9 @@
*****************************************************************************/
-const target = path.join(__dirname, '../public/')
+ // looks for a path in first arg or default to `./public/` + path.join(__dirname, `..`, process.argv[2] || 'public') + path.sep const xmlRegex = /\.(html|xml)$/
@@ -45,7 +49,7 @@
*****************************************************************************/
- * Format XML and HTML, removing hugo template artefacts,
+ * Format XML and HTML, removing hugo template artefacts,