Switch from yarn to npm

This commit is contained in:
Jonny Gerig Meyer 2023-06-19 18:12:39 -04:00
parent 97e4f71a0c
commit 9cede5b4c5
No known key found for this signature in database
16 changed files with 14315 additions and 9150 deletions

View File

@ -82,7 +82,8 @@
"assets/dist/": true, "assets/dist/": true,
"yarn-debug.log": true, "yarn-debug.log": true,
"yarn-error.log": true, "yarn-error.log": true,
"yarn.lock": true "yarn.lock": true,
"package-lock.json": true
} }
} }
} }

View File

@ -14,5 +14,6 @@
/source/documentation/js-api /source/documentation/js-api
coverage/ coverage/
node_modules/ node_modules/
package-lock.json
!/source/assets/js/vendor/index.js !/source/assets/js/vendor/index.js

View File

@ -4,7 +4,7 @@ updates:
directory: '/' directory: '/'
schedule: schedule:
interval: 'weekly' interval: 'weekly'
- package-ecosystem: 'yarn' - package-ecosystem: 'npm'
directory: '/' directory: '/'
schedule: schedule:
interval: 'weekly' interval: 'weekly'

View File

@ -15,12 +15,12 @@ jobs:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
cache: yarn cache: npm
- name: Install dependencies - name: Install dependencies
run: yarn install --immutable run: npm ci
- name: Build site - name: Build site
run: yarn build-prod run: npm run build-prod
- name: Check for broken internal links - name: Check for broken internal links
run: yarn checklinks:internal run: npm run checklinks:internal
- name: Check for broken external links - name: Check for broken external links
run: yarn checklinks:external run: npm run checklinks:external

View File

@ -39,9 +39,9 @@ jobs:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
cache: yarn cache: npm
- run: yarn install - run: npm ci
- run: yarn build-prod - run: npm run build-prod
- name: Clone shadow repo - name: Clone shadow repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:

View File

@ -18,13 +18,13 @@ jobs:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
cache: yarn cache: npm
- name: Install & build - name: Install & build
run: | run: |
yarn install --immutable npm ci
yarn build-prod npm run build-prod
- name: Check links - name: Check links
run: yarn checklinks:internal run: npm run checklinks:internal
lint: lint:
name: Lint name: Lint
@ -34,8 +34,8 @@ jobs:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
cache: yarn cache: npm
- name: Install dependencies - name: Install dependencies
run: yarn install --immutable run: npm ci
- name: Lint - name: Lint
run: yarn lint:ci run: npm run lint:ci

View File

@ -14,5 +14,6 @@
/source/documentation/js-api /source/documentation/js-api
coverage/ coverage/
node_modules/ node_modules/
package-lock.json
!/source/assets/js/vendor/index.ts !/source/assets/js/vendor/index.ts

View File

@ -14,5 +14,6 @@
/source/documentation/js-api /source/documentation/js-api
coverage/ coverage/
node_modules/ node_modules/
package-lock.json
!/source/assets/js/vendor/index.ts !/source/assets/js/vendor/index.ts

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.6.0.cjs

View File

@ -15,16 +15,13 @@ following:
## Running Locally ## Running Locally
### Install Node and Yarn ### Install Node
We recommend using [nvm](https://github.com/nvm-sh/nvm) for node version We recommend using [nvm](https://github.com/nvm-sh/nvm) for node version
management. [Install it](https://github.com/nvm-sh/nvm#installation-and-update) management. [Install it](https://github.com/nvm-sh/nvm#installation-and-update)
if necessary, then run `nvm install` (once per active shell) to use the correct if necessary, then run `nvm install` (once per active shell) to use the correct
version of node for development. version of node for development.
The correct [Yarn](https://yarnpkg.com/) version is included in the repo, and
will be used automatically for any `yarn` command.
To upgrade the node version used by the Sass website, update the version number To upgrade the node version used by the Sass website, update the version number
in these places and then run `nvm install` to upgrade: in these places and then run `nvm install` to upgrade:
@ -33,14 +30,10 @@ in these places and then run `nvm install` to upgrade:
- `netlify.toml` - `netlify.toml`
- `Dockerfile` - `Dockerfile`
To upgrade the yarn version, run `yarn set version latest`, then update the
version number in `netlify.toml` and `package.json` (`engines.yarn` field) if
necessary.
### Install dependencies ### Install dependencies
``` ```
yarn npm install
``` ```
### Development tasks ### Development tasks
@ -49,7 +42,7 @@ Compile and run [Eleventy](https://www.11ty.dev/) server, with a watcher for
file changes: file changes:
``` ```
yarn serve npm run serve
``` ```
The site will be compiled into `_site/` and available at http://localhost:8080. The site will be compiled into `_site/` and available at http://localhost:8080.
@ -58,10 +51,10 @@ You can also run individual commands:
``` ```
# build the static site for development # build the static site for development
yarn build npm run build
# format and lint all files # format and lint all files
yarn lint npm run lint
``` ```
## Templates ## Templates

View File

@ -3,6 +3,6 @@ FROM node:16
WORKDIR /app WORKDIR /app
COPY . /app COPY . /app
RUN yarn install RUN npm install
CMD yarn serve CMD npm run serve

View File

@ -1,7 +1,5 @@
[build.environment] [build.environment]
NODE_VERSION = "16" NODE_VERSION = "16"
YARN_VERSION = "3.6.0"
YARN_CACHE_FOLDER = "/opt/buildhome/.yarn_cache"
[[plugins]] [[plugins]]
package = "netlify-plugin-11ty" package = "netlify-plugin-11ty"

14285
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,10 +11,8 @@
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": "^16", "node": "^16"
"yarn": "^3"
}, },
"packageManager": "yarn@3.6.0",
"scripts": { "scripts": {
"serve": "run-p 'watch:**'", "serve": "run-p 'watch:**'",
"build": "run-s clean-version-cache build-dev:scripts 'build:**'", "build": "run-s clean-version-cache build-dev:scripts 'build:**'",
@ -27,7 +25,7 @@
"watch:scripts": "npm run build-dev:scripts -- -w", "watch:scripts": "npm run build-dev:scripts -- -w",
"build:typedoc": "./tool/typedoc-build.sh", "build:typedoc": "./tool/typedoc-build.sh",
"build:11ty": "NODE_OPTIONS='-r ts-node/register' eleventy", "build:11ty": "NODE_OPTIONS='-r ts-node/register' eleventy",
"watch:11ty": "yarn build:11ty --serve --incremental", "watch:11ty": "npm run build:11ty --serve --incremental",
"tsc": "tsc", "tsc": "tsc",
"gts": "gts fix", "gts": "gts fix",
"gts:ci": "gts lint", "gts:ci": "gts lint",

8236
yarn.lock

File diff suppressed because it is too large Load Diff