You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,13 +17,13 @@ This template includes setup for:
17
17
18
18
You can run the Next.js app without docker as follows:
19
19
20
-
1.`yarn install`
21
-
2.`yarn dev`
20
+
1.`npm install`
21
+
2.`npm run dev`
22
22
3. Navigate to `localhost:3000` in your browser to view the application
23
23
24
24
You can run storybook without docker by running:
25
25
26
-
1.`yarn storybook`
26
+
1.`npm run storybook`
27
27
2. Navigate to `localhost:6006` in your browser to view storybook
28
28
29
29
### With Docker
@@ -36,13 +36,13 @@ A `docker-compose.yml` has been included to support local development and deploy
36
36
2. Make sure you have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed & running.
37
37
3. Run `docker-compose up -d --build` to build the image and start the container.
38
38
4. Navigate to `localhost:3000` in your browser to view the application. Note that it takes a few minutes for the initial sass compiling to complete and load.
39
-
5. Run `docker-compose exec nextjs yarn storybook` to build and run storybook. Note that the initial sass compiling for storybook also takes a few minutes to complete and load
39
+
5. Run `docker-compose exec nextjs npm run storybook` to build and run storybook. Note that the initial sass compiling for storybook also takes a few minutes to complete and load
40
40
5. Navigate to `localhost:6006` in your browser to view storybook.
41
41
6. Run `docker-compose down` when you are done to delete the container.
42
42
43
-
To support local development, the `docker-compose.yml` runs the `nextjs` container in development mode (i.e. `yarn dev`) instead of production mode (i.e. `yarn start`). This allows Next.js to do things like hot reload.
43
+
To support local development, the `docker-compose.yml` runs the `nextjs` container in development mode (i.e. `npm run dev`) instead of production mode (i.e. `npm run start`). This allows Next.js to do things like hot reload.
44
44
45
-
The docker-compose file bind mounts `app` on the host machine to `/srv` in the guest machine. However, to ensure that the container uses the correct packages in `node_modules`, we use a named docker volume for the `node_modules` dir. The named volume will take precedence over the bind mount, so that the `node_modules` dir in the guest machine will not be overwritten with the host machine's `node_modules` dir. This also means that if you run `yarn add <package>` on the host machine in development (which will update `yarn.lock`), you'll also need to run `docker-compose exec nextjs yarn install --frozen-lockfile` to update `node_modules` in the guest machine.
45
+
The docker-compose file bind mounts `app` on the host machine to `/srv` in the guest machine. However, to ensure that the container uses the correct packages in `node_modules`, we use a named docker volume for the `node_modules` dir. The named volume will take precedence over the bind mount, so that the `node_modules` dir in the guest machine will not be overwritten with the host machine's `node_modules` dir. This also means that if you run `npm install <package>` on the host machine in development (which will update `package-lock.lock`), you'll also need to run `docker-compose exec nextjs npm ci` to update `node_modules` in the guest machine.
Copy file name to clipboardExpand all lines: app/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
2
2
3
3
## Getting Started
4
4
5
-
First, install dependencies:
5
+
First, install dependencies from the app directory:
6
6
7
7
```bash
8
-
yarn
8
+
npm install
9
9
```
10
10
11
11
Second, run the development server:
12
12
13
13
```bash
14
-
yarn dev
14
+
npm run dev
15
15
```
16
16
17
17
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
@@ -103,7 +103,7 @@ We did not follow their [install directions](https://designsystem.digital.gov/do
103
103
104
104
Compiling the USWDS sass is slow, so the initial build step and subsequent sass re-compiles are slow, but after the design system is set up, we shouldn't need to be regularly re-compiling sass.
105
105
106
-
Copying the USWDS static assets into the project is handled by a [yarn postinstall](https://classic.yarnpkg.com/lang/en/docs/package-json/#toc-scripts) script in `package.json`.
106
+
Copying the USWDS static assets into the project is handled by a [`postinstall`](https://docs.npmjs.com/cli/v8/using-npm/scripts) script in `package.json`.
0 commit comments