UIKit Refactor: Bower to NPM Migration, Partial JS Refactor, and New JS Build Pipeline#915
Conversation
…nger maintained jwerty library for very comparable Mousetrap library
…ariables being undefined.
…rs w/ required vars;
… how the viewport panel gets resized -- saving for a separate PR to limit scope of changes
…ned variables; refactor, clean up logic that opens/closes the active code panel
…ring panel animation to shift to using CSS vars + disable transitions temporarily when animating
…ic check to make sure typeahead's JS only gets initialized once
… components can pull in
…config that had been using Bower + script tags in the HTML
… JS logic that had been coming in from Bower + hard-coded HTML logic
… in other components
…esponding NPM dependencies
|
By the way @bmuenzenmeyer, before you bring it up, I’d really love to run all these JS files through Prettier — I just wanted to wait till the overall code changes here were understood and OK’d first so we aren’t looking at 10x the number of JS changes 😉 |
|
Love it. Will provide a more comprehensive review ASAP. |
|
@sghoweri this is knock-down drag-out awesome work. Thank you so much for putting so much time and energy into it! Am I testing this correctly: from your branch... |
|
Hmm 🤔 that sounds about right. I can take on look on my end once I’m back from lunch but off the top of my head I’m gonna guess that we might need to add webpack-cli as a dependency to our package.json file. Maybe I had that globally installed? |
…t to use locally installed version vs globally / temp version via npx
|
@bmuenzenmeyer - my latest push should fix that error you mentioned! Sorry about that -- totally missed that I hadn't wired that up to use a locally installed version of That part should now be good to go -- I'm now taking a quick peek at the merge conflicts on this. |
# Conflicts: # packages/uikit-workshop/dist/index.html # packages/uikit-workshop/dist/styleguide/bower_components/EventEmitter.min.js # packages/uikit-workshop/dist/styleguide/bower_components/hogan-3.0.2.min.js # packages/uikit-workshop/dist/styleguide/bower_components/jquery.min.js # packages/uikit-workshop/dist/styleguide/bower_components/jwerty.min.js # packages/uikit-workshop/dist/styleguide/bower_components/prism.min.js # packages/uikit-workshop/dist/styleguide/bower_components/script.min.js # packages/uikit-workshop/dist/styleguide/bower_components/typeahead.bundle.min.js # packages/uikit-workshop/dist/styleguide/js/patternlab-pattern.js # packages/uikit-workshop/dist/styleguide/js/patternlab-pattern.min.js # packages/uikit-workshop/dist/styleguide/js/patternlab-viewer.js # packages/uikit-workshop/dist/styleguide/js/patternlab-viewer.min.js # packages/uikit-workshop/gulpfile.js # packages/uikit-workshop/package.json # packages/uikit-workshop/src/html/index.html # packages/uikit-workshop/src/scripts/components/modal-styleguide.js
|
@bmuenzenmeyer OK - I've gone in and resolved the couple of merge conflicts to get this up to date with the latest changes on dev, plus adjusted a couple small things in the JS based on some additional testing I've done on this. There's a few CSS-related UI issues I'm aware of that I'll try to tackle this weekend (not yet sure if they're related to this PR itself or if they just existing issues -- if they're new it's almost certainly just a CleanCSS config to turn things down a little) but I'm pretty good about the JavaScript changes here all in all + how much better we'll be off once we start tackling some even more ambitious UI work 😉 |
|
@sghoweri this is building now and looks good on a quick glance on the 🚌 nice work man! 💃 🕺 🌮 🍺 🎺 🥁 🎸 |
|
@sghoweri I've been travelling so this is taking a bit longer. Appreciate the patience! |
|
@bmuenzenmeyer no worries - appreciate the update! |
bmuenzenmeyer
left a comment
There was a problem hiding this comment.
Amazing body of work Salem. Thanks for this.
| "role": "Developer" | ||
| }, | ||
| { | ||
| "name": "Salem Ghoweri", |
| </script> | ||
|
|
||
| <script id="pl-js-insert-{{ cacheBuster }}"> | ||
| /*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */ |
…-refactor-js UIKit Refactor: Bower to NPM Migration, Partial JS Refactor, and New JS Build Pipeline
Here’s the big one I’ve been waiting a long, long time to finally get into PL core 🎉
There’s a bunch of small, under the hood changes here (see commits for the specifics) but in a nutshell:
Lots more to come based off of this work but really just trying to start small to things keep things in working order + get us in a good spot to start working on some much more abitious work on the UI side of things!
Would love any help I can get to further test this out to make sure all the kinks and gotchas have been ironed out!
CC @pattern-lab/devs