-
Notifications
You must be signed in to change notification settings - Fork 96
[WNMGDS-286] Remove deprecated items #635
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
Merged
bernardwang
merged 5 commits into
bernard/new-cmsds
from
WNMGDS-286/remove-deprecated-items
Feb 28, 2020
Merged
[WNMGDS-286] Remove deprecated items #635
bernardwang
merged 5 commits into
bernard/new-cmsds
from
WNMGDS-286/remove-deprecated-items
Feb 28, 2020
Conversation
This file contains hidden or 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
line47
approved these changes
Feb 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
1263741 to
dfdd975
Compare
|
@line47 |
bernardwang
added a commit
that referenced
this pull request
Mar 18, 2020
* [WNMGDS-317] Deprecate support & layout packages (#628) * Process md files in the core package, add frontmatter attribute path * Rename base to styles * Move grid files to core * Remove 'Layout' section from doc site * Move color palette and layout doc files to docs package, update gulp tasks to support KSS in docs package * Move support files to core and remove generics folder * Stop using support in core and allow for absolute path css importing from core/src * Remove support and layout directories * Remove generator-cmsgov package * Update developer files * Remove sass add version gulp task and simplify gulp scripts * Rename style to design * Update backstop js files * PR feedback * Undo eslint change * Move variables and mixins into settings folder * Fix linter * [WNMGDS-286] Remove deprecated items (#635) * Removing Select files * Remove right to left * Remove deprecated props like fieldRef * Fix dialog snap * Fix snaps * [WNMGDS-389] Add migration info to doc site (#650) * Update readmes and documentation * Reorganize CSS files * Rename core folder to cmsds and update package.json * Add back layout to docs package and fix broken links * Add migration documentation * PR feedback and other misc documentation changes * Rename cmsds folder to design-system * Remove core and layout dep from docs package * Fix doc site react examples * [NO TICKET] v4 documentation changes (#652) * Rename design category to styles * Move grid under styles * Fix rest of docs for renaming design -> styles * Yarn seems to have trouble with this package version number, but without the `.1`, it's fine * Remove grid import * Fix ├── * Update backstop js files * Fix doc site react examples Co-authored-by: Patrick Wolfert <patrick.wolfert@adhocteam.us> * Add missing snap file from merge * Fix lerna issue * [WNMGDS-394] Add design-system-scripts package with build script (#651) * Copied the scripts over and started modifying them to take a src path and docs path as arguments instead of hard-coding them or trying to compile all packages * `docsPath` was being used as the output destination of the built docs. Updated the scripts to send the output to docs/dist while respecting the `rootPath` override * Build tasks are now being run from a separate executable script. It only does cleaning, babel transpiling, and json copying right now, but the framework is here. I'm avoiding using the central `gulp/index.js` to create a shared config in favor of configuring tasks explicitly with command line arguments that we parse in the script that npx/yarn executes. * Build script builds javascript and runs the sass task, but the sass task doesn't seem to be working yet. * Sass compiling works! And moved the executable script up a level because we're only going to have one now with different commands * Improved logging and replaced our use of the deprecated gutil library with the recommended alternatives (https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5) * Renamed `log-util.js` `logUtil.js` for consistency * Stats work! * Added some commented code for the next script/command to be written * Clean up. I don't know where the name `dutil` came from, but it must be outdated. Removed unused stuff and cleaned up the logging. Also cleaned up the task definitions for the build module * Calling the script `cmsds` and fixing a typo * Moved fonts and images into the src folder and changed the build script to move fonts and images from src to dist. And when building child design systems (packages that aren't our core package), it will copy the fonts and images from the core package in node_modules into the child design system's dist folder. * Clean up comment and allow fonts and images to be copied in parallel * Added `skiplatest` support to the fonts stats function like we have for the css stats function and added helpful error messaging around skiplatest functionality. Instead of just throwing a bunch of filesystem errors, it will say why it errored and suggest using `--skiplatest` if appropriate. * Build script copies sass files to dist as well now (but not the `*.docs.scss` ones) * Updated comments documenting the different build tasks * Got rid of a common file that doesn't need to exist anymore * Pared it down to the files that are necessary for the source package build script only * Renamed the scripts package folder to `design-system-scripts` * A couple helper functions to clean the cli file up a bit. * Instead of using gulp tasks, we now just use async functions that have parameters. This makes it so much easier to compose them without having to preconfigure all the tasks with the right parameters, especially when certain parameters may or may not exist depending on which tasks you plan on using. This should be much simpler overall because it's just plain JavaScript. We still use gulp for the streaming transform pipelines, but at a high level, it's just JavaScript. A note here that I had a lot of trouble figuring out how to consistently detect when a gulp stream had ended. It ended up being a combination of `{ readable: false, writeable: false }` for the `finished` function and placing the `pipe(count(...))` before the `pipe(gulp.dest(...))`. I tried a lot of different methods of detecting stream ends before I realized that it was a combination of those two things. * Had to update babel and a few other dependencies to fix the build scripts * Make all the scss imports explicit about `.scss` vs `.css` files so that when we import `dist/index.scss`, the sass compiler won't throw errors * Switched to explicitly importing the .scss files and to using relative paths within the core package in order to avoid errors when building child design systems. Because we now have `.scss` alongside the `.css` files in our dist folder, imports without the extension are ambiguous to the sass compiler. Also, the optional nature of `_` in imports only seems to apply if the paths are relative. * Update the name of the core package in the build script * Change package version number to match new core package * Update package version again * Removed lint rule that we're now breaking intentionally * Removed unused import * For the child design system where I'm executing the build script in the package directory, `./` won't work for gulp. For some reason `''` won't work either. Now I'm just resolving the paths up front so there's no ambiguity. The other changes are to make eslint happy. * Don't have a relative dependency path for a public package. Let `lerna bootstrap` work its magic * Added better error messaging for the stats module. Some of these changes are just eslint fixes * Temporarily remove e2e testing from yarn test Co-authored-by: Scott Weber <scott.weber@adhocteam.us> Co-authored-by: Patrick Wolfert <patrick.wolfert@adhocteam.us>
bernardwang
added a commit
that referenced
this pull request
Apr 15, 2020
* [WNMGDS-317] Deprecate support & layout packages (#628) * Process md files in the core package, add frontmatter attribute path * Rename base to styles * Move grid files to core * Remove 'Layout' section from doc site * Move color palette and layout doc files to docs package, update gulp tasks to support KSS in docs package * Move support files to core and remove generics folder * Stop using support in core and allow for absolute path css importing from core/src * Remove support and layout directories * Remove generator-cmsgov package * Update developer files * Remove sass add version gulp task and simplify gulp scripts * Rename style to design * Update backstop js files * PR feedback * Undo eslint change * Move variables and mixins into settings folder * Fix linter * [WNMGDS-286] Remove deprecated items (#635) * Removing Select files * Remove right to left * Remove deprecated props like fieldRef * Fix dialog snap * Fix snaps * Copied the scripts over and started modifying them to take a src path and docs path as arguments instead of hard-coding them or trying to compile all packages * `docsPath` was being used as the output destination of the built docs. Updated the scripts to send the output to docs/dist while respecting the `rootPath` override * Build tasks are now being run from a separate executable script. It only does cleaning, babel transpiling, and json copying right now, but the framework is here. I'm avoiding using the central `gulp/index.js` to create a shared config in favor of configuring tasks explicitly with command line arguments that we parse in the script that npx/yarn executes. * Build script builds javascript and runs the sass task, but the sass task doesn't seem to be working yet. * Sass compiling works! And moved the executable script up a level because we're only going to have one now with different commands * Improved logging and replaced our use of the deprecated gutil library with the recommended alternatives (https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5) * Renamed `log-util.js` `logUtil.js` for consistency * Stats work! * Added some commented code for the next script/command to be written * Clean up. I don't know where the name `dutil` came from, but it must be outdated. Removed unused stuff and cleaned up the logging. Also cleaned up the task definitions for the build module * Calling the script `cmsds` and fixing a typo * Moved fonts and images into the src folder and changed the build script to move fonts and images from src to dist. And when building child design systems (packages that aren't our core package), it will copy the fonts and images from the core package in node_modules into the child design system's dist folder. * Clean up comment and allow fonts and images to be copied in parallel * Added `skiplatest` support to the fonts stats function like we have for the css stats function and added helpful error messaging around skiplatest functionality. Instead of just throwing a bunch of filesystem errors, it will say why it errored and suggest using `--skiplatest` if appropriate. * Build script copies sass files to dist as well now (but not the `*.docs.scss` ones) * Updated comments documenting the different build tasks * Got rid of a common file that doesn't need to exist anymore * Pared it down to the files that are necessary for the source package build script only * Renamed the scripts package folder to `design-system-scripts` * A couple helper functions to clean the cli file up a bit. * [WNMGDS-389] Add migration info to doc site (#650) * Update readmes and documentation * Reorganize CSS files * Rename core folder to cmsds and update package.json * Add back layout to docs package and fix broken links * Add migration documentation * PR feedback and other misc documentation changes * Rename cmsds folder to design-system * Remove core and layout dep from docs package * Instead of using gulp tasks, we now just use async functions that have parameters. This makes it so much easier to compose them without having to preconfigure all the tasks with the right parameters, especially when certain parameters may or may not exist depending on which tasks you plan on using. This should be much simpler overall because it's just plain JavaScript. We still use gulp for the streaming transform pipelines, but at a high level, it's just JavaScript. A note here that I had a lot of trouble figuring out how to consistently detect when a gulp stream had ended. It ended up being a combination of `{ readable: false, writeable: false }` for the `finished` function and placing the `pipe(count(...))` before the `pipe(gulp.dest(...))`. I tried a lot of different methods of detecting stream ends before I realized that it was a combination of those two things. * Had to update babel and a few other dependencies to fix the build scripts * Set up the command for building docs, and the `cmsds` script will now print usage if you don't specify a command or specify an invalid one * Copied the docs scripts in and committing them as a baseline before I start changing them. Refactored the `gulp/webpack.js` module to not use gulp tasks * Organizing the `gulp/docs` folder a bit more so it's easier to read * Did a bunch of refactoring of the docs-building tasks, but then I realized that I was still dealing with an array of docs paths in most of these helper functions when I was specifically trying to avoid that. Will fix that next * A bunch more refactoring. I have a lot of issues to work out still, but the basic structure should be here * Make the design-system-docs package public so child design systems can include it as a dependency, and make the core package a peer dependency of the scripts package so we can ensure that's available for the build script * Removed the dependency the docs build script had on a module shared with the docs package itself and fixed a bunch of errors. There are still more errors, but I'm making progress. * Fixed some more build errors, but now I'm finding that the build path seems to be kind of hard-coded in a lot of places. I need to refactor a lot of these functions in gulp/docs to start their paths from the working directory rather than all these different locations relative to the root of the design-system repo. The nice thing about working out of just this temporary directory is that it should ultimately simplify all these different paths. I just need to untangle it * Move `docs/index.js` into `docs/docs.js` so it's easier to tell what file I'm working on in my editor * This commit is about getting the doc page rendering scripts to work, and there are several pieces to that: - Get babel to work at runtime to import modules from the docs package. There was a problem where when npm-linking the scripts package and the docs package to the node_modules of the repository root we would get incompatible versions of babel. In the end I realized that we were importing `babel-register` which is the old babel 6 version. I had been importing `@babel/register` and didn't realize there was another import of the old package elsewhere. I made a lot of other changes to try to get this to work, but ultimately it was probably as simple as that - Had to change a lot of paths. Some paths were relative to the module being executed, and some were relative to the cwd. - Had to feed the github url to the docs package components another way because it needs to work for child design systems that are in other repos - Changed imports of docs-package modules from using relative paths to treating the docs package as a dependency. It's now required for the docs package to be a peer dependency of the scripts package. - Fixed other minor issues in the scripts * Also compile docs package files with babel * Fixed imports again and also realized that if I specify the path to the relative path to the current directory as the source directory for the script as `.`, I don't have to resolve the paths ahead of time, which keeps them short and sweet until a time when we absolutely need to resolve them to the absolute path. * This function wasn't actually returning a promise, and this regex didn't cover the docs package if it was inside node_modules anymore. Also created an alias for the build script in the root package.json * Fix merge mistake * Fixed more merge mistakes * Revert to the master version of all the backstop images. This is another merge error. * Remove grid import from merge * Remove copying to temp dir, as uniquePage in generatePages handles that already. Simplify copyAssets to be resuable in build-docs * Fix error in processMarkup originating from processMarkup * Run webpack statically for docs javascript, move webpack.config.js to design-system-scripts * Remove postcss inliner and fix image copying * Add compileDocSass and other misc fixes * Move react data path to constants * Move logic for processing core npm package into helper function, use it in tasks * Add constant for design-system-docs package * Automatically handle processing core docs for child DS cases * Implement doc server, combine webpack files & update CLI * Misc clean up * Reorganize tasks to be more granular, updated options param to be used consistently, refactored webpack.config.js * Fix webpack server issue refactor webpack files * Upgrade webpack and webpack-dev-middleware * Simplify file structure of doc site, organize css structure in docs package * Rename docs folder to match new package name * Fix react example generation * Misc fixes and clean up * Fixed browsersync injecting and updated watch scripts * Fix react component generation and update watch script * Add npm link to post install, temporarily remove tests * Refactor getPackageName and stats error handling to be more flexible, use skipLatest flag in stats logging * Update logIntroduction for child DSs * Small fixes for running scripts on child DS * Move babelrc to scripts package, update doc site imports * Use path.join instead of template strings for greater flexibility with directory args * Remove old scripts * Remove browserslist and babelrc * Update webpack config, sass includes, asset copying and github URL logic to work for child DS * Update documentation files and doc scss * Allow child DS to override doc pages * Update design-system-docs to use newly published package * Fix webpack excludes for child DS * Fix gulp watch for doc site js source * Standardize usage of options param in scripts, make process.env variable naming consistent, add new name option * Use new process.env variables in doc generation, use path for url construction Co-authored-by: Bernard <bernardwang@users.noreply.github.com> Co-authored-by: bernardwang <bw.vbnm@gmail.com>
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.
Changed
<Select>componentChoicefieldRef