Skip to content

Commit 89b9b64

Browse files
committed
add "build" script for .js files
1 parent a52ddc2 commit 89b9b64

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
"name": "custom-rxjs-operators",
33
"version": "1.0.0",
44
"description": "",
5-
"main": "index.js",
5+
"main": "dist/src/index.js",
6+
"types": "dist/src/index.d.ts",
67
"scripts": {
78
"circleci": "npm run test && npm audit && npm run style",
8-
"test": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha --opts spec/default.opts \"spec/*.spec.ts\"",
9-
"style": "prettier --check \"**/*.ts\"",
10-
"style:fix": "prettier --write \"**/*.ts\""
9+
"test": "npm run build && mocha --opts spec/default.opts \"dist/spec/*.spec.js\"",
10+
"style": "prettier --check \"src/**/*.ts\" \"spec/**/*.ts\"",
11+
"style:fix": "prettier --write \"src/**/*.ts\" \"spec/**/*.ts\"",
12+
"build": "tsc"
1113
},
1214
"author": "",
1315
"license": "ISC",

spec/default.opts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
--require ts-node/register
2-
--require tsconfig-paths/register
3-
41
--reporter spec
52

63
--check-leaks

spec/tsconfig.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

tsconfig.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": ".",
4-
"rootDir": "src",
5-
"outDir": "dist",
3+
"target": "es5",
64
"module": "commonjs",
7-
"target": "es2017",
8-
"sourceMap": true
5+
"lib": ["es5", "es2018", "dom"],
6+
"declaration": true,
7+
"outDir": "dist",
8+
"strict": true,
9+
"sourceMap": true,
10+
"esModuleInterop": true,
11+
// "baseUrl": "."
12+
// "rootDir": "src",
913
},
10-
"exclude": ["node_modules"]
14+
"exclude": ["node_modules", "dist"]
1115
}

0 commit comments

Comments
 (0)