-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Issue by activescott
Sunday Mar 18, 2018 at 10:58 GMT
Originally opened as https://github.com/forkdelta/forkdelta.github.io/pull/131
NOTE: I suggest we ignore the content below here and use the PR for the latest information at #35
This definitely needs a lot of testing but appears to be working.
To test just checkout the branch and run as usual.
To re-build js/main-bundle.js from the modules run npm run build from the root directory.
To unpack the modules from the old minified code again
- Extract the huge array of modules embedded inside of
js/main-unminified.jsand put it inscripts/_old_main_packed_modules.jsnote: If you look carefully this whole ~150K line array is an argument to a function, so I can't think of a clean way to grab it from the script without more sophisticated (and error pone) parsing. Alternatively, if this branch is going to live for more than a week or so we could just adjustjs/main-unminified.jsto pop that array out into a field in the file and then I could safely get at it from the script. Since this is a one-time thing though I think it is just as easy to just manually extract it. - From
scripts, runnode unpack_modules.js(it unpacks fromscripts/_old_main_packed_modules.js) - In the generated
scripts/unpacked_modules/main.jsthere is onerequire('../server/utility.js')that needs converted torequire('./server/utility.js') cp -r scripts/unpacked_modules/* js/- Then re-build
js/main-bundle.jsby runningnpm run buildfrom the root directory
This is a one-time thing so we shouldn't need the script or to re-run this unless we need it for some merges before this gets merged.
- We can test this as is for now, but before merging we need to regenerate the modules using the script (as described above) or manually pull in commits after this branch was pulled from master like this one as due to the abandonment of in main-unminified.js in this branch git won't be able to auto merge.
activescott included the following code: https://github.com/forkdelta/forkdelta.github.io/pull/131/commits
Metadata
Metadata
Assignees
Labels
No labels