Skip to content

Commit 58666ed

Browse files
committed
build: centralize build, exclude tests, ignore build artifacts
1 parent 9529190 commit 58666ed

7 files changed

Lines changed: 50 additions & 5 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ buck-out/
4141
fastlane/report.xml
4242
fastlane/Preview.html
4343
fastlane/screenshots
44+
45+
# TypeScript build artifacts
46+
*.tsbuildinfo
47+
**/lib/

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"lint": "eslint packages --ext .js,.jsx --ignore-pattern 'node_modules/**'",
6767
"lint:fix": "eslint packages --ext .js,.jsx --ignore-pattern 'node_modules/**' --fix",
6868
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
69-
"format:check": "prettier --check \"**/*.{js,jsx,json,md}\"",
69+
"format:check": "prettier --check \"**/*.{js,jsx,json,md}\"",
7070
"pretest": "npm run lint",
7171
"test": "npm run test:android && npm run test:ios",
7272
"test:ci": "JEST_JUNIT_OUTPUT=test-results/jest-android.xml npm run test:android --ci --testResultsProcessor='jest-junit' && JEST_JUNIT_OUTPUT=test-results/jest-ios.xml npm run test:ios --ci --testResultsProcessor='jest-junit'",
@@ -76,8 +76,8 @@
7676
"test:watch": "babel-node scripts/test --watch",
7777
"prepublishOnly": "npm run test",
7878
"prepare": "husky install",
79-
80-
"typecheck": "tsc --noEmit"
79+
"typecheck": "tsc --noEmit",
80+
"build": "tsc -b tsconfig.build.json"
8181
},
8282
"jest": {
8383
"testEnvironment": "node",

packages/react-native-version-check-expo/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "react-native-version-check-expo",
33
"version": "3.5.0",
44
"description": "A version checker for react-native expo applications",
5-
"main": "index.js",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
7+
"files": ["lib"],
68
"keywords": [
79
"react-native",
810
"expo",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2019",
4+
"module": "CommonJS",
5+
"declaration": true,
6+
"outDir": "lib",
7+
"rootDir": "src",
8+
"composite": true,
9+
"esModuleInterop": true,
10+
"skipLibCheck": true,
11+
"strict": false
12+
},
13+
"include": ["src/**/*"],
14+
"exclude": ["src/**/__tests__/**", "src/**/*.test.*"]
15+
}

packages/react-native-version-check/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "react-native-version-check",
33
"version": "3.5.0",
44
"description": "A version checker for react-native applications",
5-
"main": "index.js",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
7+
"files": ["lib"],
68
"keywords": [
79
"react-native",
810
"android",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2019",
4+
"module": "CommonJS",
5+
"declaration": true,
6+
"outDir": "lib",
7+
"rootDir": "src",
8+
"composite": true,
9+
"esModuleInterop": true,
10+
"skipLibCheck": true,
11+
"strict": false
12+
},
13+
"include": ["src/**/*"],
14+
"exclude": ["src/**/__tests__/**", "src/**/*.test.*"]
15+
}

tsconfig.build.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files": [],
3+
"references": [
4+
{ "path": "./packages/react-native-version-check/tsconfig.build.json" },
5+
{ "path": "./packages/react-native-version-check-expo/tsconfig.build.json" }
6+
]
7+
}

0 commit comments

Comments
 (0)