Package the CLI into a standalone runnable binary

This has no native modules yet, which means it works on Linux,
but ignoring any ext4 image data. Drivelist will fail for
some windows operations, but most other things should work.

This is only building a folder with a runnable binary, this needs
packaging before it can be distributable.

Change-Type: minor
This commit is contained in:
Tim Perry 2017-12-12 18:02:37 +01:00
parent dba8db19cb
commit 7681003512
2 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View File

@ -35,3 +35,4 @@ resinrc.yml
/tmp /tmp
build/ build/
build-bin/

View File

@ -18,8 +18,20 @@
"bin": { "bin": {
"resin": "./bin/resin" "resin": "./bin/resin"
}, },
"pkg": {
"scripts": [
"node_modules/resin-sync/build/capitano/*.js",
"node_modules/resin-sync/build/sync/*.js"
],
"assets": [
"build/auth/pages/*.ejs"
]
},
"scripts": { "scripts": {
"build": "gulp build && tsc && npm run doc", "prebuild": "rimraf build/ build-bin/",
"build": "npm run build:src && npm run build:bin",
"build:src": "gulp build && tsc && npm run doc",
"build:bin": "pkg . -t host -o build-bin/resin && cp node_modules/opn/xdg-open build-bin/",
"pretest": "npm run build", "pretest": "npm run build",
"test": "gulp test", "test": "gulp test",
"ci": "npm run test && catch-uncommitted", "ci": "npm run test && catch-uncommitted",
@ -48,6 +60,7 @@
"gulp-mocha": "^2.0.0", "gulp-mocha": "^2.0.0",
"gulp-shell": "^0.5.2", "gulp-shell": "^0.5.2",
"mochainon": "^2.0.0", "mochainon": "^2.0.0",
"pkg": "^4.3.0-beta.1",
"require-npm4-to-publish": "^1.0.0", "require-npm4-to-publish": "^1.0.0",
"typescript": "^2.6.1" "typescript": "^2.6.1"
}, },