-
Notifications
You must be signed in to change notification settings - Fork 9
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
90 basic webpack #334
Merged
Merged
90 basic webpack #334
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* master: Add linear gradient background mixin (#304) Tweaking modular-spacing mixin to be more user friendly (#309) 120 Skiplinks (#303) 72 main nav (#264) Update _input.scss (#301) Update README.md (#302) 298-change "sticky-footer" mixin to target <footer> selector (#299) Set base font size for each breakpoint (#295) doc: add period (#294) 151 global footer tweaks (#293) Small bugfix for mobile. (#291) 282: Fix modular-spacing mixins and variables (#290) # Conflicts: # core/js/decanter.js - moved code into core/js/components/main-nav/main-nav.js
…hem after the build
… are smaller than specified limit
…styleguide whenever the styleguide is built
… build exist before the build
…is branch (will delete when the PR is approved)
… temporarily renamed Gruntfile-HIDE.js
Oh. Looks like we used grunt to build the styleguide's custom css. Oy. 🙃 |
sherakama
reviewed
Mar 22, 2019
* src & dist directory * Working watch on all JS, SASS, Twig, and JSON * Adds working map files * Restores some Grunt tasks and replaces what now has npm scripts with a grunt run npm script instead. * Moved assets to kss-assets where they should have been in the first place * Changed up the npm scripts so they don't call everything all the time. Added a new dev function to do that. * Compiles the KSS theme as well.
Merge branch '90-basic-webpack' of github.com:SU-SWS/decanter into 90-basic-webpack * '90-basic-webpack' of github.com:SU-SWS/decanter: Replace watch plugin with new watch plugin. fixup.
Merge branch '90-basic-webpack' of github.com:SU-SWS/decanter into 90-basic-webpack * '90-basic-webpack' of github.com:SU-SWS/decanter: Replace watch plugin with new watch plugin. fixup.
get directories from package.json; the styleguide doesn't need assets.json
use filemanager-webpack-plugin to: - delete all generated assets (including css) prior to building - copy generated assets to the styleguide after building
@sherakama I've committed all the changes we discussed today:
Thanks again for your help on this PR in general, and today in particular. I look forward to discussing tomorrow. |
* linters: Add linters.
* Fixup! paths. * kss/builder/decanter/kss-assets/css/ * Added the webpack dev server. * Added copying of the templates directory from src to dist. * Removed templates from dist. * suppress webpack warning about mode not being set * Asset handling. * eslint needs to look in core/src
sherakama
approved these changes
Mar 27, 2019
yvonnetangsu
added a commit
that referenced
this pull request
Jun 11, 2019
* master: (44 commits) Set up color maps for Decanter and refactor main nav colors to refer to color maps (#420) Move PR template (#416) Fix skiplink target so it doesn't take up space and cause overflow (#415) Release 5.0.1 (#417) Fix CSS grid gaps not displaying on Edge issue and other minor grid related issues (#413) More link fixup (#388) forgot to rebuild .js after final lint fixes (#387) add openNav, closeNav, openSubnav, closeSubnav events (#379) Fix main nav color variants and work with new linting rules (#380) add favicon to style guide (#377) Adjust linters. (#370) update readme.md to match Scott's intro on homepage.md (#371) Update README.md (#369) move the images we need for the styleguide's homepage into kss-assets (#368) Update README.md (#367) Update UPGRADE.md (#363) package.locl.json file is back (#366) Added more to changelog (#364) Update homepage.md (#362) 90 basic webpack (#334) ... # Conflicts: # core/scss/components/index.scss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
READY FOR REVIEW
Have at it, folks.
Summary
Needed By (Date)
Urgency
Noteworthy changes
nvm install 10.15.1
.core/dist/css
andcore/dist/js
, respectively. (They used to live incore/css
andcore/js
.).scss
are now inlined in the generated.css
as data..twig
files are (mostly) merely placeholders, and therefore, IMO, are not technically part of core. I have placed those images in a new root directory,img-placeholders
. All images in that directory are copied tostyleguide/img
whenever you (re-)build the styleguide. Templates that refer to placeholders now refer to/img/...
(absolute vs. relative url). (The one exception is the search icon in the search component. I propose the search icon be implemented via scss so it can be inlined / bundled with core.)Known Issues
browserSync
.npm run watch
will rebuild the.css
and / or.js
when corresponding source files change; however, you have to manually refresh your browser to load them. I believe I can implement this with webpack's hot module replacement, but that will take some time to configure properly. I would like to address that in separate PR..twig
or.json
files, so you need to manually runnpm run styleguide
and refresh your browser when those files change. I don't think there's a way to implement this purely with npm (webpack is not involved in kss generation). Do we need to retain grunt for this?grunt deploy
. I haven't found an npm equivalent for grunt-deploy-site. Maybe we need to retain grunt for that one task???Steps to Test
WARNING: This PR changes (almost) every build tool we use, including the version of node / npm. It also changes where output files are stored (from
core
tocore/dist
). It is challenging to switch between this branch and any other branch in the repo. You may want to clone this branch to a separate local repo on your machine to avoid the overhead of switching back and forth.One time only
nvm install 10.15.1
.If you're testing in a pre-existing local repo:
rm -rf node_modules
to wipe out all tools used in the grunt-based build envnpm cache clean --force
to really wipe out everythingrm -rf styleguide
to delete the assets generated by webpack (just for completeness)Once you're In a clean repo (either a new one, or one you cleaned following the preceding steps):
nvm use
to use the version of npm specified in.nvmrc
, i.e. 10.15.1npm install
to install the webpack toolsTo build decanter and the styleguide:
npm run build
to generate the dev version of css and js, and build the styleguide ORnpm run dist
to generate the prod version of css and js, and build the styleguidenpm run styleguide
to generate the styleguide NB this does not build the cssIf you decided to do this in the same local repo you use for other decanter development and you want to switch to a different branch
Before you switch to a different branch you should:
rm -rf node_modules
to wipe out all tools used in this branchnpm cache clean --force
to really wipe out everythingrm -rf styleguide
to delete the assets generated by webpack (just for completeness)nvm use
to use the version of npm specified in.nvmrc
, i.e. 9.10.1npm install
to re-install the grunt toolsAffected Projects or Products
core/css/
andcore/js/
tocore/dist/css
andcore/dist/js
. All products built on Decanter that load the pre-built assets will need to look in the new directories.Associated Issues and/or People
See Also