Skip to content
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

chore: improve build responsiveness OLD #2972

Closed
wants to merge 3 commits into from

Conversation

vladitasev
Copy link
Contributor

@vladitasev vladitasev commented Mar 19, 2021

This change fixes 2 bugs of the yarn start command:

  • Newly created .css files are not usable unless yarn start is killed and re-run. The reason is a known postcss bug in --watch mode: newly created files are not detected, only existing files are re-compiled (--watch mode doesn't pick up new files  postcss/postcss-cli#161).
  • Newly added entries to messagebundle.properties are not automatically available in i18n-defaults.js and if you try to use them - the bundle breaks. This is due to the fact that there is no watch mode for i18n.

Changes:

  • Use chokidar for watching the themes/ directory instead of postcss --watch. Note: this is only necessary for component css files. Themes css files are fine with postcss --watch, because new ones are never created.
  • Create a watch task for i18n too: it only needs to watch the messagebundle.properties file and regenerate the defaults file (not the .jsons).

After the change it's possible to create a new component with all needed files and resources without restarting yarn start.

fifoosid
fifoosid previously approved these changes Mar 19, 2021
@vladitasev vladitasev changed the title chore: improve build responsiveness chore: improve build responsiveness OLD Mar 23, 2021
@vladitasev
Copy link
Contributor Author

Closed in favor of: #2992

@vladitasev vladitasev closed this Mar 23, 2021
@ilhan007 ilhan007 deleted the improve-responsiveness branch July 28, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants