aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinigami92 <[email protected]>2022-01-11 10:50:07 +0100
committerDamien Retzinger <[email protected]>2022-01-14 18:37:49 -0500
commitb8bfb4542b847004213ddb2294e982bf666cc1a4 (patch)
tree6bc5cdcbc34e744b9fd566e6a530cd30ae93977b
parenta8e8676091a3c8190d2621eb4f867ad1dd984fe1 (diff)
downloadfaker-b8bfb4542b847004213ddb2294e982bf666cc1a4.tar.xz
faker-b8bfb4542b847004213ddb2294e982bf666cc1a4.zip
chore: setup ts build
-rw-r--r--.eslintignore4
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--.prettierignore1
-rw-r--r--package.json1
-rw-r--r--tsconfig.json7
5 files changed, 12 insertions, 3 deletions
diff --git a/.eslintignore b/.eslintignore
index c6b045a5..c3af8579 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 82d98cb1..8919b79f 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 a731c5df..4b4e10e2 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 94e53304..1d3bc0fc 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,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 00000000..b50049a9
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "compilerOptions": {
+ "rootDir": "src",
+ "outDir": "lib",
+ "declaration": true
+ }
+}