move package back within typescript

pull/1052/head
Sebastian Di Luzio 2021-12-10 20:52:17 +01:00
parent 0a2426a6dd
commit 83d445c1a2
6 changed files with 69 additions and 8 deletions

View File

@ -4,16 +4,12 @@
"author": "Gordon Williams <gw@pur3.co.uk> (http://espruino.com)", "author": "Gordon Williams <gw@pur3.co.uk> (http://espruino.com)",
"version": "0.0.1", "version": "0.0.1",
"devDependencies": { "devDependencies": {
"eslint": "7.1.0", "eslint": "7.1.0"
"@types/node": "16.11.12",
"typescript": "4.5.2"
}, },
"scripts": { "scripts": {
"lint-apps": "eslint ./apps --ext .js", "lint-apps": "eslint ./apps --ext .js",
"test": "node bin/sanitycheck.js && eslint ./apps --ext .js", "test": "node bin/sanitycheck.js && eslint ./apps --ext .js",
"start": "npx http-server -c-1", "start": "npx http-server -c-1"
"build:example": "tsc ./apps/widChargingStatus/widget.ts --outDir ./apps/widChargingStatus/dist",
"build:types": "tsc ./typescript/types/globals.d.ts"
}, },
"dependencies": { "dependencies": {
"acorn": "^7.2.0" "acorn": "^7.2.0"

2
typescript/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
./node_modules
!package-lock.json

View File

@ -13,7 +13,7 @@ TODO
Install [npm](https://www.npmjs.com/get-npm) if you haven't already. Install [npm](https://www.npmjs.com/get-npm) if you haven't already.
Make sure you are using version ^8 by running `npm -v`. If the version is incorrect, run `npm i -g npm@^8`. Make sure you are using version ^8 by running `npm -v`. If the version is incorrect, run `npm i -g npm@^8`.
After having installed npm for your platform, open a terminal, and navigate into the `/typescript/sharedLib` folder. Then run: After having installed npm for your platform, open a terminal, and navigate into the `/typescript` folder. Then run:
``` ```
npm ci npm ci
@ -22,7 +22,7 @@ npm ci
to install the project's build tools, and: to install the project's build tools, and:
``` ```
npx tsc ./relativePathToYourApp/app.ts --outDir ./relativePathToYourApp/dist npx tsc ../apps/relativePathToYourApp/app.ts --outDir ../apps/relativePathToYourApp/dist
``` ```
To build your app. The last command will generate the `app.js` file containing the transpiled code for the BangleJS. To build your app. The last command will generate the `app.js` file containing the transpiled code for the BangleJS.

49
typescript/package-lock.json generated Normal file
View File

@ -0,0 +1,49 @@
{
"name": "Bangle.ts",
"version": "0.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "Bangle.ts",
"version": "0.0.1",
"devDependencies": {
"@types/node": "16.11.12",
"typescript": "4.5.2"
}
},
"node_modules/@types/node": {
"version": "16.11.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz",
"integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==",
"dev": true
},
"node_modules/typescript": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz",
"integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
}
},
"dependencies": {
"@types/node": {
"version": "16.11.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz",
"integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==",
"dev": true
},
"typescript": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz",
"integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==",
"dev": true
}
}
}

14
typescript/package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "Bangle.ts",
"description": "Bangle.js Typescript Project Setup and Types",
"author": "Sebastian Di Luzio <sebastian@diluz.io> (https://diluz.io)",
"version": "0.0.1",
"devDependencies": {
"@types/node": "16.11.12",
"typescript": "4.5.2"
},
"scripts": {
"build:example": "tsc ../apps/widChargingStatus/widget.ts --outDir ../apps/widChargingStatus/dist",
"build:types": "tsc ./types/globals.d.ts"
}
}