From 3ef8446e2a25b327076a86ae01dacee712adb89e Mon Sep 17 00:00:00 2001 From: Shinigami92 Date: Tue, 11 Jan 2022 10:50:07 +0100 Subject: [PATCH] chore: setup ts build --- .eslintignore | 4 +--- .github/workflows/ci.yml | 2 ++ .prettierignore | 1 + package.json | 1 + tsconfig.json | 7 +++++++ 5 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 tsconfig.json diff --git a/.eslintignore b/.eslintignore index c6b045a5633..c3af857904e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1 @@ -lib/definitions.js -lib/version.js -lib/helpers.js +lib/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82d98cb185e..8919b79f3a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: node-version: '16' cache: 'npm' - run: npm ci + - run: npm run build - run: npm run test lint: runs-on: ubuntu-latest @@ -28,4 +29,5 @@ jobs: node-version: '16' cache: 'npm' - run: npm ci + - run: npm run build - run: npm run lint diff --git a/.prettierignore b/.prettierignore index a731c5df3a2..4b4e10e26cd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,5 +2,6 @@ coverage/ dist/ doc/ examples/browser/js/ +lib/ CHANGELOG.md package-lock.json diff --git a/package.json b/package.json index 2be0067bc16..a6ba94137f9 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "scripts": { "browser": "gulp browser", "jsdoc": "gulp jsdoc", + "build": "tsc", "format": "prettier --write .", "lint": "echo 'TODO eslint'", "test": "mocha test/*.*.js", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..b50049a9be6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "lib", + "declaration": true + } +}