File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 73
73
"test-e2e" : " node test/e2e/puppeteer.js" ,
74
74
"test-e2e-cov" : " node test/e2e/check-coverage.js" ,
75
75
"test-treeshake" : " rollup -c test/rollup.treeshake.config.js" ,
76
- "make-screenshot" : " node test/e2e/puppeteer.js --make"
76
+ "make-screenshot" : " node test/e2e/puppeteer.js --make" ,
77
+ "prepublishOnly" : " node utils/prepublish.js"
77
78
},
78
79
"keywords" : [
79
80
" three" ,
Original file line number Diff line number Diff line change
1
+ const fs = require ( 'fs' ) ;
2
+ const path = require ( 'path' ) ;
3
+ const glob = require ( 'glob' ) ;
4
+
5
+ const paths = glob . sync ( path . resolve ( __dirname , '../examples/jsm/**/*.js' ) ) ;
6
+ paths . forEach ( p => {
7
+
8
+ const content = fs . readFileSync ( p , { encoding : 'utf8' } ) ;
9
+ const bareContent = content . replace ( / ( \. \. \/ ) { 2 , } b u i l d \/ t h r e e .m o d u l e .j s / g, 'three' ) ;
10
+ fs . writeFileSync ( p , bareContent , { encoding : 'utf8' } ) ;
11
+
12
+ } ) ;
You can’t perform that action at this time.
0 commit comments