Skip to content

Commit 2e454ba

Browse files
committed
fix build and publish config
1 parent bdaa199 commit 2e454ba

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

package.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
"name": "@commt/rn-sdk",
33
"version": "0.1.0",
44
"description": "Ultimate chat plugin for react native applications",
5-
"main": "src/index.tsx",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
67
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8+
"test": "echo \"Error: no test specified\" && exit 1",
9+
"build": "rm -rf dist/* && npx tsc"
810
},
911
"repository": {
1012
"type": "git",
11-
"url": "git+https://github.com/commt/rn-sdk.git"
13+
"url": "git+https://github.com/commt/commt-react-native.git"
1214
},
15+
"files": ["dist"],
1316
"dependencies": {
1417
"dayjs": "^1.11.9",
1518
"axios": "^1.4.0",
1619
"node-forge": "^1.3.1",
17-
"react": "18.2.0",
18-
"react-native": "0.71.8",
1920
"styled-components": "^6.0.0-rc.3",
2021
"rn-emoji-keyboard": "^1.5.0",
2122
"socket.io-client": "^4.6.2",
@@ -28,6 +29,10 @@
2829
"@types/react": "^18.0.24",
2930
"@tsconfig/react-native": "^2.0.2"
3031
},
32+
"peerDependencies": {
33+
"react": "18.2.0",
34+
"react-native": "0.71.8"
35+
},
3136
"keywords": [
3237
"commt",
3338
"commt-chat-sdk",
@@ -50,7 +55,7 @@
5055
}
5156
],
5257
"bugs": {
53-
"url": "https://github.com/commt/rn-sdk.git/issues"
58+
"url": "https://github.com/commt/commt-react-native.git/issues"
5459
},
5560
"homepage": "https://commt.co/doc",
5661
"license": "MIT",

tsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"extends": "@tsconfig/react-native/tsconfig.json",
3-
"include": ["./"],
3+
"include": ["src/**/*", "./LICENSE", "./Readme.md"],
4+
"exclude": ["node_modules", "dist"],
45
"compilerOptions": {
56
"baseUrl": "./",
6-
}
7+
"rootDir": "./src",
8+
"outDir": "dist",
9+
"resolveJsonModule": true,
10+
"declaration": true,
11+
"noEmit": false,
12+
},
713
}
814

0 commit comments

Comments
 (0)