Skip to content

Commit

Permalink
Compile to ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
sanathkr committed Aug 11, 2017
1 parent f3157c6 commit e18f2df
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
node_modules
bin
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
node_modules
src
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Example App",
"main": "index.js",
"scripts": {
"install": "go-npm"
"postinstall": "go-npm install",
"preuninstall": "go-npm uninstall"
},
"goBinary": {
"name": "myBinaryName",
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "go-npm",
"version": "0.1.7",
"version": "0.1.8",
"description": "Distribute and install Go binaries via NPM",
"main": "index.js",
"bin": {
"go-npm": "./bin/index.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "node_modules/babel-cli/bin/babel.js src --out-dir bin --presets es2015"
},
"author": "Sanath Kumar Ramesh <[email protected]>",
"license": "Apache-2.0",
Expand All @@ -20,5 +21,10 @@
"type": "git",
"url": "https://github.com/sanathkr/go-npm.git"
},
"homepage": "https://github.com/sanathkr/go-npm"
"homepage": "https://github.com/sanathkr/go-npm",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-preset-es2015": "^6.24.1"
}
}
1 change: 0 additions & 1 deletion bin/index.js → src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ if (argv && argv.length > 2) {
if (!actions[cmd]) {
console.log("Invalid command to go-npm. `install` and `uninstall` are the only supported commands");
process.exit(1);
return;
}

actions[cmd](function(err) {
Expand Down

0 comments on commit e18f2df

Please sign in to comment.