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

Improve npm run watch with flags #478

Merged
merged 2 commits into from
Mar 17, 2020
Merged

Improve npm run watch with flags #478

merged 2 commits into from
Mar 17, 2020

Conversation

EvanHerman
Copy link
Contributor

@EvanHerman EvanHerman commented Mar 10, 2020

npm run watch will now only generate standard .css files. This means that, when developing with Go, you will need SCRIPT_DEBUG defined and set to true.
define( 'SCRIPT_DEBUG', true );

You can watch and generate .min.css, -rtl.css and -rtl.min.css files by adding flags to the npm run watch command.

Generate standard CSS assets

npm run watch

Generate standard and minified CSS assets

npm run watch -- --min

Generate standard and RTL CSS assets

npm run watch -- --rtl

Generate standard, RTL, minified and minified RTL CSS assets

npm run watch -- --min,rtl

But why split it this way?

By splitting the watch command this way we have essentially decreased the time it takes to regenerate CSS assets by 50%, so development should be faster.

Previous watch run time: 2.7s
Current watch run time: 1.34s

@EvanHerman EvanHerman added the [Type] Enhancement Something new that adds functionality label Mar 10, 2020
@EvanHerman EvanHerman self-assigned this Mar 10, 2020
@EvanHerman EvanHerman added this to the Next Release milestone Mar 10, 2020
@richtabor
Copy link
Contributor

I've updated this to make them similar to our development scripts on CoBlocks, where setup installs/sets up and start runs our development config.

@richtabor richtabor merged commit 77ede4c into master Mar 17, 2020
@richtabor richtabor deleted the improve-npm-run-watch branch March 17, 2020 18:59
@EvanHerman EvanHerman modified the milestones: Next Release, 1.2.5 Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement Something new that adds functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants