Skip to content

Commit

Permalink
Switch package manager from yarn to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed May 17, 2024
1 parent efa3c3a commit 02f29e9
Show file tree
Hide file tree
Showing 6 changed files with 9,648 additions and 5,931 deletions.
29 changes: 11 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,27 @@ commands:
postinstall:
type: steps
default: []
yarn:
type: string
default: '^1.22.19'
steps:
- run:
name: Upgrade yarn for current user
command: cd ~ && yarn policies set-version << parameters.yarn >>

- restore_cache:
keys:
- v2.3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}-{{ .Branch }}
- v2.3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}-
- v2.3-dependencies-{{ .Environment.CIRCLE_JOB }}-
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ .Branch }}
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-

- run: yarn install --frozen-lockfile <<# parameters.force >>--ignore-engines<</ parameters.force >>
- run: npm ci <<# parameters.force >>--force<</ parameters.force >>
- steps: << parameters.postinstall >>

- save_cache:
key: v2.3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}-{{ .Branch }}
key: v2.3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ .Branch }}
paths:
- ~/.cache/yarn
- ~/.npm

audit:
steps:
- checkout
- install:
postinstall:
- run: yarn -s check:audit
- run: npm -s run check:audit

prepare:
parameters:
Expand All @@ -67,21 +60,21 @@ commands:
steps:
- run:
name: Prettier formatting
command: yarn check:format
command: npm run check:format

- run:
name: ESLint
command: yarn lint:js
command: npm run lint:js

- run:
name: stylelint
command: yarn lint:css
command: npm run lint:css

test:
steps:
- run:
name: Jest
command: yarn test:coverage --ci --maxWorkers=2 --reporters=default --reporters=jest-junit
command: npm run test:coverage -- --ci --maxWorkers=2 --reporters=default --reporters=jest-junit
environment:
JEST_JUNIT_OUTPUT_DIR: tmp/test-results

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Are you interested in contributing? See [CONTRIBUTING.md](.github/CONTRIBUTING.m
git clone https://github.com/marp-team/marpit
cd marpit

yarn install
yarn build
npm install
npm run build
```

## Sub-projects
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The documentation of Marpit API (on `main` branch) has been published at **[https://marpit-api.marp.app/](https://marpit-api.marp.app/)**.

> Please run `yarn jsdoc` if you want to build documentation at local. It would build docs in `jsdoc` directory.
> Please run `npm run jsdoc` if you want to build documentation at local. It would build docs in `jsdoc` directory.
## Documentations

Expand Down
Loading

0 comments on commit 02f29e9

Please sign in to comment.