[GH-1] update build script for browser folder to use a relative import statement for script base folder - #2
Merged
Conversation
Updated the build script to check if the `import` line for a file is referencing the editor scripts base package, and when there is a match the `import` statement will be changed from: ```js from "@phaserjs/editor-scripts-base.js"; ``` to ```js from "../../phaserjs_editor_scripts_base/index.js"; ``` This fix has a few limitations: * if any other npm packages are added to this library, this change will not fix those * the generated `phaserjs_editor_scripts_quick` needs to be placed at the root of the phaser editor project, next to the original location of the `phaserjs_editor_scripts_base` folder. Signed-off-by: Scott Westover <scottwestover2006@gmail.com>
Re-ran the `build-browser.js` script so files use the updated import path for the `@phaserjs/editor-scripts-base.js` npm package reference. Signed-off-by: Scott Westover <scottwestover2006@gmail.com>
Updated the build script for the generated browser folder
updated readme to include a note about the placement of the generated browser folder for vanilla js projects. Signed-off-by: Scott Westover <scottwestover2006@gmail.com>
updated readme
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated the build script to check if the
importline for a file is referencing the editor scripts base package, and when there is a match theimportstatement will be changed from:to
This fix has a few limitations:
phaserjs_editor_scripts_quickneeds to be placed next to thephaserjs_editor_scripts_basefolder.Added a note to the readme file about the placement of the folder.
Most of the file changes in the MR are the newly generated
browserfiles that use the updatedimportstatement.Relates to #1