-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update from template repo: PRs 15, 24, 26 #31
Conversation
Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15) - Install and configure storybook - Create the first story - Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system - Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook - Gitignore storybook, uswds assets, and compiled css - Prettier ignore uswds assets - Use postinstall hook to copy uswds static assets - Stop using CSS modules - Update some package dependencies - Switch Docker base image to use alpine for increased speed
Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24) - Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization - Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js` - Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n - Move jest i18n config into `/tests/jest-i18n.ts` - Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization - Add support for `<em>` tags in react-i18next in both next.js and storybook. Extras: - Remove `space-before-function-paren` eslint rule - Update eslint to follow prettier's rules - Rename `test` dir to `tests` (plural)
Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26) - adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure) - moves `api/`, `pages/` and `messages/` directories to `src/` - creates `components` directory and adds template `Layout` component Extras: - sets up prettier alphabetize imports - adds storybook-static to prettier ignore - sets $theme-show-compile-warnings to true for uswds
Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29) - Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates) - Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning) Note: These features were already enabled in this repo, so this commit is just bringing in stylistic updates to make the two repos identical.
Add layout styles missing from PR #26. [#37](navapbc/template-application-nextjs#37)
- "space-before-function-paren": ["error", "never"] | ||
- suppresses errors for lack of space before function parenthesis to allow for `function()` |
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.
Why was this removed? Is it no longer needed?
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.
I went with the opposite approach:
disabling style lint rules and using whatever the code formatter's default is
See discussion.
|
||
We are using the [USWDS 3.0](https://designsystem.digital.gov) design system. | ||
|
||
We did not follow their [install directions](https://designsystem.digital.gov/documentation/getting-started/developers), which require using gulp as a task runner. Instead, we configured `next.config.js` such that we could leverage Next.js's built-in sass compiling and we configured `.storybook/main.js` such that we could leverage Storybook's built-in sass compiling and re-use the same Next.js configuration. |
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.
Thanks for putting this in the README. Were you able to narrow down why the initial compile is so slow?
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.
Nope. It's still very slow 😞
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.
🎉
Ticket
N/A
Changes
This will also close: