Skip to content

Commit f04978f

Browse files
committed
Updated package.json
- Added build scripts to package.json: * build: Compile TypeScript and generate type definitions * pretest: Build before running tests * prepare: Build before publish - Updated files field to include build output directories - Added entry points
1 parent 85364e8 commit f04978f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/url-utils/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@
88
},
99
"author": "Ghost Foundation",
1010
"license": "MIT",
11-
"main": "index.js",
11+
"main": "cjs/UrlUtils.js",
12+
"types": "types/src/UrlUtils.d.ts",
13+
"source": "src/UrlUtils.ts",
1214
"scripts": {
1315
"dev": "echo \"Implement me!\"",
14-
"test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --reporter html mocha './test/**/*.test.js'",
15-
"lint": "eslint . --ext .js --cache",
16+
"pretest": "yarn build",
17+
"test": "NODE_ENV=testing TS_NODE_PROJECT=tsconfig.test.json c8 --src src --all --reporter text --reporter cobertura --reporter html mocha -r ts-node/register './test/**/*.test.js'",
18+
"build": "tsc -p tsconfig.json",
19+
"lint": "eslint . --ext .js,.ts --cache",
20+
"prepare": "NODE_ENV=production yarn build",
1621
"posttest": "yarn lint"
1722
},
1823
"files": [
19-
"lib/",
24+
"src/",
25+
"cjs/",
26+
"types/",
2027
"index.js"
2128
],
2229
"publishConfig": {

0 commit comments

Comments
 (0)