Skip to content

Commit e72750b

Browse files
committed
chore: add .npmignore and update package.json scripts for build process
1 parent bc0ec8d commit e72750b

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

.npmignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
examples/
2+
tests/
3+
docs/
4+
.github/
5+
.husky/
6+
*.test.js
7+
*.config.js
8+
*.config.mjs
9+
.editorconfig
10+
.gitattributes
11+
.lintstagedignore
12+
.nvmrc
13+
.prettierignore
14+
.prettierrc.json
15+
eslint.config.mjs
16+
vitest.config.js

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,27 @@ If the camera doesn’t start, click to allow autoplay. On Safari, prefer HTTPS
205205
- Legacy API (Source/Profile/Session/SessionDebugUI) removed from core.
206206
- Core focuses on ECS + plugins; renderer integrations live externally (e.g., arjs-plugin-threejs).
207207
- Import from the bundled library (ESM .mjs or CJS .js) as shown above.
208+
209+
## Development
210+
211+
### Building
212+
213+
The `dist` folder contains the built library files and is automatically generated.
214+
215+
**To build manually:**
216+
217+
```bash
218+
npm run build
219+
```
220+
221+
This will:
222+
223+
1. Generate TypeScript type definitions in `types/`
224+
2. Bundle the library files to `dist/`
225+
226+
**Note:** The `dist` folder is automatically built when:
227+
228+
- Running `npm pack` (via the `prepack` script)
229+
- Publishing to npm with `npm publish`
230+
231+
You don't need to commit the `dist` folder to git - it will be generated fresh during the publish process.

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"build-types": "tsc",
2222
"dev:vite": "vite",
2323
"build:vite": "vite build --config vite.config.mjs",
24+
"build": "npm run build-types && npm run build:vite",
25+
"prepack": "npm run build",
2426
"serve:vite": "vite preview",
2527
"test": "vitest",
2628
"test:watch": "vitest --watch",
@@ -57,5 +59,13 @@
5759
"*.{js,jsx,ts,tsx}": [
5860
"eslint --fix --cache"
5961
]
60-
}
62+
},
63+
"files": [
64+
"dist",
65+
"src",
66+
"plugins",
67+
"types",
68+
"README.md",
69+
"LICENSE"
70+
]
6171
}

0 commit comments

Comments
 (0)