Skip to content

Commit 7529f7d

Browse files
rizalibnumsluszniak
authored andcommitted
build: configure TypeScript compilation for resource-fetcher packages
1 parent 92b0009 commit 7529f7d

5 files changed

Lines changed: 37 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525

2626
- name: Typecheck files
2727
run: |
28-
cd packages/react-native-executorch
29-
yarn prepare
30-
cd ../../
28+
yarn workspaces foreach --all --parallel run prepare
3129
yarn typecheck
3230
3331
build-library:
@@ -39,7 +37,5 @@ jobs:
3937
- name: Setup
4038
uses: ./.github/actions/setup
4139

42-
- name: Build package
43-
run: |
44-
cd packages/react-native-executorch
45-
yarn prepare
40+
- name: Build all packages
41+
run: yarn workspaces foreach --all --parallel run prepare

packages/bare-resource-fetcher/package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22
"name": "@react-native-executorch/bare-resource-fetcher",
33
"version": "0.1.0",
44
"description": "Bare React Native resource fetcher for react-native-executorch",
5-
"main": "src/index.ts",
6-
"types": "src/index.ts",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
77
"exports": {
88
".": {
9-
"import": "./src/index.ts",
10-
"types": "./src/index.ts"
9+
"import": "./lib/index.js",
10+
"types": "./lib/index.d.ts"
1111
}
1212
},
13+
"files": [
14+
"lib"
15+
],
16+
"license": "MIT",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/software-mansion/react-native-executorch.git",
20+
"directory": "packages/bare-resource-fetcher"
21+
},
1322
"scripts": {
23+
"prepare": "tsc",
1424
"typecheck": "tsc --noEmit",
1525
"lint": "eslint \"**/*.{js,ts,tsx}\""
1626
},

packages/bare-resource-fetcher/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"rootDir": "src",
5+
"outDir": "lib",
6+
"declaration": true,
7+
"declarationMap": true,
58
"tsBuildInfoFile": "./lib/typescript/tsconfig.tsbuildinfo",
69
"composite": true,
710
"allowJs": false,

packages/expo-resource-fetcher/package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22
"name": "@react-native-executorch/expo-resource-fetcher",
33
"version": "0.1.0",
44
"description": "Expo resource fetcher for react-native-executorch",
5-
"main": "src/index.ts",
6-
"types": "src/index.ts",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
77
"exports": {
88
".": {
9-
"import": "./src/index.ts",
10-
"types": "./src/index.ts"
9+
"import": "./lib/index.js",
10+
"types": "./lib/index.d.ts"
1111
}
1212
},
13+
"files": [
14+
"lib"
15+
],
16+
"license": "MIT",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/software-mansion/react-native-executorch.git",
20+
"directory": "packages/expo-resource-fetcher"
21+
},
1322
"scripts": {
23+
"prepare": "tsc",
1424
"typecheck": "tsc --noEmit",
1525
"lint": "eslint \"**/*.{js,ts,tsx}\""
1626
},

packages/expo-resource-fetcher/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"rootDir": "src",
5+
"outDir": "lib",
6+
"declaration": true,
7+
"declarationMap": true,
58
"tsBuildInfoFile": "./lib/typescript/tsconfig.tsbuildinfo",
69
"composite": true,
710
"allowJs": false,

0 commit comments

Comments
 (0)