1+ const fs = require ( "fs" ) ;
12const url = require ( "url" ) ;
23const path = require ( "path" ) ;
34const server = require ( "./server" ) ;
@@ -31,6 +32,9 @@ module.exports = async (job, settings, { params = {} }) => {
3132 if ( ! job . actions . prerender ) job . actions . prerender = [ ] ;
3233 if ( ! job . actions . postrender ) job . actions . postrender = [ ] ;
3334
35+ // copy recursively all files from the lib folder to the job.workpath
36+ fs . cpSync ( path . join ( __dirname , ".." , "lib" ) , path . join ( job . workpath , "lib" ) , { recursive : true } ) ;
37+
3438 // add lottie prerender finish script
3539 settings . logger . log ( `[${ job . uid } ] [action-lottie] adding lottie prerender finish script` ) ;
3640 job . actions . postrender . unshift ( {
@@ -61,8 +65,6 @@ module.exports = async (job, settings, { params = {} }) => {
6165 } ) ,
6266 } ) ;
6367
64- console . log ( preparedLottieSettings ) ;
65-
6668 // // ln -s (Footage) folder to the temp workdir
6769 // fs.symlinkSync(
6870 // path.resolve(path.join(__dirname, "..", "scripts", "forward")),
@@ -75,7 +77,7 @@ module.exports = async (job, settings, { params = {} }) => {
7577 job . assets . push ( createScript ( {
7678 composition : job . template . composition ,
7779 logPath : path . join ( job . workpath , "lottie.log" ) ,
78- bodymovinPath : path . join ( __dirname , ".." , "lib" , "jsx" ) ,
80+ bodymovinPath : path . join ( job . workpath , "lib" , "jsx" ) ,
7981 serverUrl : `localhost:${ port } ` ,
8082 outputPath : path . join ( job . workpath , '--banner--' ) , // will be placed in the FolderName of the provided path (/uid/banner/)
8183 lottiePaths,
0 commit comments