File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,21 @@ export const parseLibraryReference =
5555 if ( useExternalP5Sound ) {
5656 console . log ( 'Cloning separate p5.sound repo' ) ;
5757
58- // Clone p5.sound.js
59- await cloneLibraryRepo (
60- localSoundPath ,
61- 'https://github.com/processing/p5.sound.js.git' ,
62- 'main'
63- ) ;
58+ // Clone or copy p5.sound.js
59+ if ( process . env . LOCAL_P5_SOUND_PATH ) {
60+ console . log ( `Copying local p5.sound.js from ${ process . env . LOCAL_P5_SOUND_PATH } ` ) ;
61+ await fs . cp ( process . env . LOCAL_P5_SOUND_PATH , localSoundPath , {
62+ recursive : true ,
63+ // Ignore node_modules and .git to speed up the copy
64+ filter : ( src ) => ! src . includes ( 'node_modules' ) && ! src . includes ( '.git' )
65+ } ) ;
66+ } else {
67+ await cloneLibraryRepo (
68+ localSoundPath ,
69+ 'https://github.com/processing/p5.sound.js.git' ,
70+ 'main'
71+ ) ;
72+ }
6473 await saveYuidocOutput ( 'p5.sound.js' , 'data-sound' ) ;
6574 const soundData = await getYuidocOutput ( 'data-sound' ) ;
6675 if ( ! soundData ) throw new Error ( 'Error generating p5.sound reference data!' ) ;
You can’t perform that action at this time.
0 commit comments