From bb1344dda75d750e97001e9d4dff83b41b7d17eb Mon Sep 17 00:00:00 2001 From: Daniel Kucal Date: Sat, 20 Jan 2018 12:57:13 +0100 Subject: [PATCH] chore(build.js): set private to `false` in output package.json --- build.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.js b/build.js index 87a8348..49f086b 100644 --- a/build.js +++ b/build.js @@ -2,6 +2,7 @@ const shell = require('shelljs'); const chalk = require('chalk'); +const fs = require('fs'); const PACKAGE = `ngx-store`; const NPM_DIR = `dist`; @@ -71,4 +72,12 @@ shell.rm(`-Rf`, `${NPM_DIR}/src/**/*.js.map`); shell.cp(`-Rf`, [`package.json`, `LICENSE`, `README.md`], `${NPM_DIR}`); + +const packageFile = `./${NPM_DIR}/package.json`; +const packageContent = require(packageFile); +packageContent.private = false; +fs.writeFile(packageFile, JSON.stringify(packageContent, null, 4), function (err) { + if (err) return console.log(err); +}); + shell.echo(chalk.green(`End building`));