added build script
This commit is contained in:
parent
8912bce342
commit
dde7d10e4f
|
@ -1 +1,2 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
|
bin/
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "ts-node --project tsconfig.json src/index.ts"
|
"build": "tsc --project tsconfig.json",
|
||||||
|
"start": "node bin/index.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"i2c-bus": "^5.2.2",
|
"i2c-bus": "^5.2.2",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { openSync } from 'i2c-bus';
|
import { openSync } from 'i2c-bus';
|
||||||
import Oled = require('oled-i2c-bus');
|
import Oled from 'oled-i2c-bus';
|
||||||
|
|
||||||
const i2cbus = openSync(1);
|
const i2cbus = openSync(1);
|
||||||
const opts = {
|
const opts = {
|
||||||
|
|
|
@ -12,13 +12,15 @@
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"*": ["@types/*"]
|
"*": ["./@types/*"]
|
||||||
},
|
},
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types",
|
"./node_modules/@types",
|
||||||
"./@types"
|
"./@types"
|
||||||
]
|
],
|
||||||
|
"outDir": "./bin"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"]
|
"include": ["src/**/*"]
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue