design-system-components icon indicating copy to clipboard operation
design-system-components copied to clipboard

Slow SASS watch scripts

Open azerella opened this issue 6 years ago • 2 comments

Feature Request

  • [x] I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I’ve read and agree to the Code of Conduct.
  • [x] I’ve searched for any related issues and avoided creating a duplicate issue.
  • [x] I've searched the community forums to check for related issues or feature requests

As found by @sukhrajghuman it appears that when testing things locally, the sass watch scripts are very slow.

For example with the core component, the watch script watch:sass: https://github.com/govau/design-system-components/blob/master/packages/core/package.json#L35 runs the entire build script which also bundles the js. We want to update the watch and build scripts to be more isolated.

This issue also involve updating the developer docs: https://designsystem.gov.au/get-started/development-environment/

azerella avatar Feb 07 '19 04:02 azerella

After a bit of digging it seems that in order to solve this easily we need to update the following scripts for each component.

https://github.com/govau/design-system-components/blob/1993bdc00874e79a24380a1fb0a44bf4057431e7/packages/buttons/package.json#L35

by swapping build -> build:js which will compile the sass quicker than the entire build script. This isn't ideal, we need to look at refactoring the helper.js properly at a later time. For now though, this should help a little: https://github.com/govau/design-system-components/pull/626

azerella avatar Feb 14 '19 06:02 azerella

I think we will icebox this until we are ready to split up and refactor the helper.js script that handles our build process. We can't achieve this issue easily without refactoring said script.

azerella avatar Feb 14 '19 22:02 azerella