Skip to content

Commit

Permalink
Switch from yarn to npm
Browse files Browse the repository at this point in the history
No other Wagtail project uses yarn.
  • Loading branch information
Stormheg committed Mar 20, 2021
1 parent 0d6b735 commit bd50ef0
Show file tree
Hide file tree
Showing 7 changed files with 4,134 additions and 3,232 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- uses: actions/setup-node@v2-beta
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- run: yarn install
- run: yarn frontend
- run: npm install
- run: npm run frontend
- uses: actions/setup-python@v2
with:
python-version: 3.7
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ docs: ## Regenerate Sphinx HTML documentation, including API docs

.PHONY: frontend
frontend: ## Compile frontend files
yarn run frontend
npm run frontend


.PHONY: install
Expand Down Expand Up @@ -167,7 +167,7 @@ setup: setup-python setup-frontend ## Setup all

.PHONY: setup-frontend
setup-frontend: ##- Setup node modules
yarn install
npm install


.PHONY: setup-python
Expand Down
17 changes: 4 additions & 13 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Development
===========

For local development you need a system with Node v12.x, Yarn, Python3, Git and
For local development you need a system with Node v12.x, NPM, Python3, Git and
make. It is strongly recommended to use a Python virtual environment (`venv`_).
The build process derives the version from repository data, so it's necessary
to clone the repository and not just download a single snapshot.
Expand Down Expand Up @@ -83,16 +83,7 @@ check the rendering.
Javascript package management
=============================

Use `yarn` for package management.

To upgrade a Javascript package to a newer version use the following. This
keeps `package.json` and `yarn.lock` in sync as BOTH will be modified:

.. code-block:: shell
# ATTENTION: Select only those with reasonable version numbers.
# Be very careful if the MAJOR number would change
yarn upgrade-interactive --latest
Use `npm` for package management.


Release process
Expand All @@ -112,8 +103,8 @@ With an active virtual environment:
python -m pip install --upgrade -r requirements.txt
make clean
make clean-frontend
yarn
yarn build
npm
npm run build
prerelease
python -m build
python -m twine upload --repository pypi dist/*
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# unless otherwise overridden by more specific contexts.
[build]
publish = "docs/_build/html"
command = "yarn build && pip install -e . && make docs"
command = "npm build && pip install -e . && make docs"

[build.environment]
PYTHON_VERSION = "3.7"
Loading

0 comments on commit bd50ef0

Please sign in to comment.