From 83d445c1a28c7257cfd09b819a0b949ce439507e Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Fri, 10 Dec 2021 20:52:17 +0100 Subject: [PATCH] move package back within typescript --- package.json | 8 +--- typescript/.gitignore | 2 + typescript/README.md | 4 +- typescript/package-lock.json | 49 +++++++++++++++++++++++ typescript/package.json | 14 +++++++ tsconfig.json => typescript/tsconfig.json | 0 6 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 typescript/.gitignore create mode 100644 typescript/package-lock.json create mode 100644 typescript/package.json rename tsconfig.json => typescript/tsconfig.json (100%) diff --git a/package.json b/package.json index f6426e7e2..b796044c9 100644 --- a/package.json +++ b/package.json @@ -4,16 +4,12 @@ "author": "Gordon Williams (http://espruino.com)", "version": "0.0.1", "devDependencies": { - "eslint": "7.1.0", - "@types/node": "16.11.12", - "typescript": "4.5.2" + "eslint": "7.1.0" }, "scripts": { "lint-apps": "eslint ./apps --ext .js", "test": "node bin/sanitycheck.js && eslint ./apps --ext .js", - "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" + "start": "npx http-server -c-1" }, "dependencies": { "acorn": "^7.2.0" diff --git a/typescript/.gitignore b/typescript/.gitignore new file mode 100644 index 000000000..630f61ee5 --- /dev/null +++ b/typescript/.gitignore @@ -0,0 +1,2 @@ +./node_modules +!package-lock.json diff --git a/typescript/README.md b/typescript/README.md index a54a4c75a..9b38459ae 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -13,7 +13,7 @@ TODO 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`. -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 @@ -22,7 +22,7 @@ npm ci 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. diff --git a/typescript/package-lock.json b/typescript/package-lock.json new file mode 100644 index 000000000..bd3cfc702 --- /dev/null +++ b/typescript/package-lock.json @@ -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 + } + } +} diff --git a/typescript/package.json b/typescript/package.json new file mode 100644 index 000000000..03f435497 --- /dev/null +++ b/typescript/package.json @@ -0,0 +1,14 @@ +{ + "name": "Bangle.ts", + "description": "Bangle.js Typescript Project Setup and Types", + "author": "Sebastian Di Luzio (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" + } +} diff --git a/tsconfig.json b/typescript/tsconfig.json similarity index 100% rename from tsconfig.json rename to typescript/tsconfig.json