Skip to content

Commit fc9856c

Browse files
fix packaging for npm to support expo
1 parent c0fc799 commit fc9856c

File tree

5 files changed

+30
-19
lines changed

5 files changed

+30
-19
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// @generated by expo-module-scripts
2+
module.exports = require('expo-module-scripts/eslintrc.base.js');

.github/workflows/publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
- name: Build package
3232
run: npm run build
3333

34+
- name: Build plugin
35+
run: npm run build:plugin
36+
3437
publish:
3538
name: Publish Package
3639
runs-on: ubuntu-latest
@@ -55,6 +58,15 @@ jobs:
5558
- name: Build package
5659
run: npm run build
5760

61+
- name: Build plugin
62+
run: npm run build:plugin
63+
64+
- name: Prepare for publish
65+
run: npm run prepublishOnly
66+
67+
- name: Verify package contents
68+
run: npm pack --dry-run
69+
5870
- name: Publish to NPM
5971
run: npm publish
6072
env:

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jest.config.*
2020
# Build and development files
2121
.expo/
2222
.gradle/
23-
build/
2423
node_modules/
2524
.env*
2625

26+
# Keep build/ directory - it contains compiled TypeScript output needed for the package
27+
# build/ directory is INCLUDED
28+
2729
# IDE and editor files
2830
.vscode/
2931
.idea/

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
{
22
"name": "expo-streamer",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Realtime Audio Streaming for Expo",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",
77
"source": "src/index.ts",
8+
"files": [
9+
"build",
10+
"android/src/main",
11+
"android/build.gradle",
12+
"ios/*.swift",
13+
"ios/*.podspec",
14+
"app.plugin.js",
15+
"expo-module.config.json",
16+
"plugin/build"
17+
],
818
"scripts": {
919
"build": "tsc --project .",
1020
"build:plugin": "tsc --project ./plugin",

tsconfig.json

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,8 @@
22
{
33
"extends": "expo-module-scripts/tsconfig.base",
44
"compilerOptions": {
5-
"outDir": "./build",
6-
"target": "ES2018",
7-
"lib": ["ES2018", "DOM"],
8-
"module": "ES2020",
9-
"strict": true,
10-
"noImplicitAny": true,
11-
"strictNullChecks": true,
12-
"strictFunctionTypes": true,
13-
"noImplicitReturns": true,
14-
"noImplicitThis": true,
15-
"declaration": true,
16-
"declarationMap": true,
17-
"sourceMap": true,
18-
"skipLibCheck": true,
19-
"esModuleInterop": true,
20-
"allowSyntheticDefaultImports": true
5+
"outDir": "./build"
216
},
227
"include": ["./src"],
23-
"exclude": ["**/__mocks__/*", "**/__tests__/*", "build", "node_modules"]
8+
"exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__rsc_tests__/*"]
249
}

0 commit comments

Comments
 (0)