Skip to content

web: Migrate to npm workspaces #6025

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
merged 1 commit into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ jobs:
working-directory: web
shell: bash -l {0}
run: |
npm run bootstrap
npm ci
npm run build
npm run docs

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
with:
node-version: ${{ matrix.node_version }}

# Node.js 14 comes with npm 6, but we need npm 7 or newer.
- name: Upgrade npm
run: npm install -g npm

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -72,7 +76,7 @@ jobs:
working-directory: web
shell: bash -l {0}
run: |
npm run bootstrap
npm ci
npm run build

- name: Check formatting
Expand Down
6 changes: 3 additions & 3 deletions web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ _logs/
anonymous-cli-metrics.json

/npm-debug.log*
/lerna-debug.log*

/package.json.lerna_backup

# npm workspaces should not have a `package-lock.json`,
# but it's still generated when doing `npm install` inside
# of them.
/packages/**/package-lock.json
6 changes: 4 additions & 2 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ For the compiler to be able to output WebAssembly, an additional target has to b

#### Node.js

Follow the instructions [to install node.js](https://nodejs.org/en/) on your machine.
Follow the instructions to [install Node.js](https://nodejs.org/) on your machine.

We recommend using the currently active LTS 16, but we do also run tests with maintenance LTS 14.

Note that npm 7 or newer is required. It should come bundled with Node.js 15 or newer, but can be upgraded with older Node.js versions using `npm install -g npm` as root/Administrator.

#### wasm-bindgen

<!-- Be sure to also update the wasm-bindgen-cli version in `.github/workflows/*.yml` and `web/Cargo.toml`. -->
Expand All @@ -75,7 +77,7 @@ Just make sure the `wasm-opt` program is in `$PATH`, and that it works.

In this project, you may run the following commands to build all packages:

- `npm run bootstrap`
- `npm install`
- This will install every dependency for every package.
- Run this every time you pull in new changes, otherwise you may be missing a package and the build will fail.
- `npm run build`
Expand Down
13 changes: 0 additions & 13 deletions web/lerna.json

This file was deleted.

Loading