Skip to content

Commit ddf0152

Browse files
committed
Config: Update package.json for npm deployment configuration.
1 parent 432c18d commit ddf0152

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

package.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,47 @@
22
"name": "leetcode-roulette-api",
33
"version": "0.0.1",
44
"description": "API library for https://api.leetcoderoulette.com",
5-
"main": "index.js",
5+
"types": "./lib/cjs/types/index.d.ts",
6+
"main": "./lib/cjs/index.js",
67
"scripts": {
8+
"clean": "rm -rf ./lib",
9+
"build": "npm run clean && npm run build:esm && npm run build:cjs",
10+
"build:esm": "tsc -p ./configs/tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs",
11+
"build:cjs": "tsc -p ./configs/tsconfig.cjs.json",
12+
"prepack": "npm run build",
713
"test": "jest --passWithNoTests",
814
"test:ci": "jest --coverage"
915
},
1016
"repository": {
1117
"type": "git",
1218
"url": "git+https://github.com/leetcode-roulette/leetcode-roulette-api.git"
1319
},
20+
"exports": {
21+
".": {
22+
"import": {
23+
"types": "./lib/esm/types/index.d.ts",
24+
"default": "./lib/esm/index.mjs"
25+
},
26+
"require": {
27+
"types": "./lib/cjs/types/index.d.ts",
28+
"default": "./lib/cjs/index.js"
29+
}
30+
}
31+
},
32+
"files": [
33+
"lib/**/*"
34+
],
1435
"author": "Leetcode Roulette",
1536
"license": "MIT",
1637
"bugs": {
1738
"url": "https://github.com/leetcode-roulette/leetcode-roulette-api/issues"
1839
},
40+
"release": {
41+
"branches": ["master"]
42+
},
43+
"publishConfig": {
44+
"access": "public"
45+
},
1946
"homepage": "https://github.com/leetcode-roulette/leetcode-roulette-api#readme",
2047
"devDependencies": {
2148
"@babel/core": "^7.19.1",
@@ -34,5 +61,9 @@
3461
},
3562
"dependencies": {
3663
"axios": "^1.1.3"
64+
},
65+
"engines": {
66+
"npm": ">=5.5.0",
67+
"node": ">=9.3.0"
3768
}
3869
}

0 commit comments

Comments
 (0)