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,
"yarn-debug.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
coverage/
node_modules/
package-lock.json
!/source/assets/js/vendor/index.js

View File

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

View File

@ -15,12 +15,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
cache: npm
- name: Install dependencies
run: yarn install --immutable
run: npm ci
- name: Build site
run: yarn build-prod
run: npm run build-prod
- name: Check for broken internal links
run: yarn checklinks:internal
run: npm run checklinks:internal
- 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
with:
node-version-file: .nvmrc
cache: yarn
- run: yarn install
- run: yarn build-prod
cache: npm
- run: npm ci
- run: npm run build-prod
- name: Clone shadow repo
uses: actions/checkout@v3
with:

View File

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

View File

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

View File

@ -14,5 +14,6 @@
/source/documentation/js-api
coverage/
node_modules/
package-lock.json
!/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
### Install Node and Yarn
### Install Node
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)
if necessary, then run `nvm install` (once per active shell) to use the correct
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
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`
- `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
```
yarn
npm install
```
### Development tasks
@ -49,7 +42,7 @@ Compile and run [Eleventy](https://www.11ty.dev/) server, with a watcher for
file changes:
```
yarn serve
npm run serve
```
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
yarn build
npm run build
# format and lint all files
yarn lint
npm run lint
```
## Templates

View File

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

View File

@ -1,7 +1,5 @@
[build.environment]
NODE_VERSION = "16"
YARN_VERSION = "3.6.0"
YARN_CACHE_FOLDER = "/opt/buildhome/.yarn_cache"
[[plugins]]
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,
"license": "MIT",
"engines": {
"node": "^16",
"yarn": "^3"
"node": "^16"
},
"packageManager": "yarn@3.6.0",
"scripts": {
"serve": "run-p 'watch:**'",
"build": "run-s clean-version-cache build-dev:scripts 'build:**'",
@ -27,7 +25,7 @@
"watch:scripts": "npm run build-dev:scripts -- -w",
"build:typedoc": "./tool/typedoc-build.sh",
"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",
"gts": "gts fix",
"gts:ci": "gts lint",

8236
yarn.lock

File diff suppressed because it is too large Load Diff