mirror of
https://github.com/ershisan99/go-npm.git
synced 2025-12-16 20:59:28 +00:00
Compile to ES6
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.idea
|
.idea
|
||||||
node_modules
|
node_modules
|
||||||
|
bin
|
||||||
|
|||||||
3
.npmignore
Normal file
3
.npmignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.idea
|
||||||
|
node_modules
|
||||||
|
src
|
||||||
@@ -4,7 +4,8 @@
|
|||||||
"description": "Example App",
|
"description": "Example App",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "go-npm"
|
"postinstall": "go-npm install",
|
||||||
|
"preuninstall": "go-npm uninstall"
|
||||||
},
|
},
|
||||||
"goBinary": {
|
"goBinary": {
|
||||||
"name": "myBinaryName",
|
"name": "myBinaryName",
|
||||||
|
|||||||
12
package.json
12
package.json
@@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "go-npm",
|
"name": "go-npm",
|
||||||
"version": "0.1.7",
|
"version": "0.1.8",
|
||||||
"description": "Distribute and install Go binaries via NPM",
|
"description": "Distribute and install Go binaries via NPM",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"go-npm": "./bin/index.js"
|
"go-npm": "./bin/index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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 <dayanandasaraswati@gmail.com>",
|
"author": "Sanath Kumar Ramesh <dayanandasaraswati@gmail.com>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -20,5 +21,10 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sanathkr/go-npm.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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ if (argv && argv.length > 2) {
|
|||||||
if (!actions[cmd]) {
|
if (!actions[cmd]) {
|
||||||
console.log("Invalid command to go-npm. `install` and `uninstall` are the only supported commands");
|
console.log("Invalid command to go-npm. `install` and `uninstall` are the only supported commands");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
actions[cmd](function(err) {
|
actions[cmd](function(err) {
|
||||||
Reference in New Issue
Block a user