Skip to content

Commit

Permalink
remove scripts section of package.json during a build (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctaggart authored Nov 29, 2017
1 parent 175102e commit 80326be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build-update-package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// remove scripts from package.json
const fs = require('fs');
var json = require('./package.json');
json.scripts = undefined;
fs.writeFileSync("./package.json", JSON.stringify(json, undefined, 2));
3 changes: 3 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ yarn global add babel-cli
babel --plugins shebang $js -o $js

# yarn pack is packing too many files
if ($env:appveyor){
node build-update-package.js
}
npm pack
tar tf ts2fable-$v.tgz
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "fable-splitter -c splitter.config.js",
"watch": "fable-splitter -c splitter.config.js -w",
"test": "fable-splitter -c splitter.test.config.js",
"postinstall": "cross-env npm_package_engines_vscode=1.8.1 node ./node_modules/vscode/bin/install"
"postinstall": "node ./node_modules/vscode/bin/install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -57,5 +57,8 @@
"mocha": "^4.0.1",
"mocha-appveyor-reporter": "^0.4.0",
"vscode": "^1.1.8"
},
"engines": {
"vscode": "^1.18.1"
}
}

0 comments on commit 80326be

Please sign in to comment.