File tree Expand file tree Collapse file tree 4 files changed +38
-4
lines changed
Expand file tree Collapse file tree 4 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 2323 node-version : ' 22'
2424 cache : ' npm'
2525 cache-dependency-path : ' ./package.json'
26+
27+ - name : Install dependencies
28+ run : npm install
2629
2730 - name : Publish to npm (stable branch)
2831 if : startsWith(github.ref_name, 'release/stable')
Original file line number Diff line number Diff line change 11node_modules
2- packahe-lock.json
2+ packahe-lock.json
3+ dist
Original file line number Diff line number Diff line change 33 "version" : " 1.0.0" ,
44 "description" : " KHR_animation_pointer support for three.js" ,
55 "type" : " module" ,
6- "main" : " src/index.js" ,
6+ "main" : " dist/three-animation-pointer.umd.js" ,
7+ "module" : " dist/three-animation-pointer.es.js" ,
78 "types" : " types/index.d.ts" ,
89 "exports" : {
910 "." : {
10- "import" : " ./src/index.js"
11+ "types" : " ./types/index.d.ts" ,
12+ "import" : " ./dist/three-animation-pointer.es.js" ,
13+ "require" : " ./dist/three-animation-pointer.umd.js"
1114 }
1215 },
1316 "files" : [
1417 " src" ,
18+ " dist" ,
1519 " types" ,
1620 " package.json" ,
1721 " README.md" ,
2731 "url" : " https://github.com/needle-tools/three-animation-pointer"
2832 },
2933 "license" : " MIT" ,
34+ "scripts" : {
35+ "build" : " vite build" ,
36+ "prepublishOnly" : " npm run build"
37+ },
3038 "devDependencies" : {
31- "three" : " >=0.179.1"
39+ "three" : " >=0.179.1" ,
40+ "vite" : " ^5.0.0"
3241 },
3342 "peerDependencies" : {
3443 "three" : " >=0.165.0"
Original file line number Diff line number Diff line change 1+ import { defineConfig } from 'vite' ;
2+
3+ export default defineConfig ( {
4+ build : {
5+ lib : {
6+ entry : 'src/index.js' ,
7+ name : 'ThreeAnimationPointer' ,
8+ fileName : ( format ) => `three-animation-pointer.${ format } .js` ,
9+ formats : [ 'es' , 'umd' ]
10+ } ,
11+ rollupOptions : {
12+ external : [ 'three' ] ,
13+ output : {
14+ globals : {
15+ 'three' : 'THREE'
16+ }
17+ }
18+ } ,
19+ outDir : 'dist'
20+ }
21+ } ) ;
You can’t perform that action at this time.
0 commit comments