@mimik/local 6.0.8 → 6.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +13 -0
  2. package/package.json +1 -1
  3. package/scripts.json +2 -2
package/index.js CHANGED
@@ -644,6 +644,18 @@ const scripts = () => {
644
644
  write(packageFilename, packageFile, 'package.json', INSTALL, true);
645
645
  };
646
646
 
647
+ const unScripts = () => {
648
+ const packageFilename = rootPath('package.json');
649
+ const scriptsFile = parse(read(path.join(__dirname, 'scripts.json'), INSTALL), 'scripts.json', INSTALL);
650
+ const packageFile = parse(read(packageFilename, INSTALL), 'package.json', INSTALL);
651
+
652
+ Object.keys(scriptsFile.scripts).forEach((script) => {
653
+ delete packageFile.scripts[script];
654
+ });
655
+ delete packageFile.husky;
656
+ write(packageFilename, packageFile, 'package.json', INSTALL, true);
657
+ };
658
+
647
659
  module.exports = {
648
660
  mSTTestSetup,
649
661
  mSTSetup,
@@ -653,6 +665,7 @@ module.exports = {
653
665
  setup,
654
666
  dotFiles,
655
667
  scripts,
668
+ unScripts,
656
669
  commitCheckMsg,
657
670
  start2process,
658
671
  testJsonFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/local",
3
- "version": "6.0.8",
3
+ "version": "6.0.10",
4
4
  "description": "Local setup configuration for normal and test opreration",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/scripts.json CHANGED
@@ -7,8 +7,8 @@
7
7
  "test-ci": "nyc --reporter=lcov --reporter=text npm test",
8
8
  "prestart": "node ./local/setup.js",
9
9
  "start": "sh server-start.sh",
10
- "pre-push": "npm run docs && npm run lint && npm run test",
11
- "pre-commit": "npm run docs && npm run lint",
10
+ "pre-push": "npm run docs && npm run lint && npm run test && node .local/unScripts.js",
11
+ "pre-commit": "npm run docs && npm run lint && node .local/unScripts.js",
12
12
  "prepare": "if [ \"$NODE_ENV\" != \"production\" ]\nthen\nhusky\nfi"
13
13
  },
14
14
  "husky": {