Skip to content

Commit cd1979f

Browse files
committed
chore: add preinstall script
- Bump package version from 0.1.1 to 0.1.2 in package-lock.json. - Add a preinstall script to build the project and types before installation. - Remove obsolete type definition files for plugin, matrix utilities, and worker. - linked issue Exclude sourcemap (.map) files from published npm package to reduce package size - Fixes #12
1 parent 7cdb5b3 commit cd1979f

19 files changed

+22
-5115
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ pids
1818
# Directory for instrumented libs generated by jscoverage/JSCover
1919
lib-cov
2020

21+
# Sourcemap files
22+
dist/**/*.map
23+
types/**/*.map
24+
dist/*
25+
types/*
26+
2127
# Coverage directory used by tools like istanbul
2228
coverage
2329
*.lcov

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ test/
1818
coverage/
1919
.nyc_output/
2020
*.log
21+
dist/*
22+
dist/**/*.map
23+
*.map
24+
25+
types/*
2126

2227
# configs (opzionale)
2328
.eslintrc*

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,12 @@ The example demonstrates:
307307
- No detections:
308308
- Confirm camera started, correct marker pattern, sufficient lighting
309309
- Adjust `minConfidence` to reduce/raise filtering
310+
310311
- Check `plugin.version` (if 'unknown', ensure build-time define is configured)
312+
313+
## Build & Publishing Notes
314+
315+
- Sourcemap files (`.map`) generated in `dist/` and `types/` are excluded from the repository and the npm package to reduce package size and avoid shipping debug artifacts.
316+
- See `.gitignore` and `.npmignore` for details.
317+
- When installing the package with `npm install`, the libraries are automatically built thanks to the `preinstall` script in `package.json`.
318+
- This ensures all required files are always generated and ready to use.

dist/arjs-plugin-artoolkit.es.js

Lines changed: 0 additions & 381 deletions
This file was deleted.

dist/arjs-plugin-artoolkit.es.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/assets/ARToolkit-Q5ek8CTR.js

Lines changed: 0 additions & 4242 deletions
This file was deleted.

dist/assets/ARToolkit-Q5ek8CTR.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/assets/worker-C6Ps5-k4.js

Lines changed: 0 additions & 212 deletions
This file was deleted.

dist/assets/worker-C6Ps5-k4.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)