Skip to content

Conversation

@sghoweri
Copy link
Contributor

  • Swaps out compiling PL's Sass from using Ruby Sass to the much faster (and more easily supported) Gulp Sass (which uses node-sass under the hood)
  • Adds Gulp Clean CSS to minify CSS assets generated
  • Adds a few helpful NPM scripts to simplify process of setting up and building UIKit's assets
  • Updates all UIkit dependencies to latest supported versions (prep work for some much larger and more exciting changes a-brewin 😄)
  • Adding in a freshly compiled UIkit build with the latest changes folded in

@sghoweri sghoweri changed the title Upgrade PL UIKit Build Tools Chore: Upgrade PL UIKit Build Tools Jul 22, 2018
sghoweri pushed a commit to sghoweri/patternlab-node that referenced this pull request Jul 23, 2018
@bmuenzenmeyer bmuenzenmeyer self-requested a review July 24, 2018 15:58
@bmuenzenmeyer
Copy link
Member

@sghoweri this is great - will check it out soon!

@bmuenzenmeyer bmuenzenmeyer self-assigned this Jul 24, 2018
)
)
.pipe(
cleanCSS({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could argue that removing whitespace from the output reduces comprehension. @bradfrost do you have thoughts on this? See the resulting diff: https://github.com/pattern-lab/patternlab-node/pull/904/files#diff-c44923a0878fc1c446276a7c21a7666d

Copy link
Contributor Author

@sghoweri sghoweri Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source maps can definitely help with the readability of the bundled assets shipping in PL's UIKit (without taking a big performance hit in the process).

I'd personally recommend two things:

  1. That we include a --prod config flag that the build checks against when compiling so we can get the best of both worlds: easier to read code when doing dev work (esp. local dev work), can shave off about 28.4KB of CSS when consumers are shipping / using PL's UI in production + enough flexibility to keep everyone happy

  2. We remove precompiled assets like the dist folder from Git so PL users can more easily customize when consuming (I'm still in support of including this dist folder when publishing to NPM though out of convenience!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ We'd also get the added bonus of fewer dist-folder specific merge conflicts....
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye. the inclusion was definitely born out of a need for direct npm install without having to invest in a lifecycle hook. I think I am more comfortable with how to do that now, so a prepublish step of some sort I think would be great

"description": "Front-end assets and templates for the default Pattern Lab workshop view",
"main": "gulpfile.js",
"scripts": {},
"scripts": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love this!

Copy link
Member

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this work Salem. It's a good, incremental improvement to the codebase.

I really like the introduction of the npm scripts. I understand we rely on adding assets into dist/ which I dont want to relitigate right now.

This PR caused me to question the current CONTRIBUTING.md guidelines, which state to run gulp --copy-dist=../../../public

My guess is that was historic cruft we refactored out and forgot to remove, along with the actual gulp logic this flag entails.

I've added #913 to address this.

@bmuenzenmeyer bmuenzenmeyer merged commit 15d9a54 into pattern-lab:dev Jul 27, 2018
antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
…-build-tools

Chore: Upgrade PL UIKit Build Tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants