diff options
author | Thomas Schmid <schmid-thomas@gmx.net> | 2020-04-28 00:11:54 +0300 |
---|---|---|
committer | Thomas Schmid <schmid-thomas@gmx.net> | 2020-04-28 00:11:54 +0300 |
commit | d1f21200adf35ab2aed2a283c79ae8a5c3714d26 (patch) | |
tree | 98389bc065ccded852786b4f85098eb082d28208 /gulp | |
parent | 102b86a74bf5847350b713e7675d745953a0d915 (diff) |
Minor fixes and enhancements
* Create a win32 npm target
* Externalize constant
* Remove unneeded string
Diffstat (limited to 'gulp')
-rw-r--r-- | gulp/gulpfile.common.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gulp/gulpfile.common.js b/gulp/gulpfile.common.js index 0ad976cb..73b718e2 100644 --- a/gulp/gulpfile.common.js +++ b/gulp/gulpfile.common.js @@ -18,6 +18,8 @@ const { createWriteStream, existsSync } = require('fs'); const path = require('path'); const yazl = require('yazl'); +const JSON_INDENTATION = 2; + const BASE_DIR_BOOTSTRAP = "./node_modules/bootstrap/dist"; const BASE_DIR_MATERIALICONS = "./node_modules/material-design-icons-iconfont/dist"; const BASE_DIR_JQUERY = "./node_modules/jquery/dist"; @@ -190,7 +192,7 @@ async function setPackageVersion(version, file) { const data = JSON.parse(await readFile(file, 'utf8')); data.version = version; - await writeFile(file, JSON.stringify(data, null, 2), 'utf-8'); + await writeFile(file, JSON.stringify(data, null, JSON_INDENTATION), 'utf-8'); } // We can only use major, minor and patch. Everything else |