Add experimental pkg build process for creating portable binaries for debian
This commit is contained in:
parent
8ef21c4991
commit
2e2751ad1b
|
@ -3,4 +3,6 @@ run_dev.sh
|
||||||
state
|
state
|
||||||
*/.DS_Store
|
*/.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
bin/*
|
||||||
|
!bin/*.md
|
|
@ -0,0 +1 @@
|
||||||
|
# experimental build
|
8
index.js
8
index.js
|
@ -1,14 +1,14 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const restify = require('restify')
|
const restify = require('restify')
|
||||||
const log = require('./lib/log')('main')
|
const log = require('./lib/log/index.js')('main')
|
||||||
const { readFile } = require('fs-extra')
|
const { readFile } = require('fs-extra')
|
||||||
const { exec } = require('child_process')
|
const { exec } = require('child_process')
|
||||||
|
|
||||||
const BLE = require('./lib/ble')
|
const BLE = require('./lib/ble/index.js')
|
||||||
const Intval = require('./lib/intval')
|
const Intval = require('./lib/intval/index.js')
|
||||||
const intval = new Intval()
|
const intval = new Intval()
|
||||||
const Sequence = require('./lib/sequence')
|
const Sequence = require('./lib/sequence/index.js')
|
||||||
const sequence = new Sequence(intval)
|
const sequence = new Sequence(intval)
|
||||||
|
|
||||||
const PACKAGE = require('./package.json')
|
const PACKAGE = require('./package.json')
|
||||||
|
|
21
package.json
21
package.json
|
@ -11,7 +11,8 @@
|
||||||
"version": "",
|
"version": "",
|
||||||
"postversion": "git push && git push --tags",
|
"postversion": "git push && git push --tags",
|
||||||
"u": "npm run git -- -m \"update\"",
|
"u": "npm run git -- -m \"update\"",
|
||||||
"git": "npm version patch --force"
|
"git": "npm version patch --force",
|
||||||
|
"pkg": "pkg . --output ./bin/intval3"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -52,5 +53,23 @@
|
||||||
"pkg": "^4.4.0",
|
"pkg": "^4.4.0",
|
||||||
"qunit": "^2.9.3",
|
"qunit": "^2.9.3",
|
||||||
"typescript": "^3.6.4"
|
"typescript": "^3.6.4"
|
||||||
|
},
|
||||||
|
"bin": "index.js",
|
||||||
|
"pkg": {
|
||||||
|
"scripts": [
|
||||||
|
"./lib/ble/index.js",
|
||||||
|
"./lib/db/index.js",
|
||||||
|
"./lib/delay/index.js",
|
||||||
|
"./lib/intval/index.js",
|
||||||
|
"./lib/log/index.js",
|
||||||
|
"./lib/mscript/index.js",
|
||||||
|
"./lib/onoff/index.js",
|
||||||
|
"./lib/sequence/index.js",
|
||||||
|
"./lib/wifi/index.js"
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
"node10"
|
||||||
|
],
|
||||||
|
"out-file": "./bin/intval3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue