-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add src/index.dev.js
and src/index.dev.js
(app entrypoints)
#325
Merged
Conversation
This file contains 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
- move `src/app/main.js` into `src/index.prod.js` - move `src/app/dev/index.js` into `src/index.dev.js` - update gulp task `browserify:app` accordingly - move `import ApplicationService from 'services/application';` on top of `src/app/api.js` to avoid a circular dependency caused by early inclusion of `src/index.dev.js` compared to `src/app /dev/index.js` in the app execution flow - move `import "regenerator-runtime";` into `src/deprecated.js` - new file `src/globals.js` (ref: `window.g3wsdk`) - new constant value `FONT_AWESOME_ICONS` within `src/app/constant.js` - improve documentation for `src/app/constant.js` (ref: `@type`)
Raruto
added
docs
Improvements or additions to documentation
config
Anything related to configuration files
refactoring
Anything which could result in a API change
labels
Feb 9, 2023
- remove deprecated event listener `ProjectsRegistry~createProject` - remove deprecated event listener `ProjectsRegistry~setCurrentProject` - add new event listener `ApplicationService~initConfig` in order to override `initConfig.group.vendorkeys` and `initConfig.group.plugins` variables while developing
Raruto
changed the title
Add
Add Feb 9, 2023
src/index.dev.js
and src/index.dev.js
(app entrypoints)src/index.dev.js
and src/index.dev.js
(app.min.js entrypoints)
Raruto
changed the title
Add
Add Feb 9, 2023
src/index.dev.js
and src/index.dev.js
(app.min.js entrypoints)src/index.dev.js
and src/index.dev.js
(app entrypoints)
Raruto
commented
Mar 7, 2023
@volterra79 same as #309, when you have a some time 🧭, let me know if we are ready to merge it. |
…ld overrides/static contain app.min.js that overrides static/client/js/app.min.js file
volterra79
approved these changes
Mar 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
config
Anything related to configuration files
docs
Improvements or additions to documentation
refactoring
Anything which could result in a API change
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.
Motivation
Reduce nesting level of these files and make it more clear which is the entry point for the development or the production environment:
Before
After
List of changes
src/app/main.js
intosrc/index.prod.js
src/app/dev/index.js
intosrc/index.dev.js
browserify:app
accordinglydevConfig()
withinconfig.template.js
ProjectsRegistry~createProject
withinconfig.template.js
(ref: #320)ProjectsRegistry~setCurrentProject
withinconfig.template.js
(ref: #320)ApplicationService~initConfig
in order to overrideinitConfig.group.vendorkeys
andinitConfig.group.plugins
variables while developingwindow.g3wsdk.info()
in order to automatically print some debug info within developer console (ref: #124)Additional notes
move the following import at the top of
src/app/api.js
in order to avoid a circular dependency caused by early inclusion ofsrc/index.dev.js
compared tosrc/app/dev/index.js
in the app execution flowmove the following import from
src/app/main.js
intosrc/deprecated.js
(related to: #44)move the following import from
src/app/main.js
into a new filesrc/globals.js
(related to #71)add a new constant
FONT_AWESOME_ICONS
withinsrc/app/constant.js
(just to reduce the filesize ofindex.prod.js
)add documentation
@type
withinsrc/app/constant.js
How to test
devConfig
section within yourconfig.js
npm run dev
in order to test dev entrypoint (refindex.dev.js
)npm run build
in order to test production entrypoint (refindex.prod.js
)What to test
in the development environment check that the following variables are set correctly
initConfig.group.vendorkeys
(and the related localG3W_KEYS
overrides are loaded correctly)initConfig.group.plugins
(and the related locally developedG3W_PLUGINS
are loaded correctly)in the production environment make sure the following file is not included in the generated bundle:
config.js
in both environments check (as far as possible) that no new circular references have been created (ie: static imports returning
undefined
objects)Closes: #89
Closes: #124