Problem/Motivation
It takes a long time to run right now... figure out how to speed up.
Steps to reproduce
Proposed resolution
Perhaps not include storybook when building for xb-demo as it's not needed
Remaining tasks
Figure out improvement, change build rules, test, and commit
User interface changes
Faster when building :)
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | sdds-npm-run-dist-storybook.png | 57.31 KB | kristen pol |
Issue fork demo_design_system-3514472
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kristen polTry just using
npm run distinstead ofnpm run buildas that won't include storybook stuffComment #3
kristen polTo test this, need to go through the normal build process here:
https://www.drupal.org/community-initiatives/starshot-demo-design-system...
but using
npm run distinstead ofnpm run buildand see what happens on the settings page since that refers to storybook
Comment #4
kristen polworking on this
Comment #5
kristen polFor starshot_demo directory:
npm run distnpm run buildso saves almost a minute
and the theme handles the lack of storybook fine... settings end up looking like:
Comment #6
kristen polFor the base theme:
npm run distnpm run buildComment #8
kristen polDiscussing with Lionel and the real performance improvement for xb-demo is to include all the built artifacts (dist directory) so that
npm run dist (or build)doesn't need to be run at all.The
npm installprocess is slow too... probably because it's grabbing lots of dependencies for storybook (most of which go away in the latest civictheme version but we aren't using that yet).Comment #9
kristen polThis is what's in .gitignore:
so we probably would need to add more than just the
distdirectory, perhaps all of:Another idea is that we create an xb-demo directory that has a copy of these and the xb-demo script, moves those copies into place during install rather than running
npm installandnpm run buildThat way, the
.gitignoreremains the same and, if you are installing on your local with for development, then you just do the normal process. But, xb-dev has a quick way to get the built assets.Maybe @phenaproxima has thoughts on this?
Comment #11
kristen polFrom @phenaproxima:
Ideally, you’d do what XB does, and just compile the assets and add them to release tags, and rm -rf them in a “back to dev” commit. Thoughts?This is an interesting approach so we will probably do that :D
Just want to see if there's anything else that needs to be in a new release first.
Comment #12
kristen poladd parent
Comment #13
kristen polThink we need these for base theme:
and same for subtheme:
but I'm not sure about these yet:
Comment #14
phenaproximaMaybe add them, if in doubt; they can always be removed in subsequent releases if they're not ultimately needed.
Comment #15
kristen polI've tested with just:
added for both themes and it is working fine.
I'll merge and test again.
Comment #18
kristen polMerged... I'll test again before creating a release
Comment #19
kristen polTemplates with XB are unhappy with the base theme so I'm going to get rid of those for now since we aren't using them
Comment #22
kristen polIncluded in #3514765: Create SDDS 1.0.1 release
Comment #23
kristen polComment #24
kristen polSpeed of