diff --git a/nextjs/nextjs-site/README.md b/nextjs/nextjs-site/README.md index cdd1b0e2..2428630c 100644 --- a/nextjs/nextjs-site/README.md +++ b/nextjs/nextjs-site/README.md @@ -90,6 +90,52 @@ Prettier configurations are found in [.prettierrc.json](./.prettierrc.json). By default, NextJS [runs linting](https://nextjs.org/docs/app/building-your-application/configuring/eslint#linting-custom-directories-and-files) on the `pages/`, `app/`, `components/`, `lib/`, and `src/` directories. To change which directories are included in linting, go to [next.config.js](./next.config.js). -## Assessment +## Working with USWDS -Our assessment of this prototype can be found in [./docs/assessment.md](./docs/assessment.md). +In order to control when we upgrade USWDS, the `@uswds/uswds` npm package has been installed using the `--save-exact` flag. + +### SASS + +By default, NextJS has a way of compiling SASS, as well as Autoprefixer. This eliminates the need to use tools like uswds-compile or Gulp. + +SASS compilation configs can be found in [next.config.js](./next.config.js) + +USWDS theme settings can be configured in [assets/stylesheets/uswds-settings.scss](./assets/stylesheets/uswds-settings.scss). + +The global SASS entrypoint is [assets/stylesheets/styles.scss](./assets/stylesheets/styles.scss) + +Our aim is to import only what we need from USWDS. Individual USWDS packages will be listed in `styles.scss` after the `uswds-core` import. + +### Javascript and Images + +Nextjs has a top-level [public folder](https://nextjs.org/docs/app/building-your-application/optimizing/static-assets) where static assets can be stored. Assets stored here can be used as `src` urls by removing the `/public` prefix. + +#### Examples: +``` +// Folder: /public/img/uswds/icon.png + + + +// Folder: /public/js/uswds/uswds.min.js + +