chore: improve build responsiveness OLD #2972
Closed
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.
This change fixes 2 bugs of the
yarn start
command:.css
files are not usable unlessyarn start
is killed and re-run. The reason is a knownpostcss
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).messagebundle.properties
are not automatically available ini18n-defaults.js
and if you try to use them - the bundle breaks. This is due to the fact that there is no watch mode fori18n
.Changes:
chokidar
for watching thethemes/
directory instead ofpostcss --watch
. Note: this is only necessary for component css files. Themes css files are fine withpostcss --watch
, because new ones are never created.watch
task fori18n
too: it only needs to watch themessagebundle.properties
file and regenerate the defaults file (not the.json
s).After the change it's possible to create a new component with all needed files and resources without restarting
yarn start
.