Add experimental pkg build process for creating portable binaries for debian

This commit is contained in:
mmcwilliams 2020-07-23 18:04:11 -04:00
parent 8ef21c4991
commit 2e2751ad1b
4 changed files with 28 additions and 6 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ state
*/.DS_Store */.DS_Store
.DS_Store .DS_Store
*.tsbuildinfo *.tsbuildinfo
bin/*
!bin/*.md

1
bin/Readme.md Normal file
View File

@ -0,0 +1 @@
# experimental build

View File

@ -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')

View File

@ -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"
} }
} }