Skip to content

Commit ee761ea

Browse files
committed
change build settings
1 parent 31467ed commit ee761ea

File tree

3 files changed

+36
-23
lines changed

3 files changed

+36
-23
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
node_modules
2-
build
2+
dist
33

44
yarn-error.log

package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"units",
1010
"react-native-web",
1111
"expo",
12-
"rxn"
12+
"rxn",
13+
"viewport",
14+
"viewport-units"
1315
],
1416
"homepage": "https://github.com/Luffos/rxn-units#readme",
1517
"bugs": {
@@ -21,12 +23,14 @@
2123
},
2224
"license": "MIT",
2325
"author": "Luffos",
24-
"type": "module",
25-
"main": "build/index.js",
26+
"main": "dist/index.js",
2627
"source": "src/index",
27-
"types": "build/index.d.ts",
28+
"types": "dist/index.d.ts",
29+
"files": [
30+
"dist"
31+
],
2832
"scripts": {
29-
"build": "rimraf ./build && tsc --build",
33+
"build": "rimraf ./dist && tsc --build",
3034
"build-watch": "watch \"npm run build\" ./src --interval 1 --wait 0.1",
3135
"prepack": "npm run build"
3236
},
@@ -36,6 +40,8 @@
3640
"typescript": "^4.6.3"
3741
},
3842
"peerDependencies": {
39-
"react-native": "*"
43+
"react": "^18.2.0",
44+
"react-dom": "^18.2.0",
45+
"react-native": "^0.70.5"
4046
}
4147
}

tsconfig.json

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
{
22
"compilerOptions": {
3-
"outDir": "build",
4-
"allowUnreachableCode": false,
5-
"allowUnusedLabels": false,
6-
"esModuleInterop": true,
7-
"importsNotUsedAsValues": "error",
3+
"outDir": "dist",
4+
"useDefineForClassFields": true,
5+
"allowSyntheticDefaultImports": true,
6+
"allowJs": true,
87
"forceConsistentCasingInFileNames": true,
9-
"jsx": "react",
10-
"lib": ["esnext"],
118
"module": "esnext",
12-
"moduleResolution": "node",
139
"noFallthroughCasesInSwitch": true,
14-
"noImplicitReturns": true,
1510
"noImplicitUseStrict": false,
1611
"noStrictGenericChecks": false,
17-
"noUnusedLocals": true,
18-
"noUnusedParameters": true,
19-
"declaration": true,
12+
"noUncheckedIndexedAccess": true,
2013
"resolveJsonModule": true,
21-
"skipLibCheck": true,
14+
"skipDefaultLibCheck": true,
2215
"strict": true,
23-
"target": "esnext"
24-
}
25-
}
16+
"target": "esnext",
17+
"lib": ["dom", "esnext"],
18+
"jsx": "react",
19+
"moduleResolution": "node",
20+
"esModuleInterop": true,
21+
"typeRoots": [
22+
"./ts-declarations",
23+
"node_modules/@types"
24+
],
25+
"declaration": true,
26+
"strictNullChecks": true,
27+
"strictPropertyInitialization": true,
28+
"strictFunctionTypes": true,
29+
"skipLibCheck": true
30+
},
31+
"include": ["src"]
32+
}

0 commit comments

Comments
 (0)