Skip to content

Commit 7f0e355

Browse files
MinThaMiemansona
authored andcommitted
Use NPM instead of Yarn
1 parent b0e3a7d commit 7f0e355

File tree

8 files changed

+73242
-15312
lines changed

8 files changed

+73242
-15312
lines changed

.github/workflows/ci.yml

+15-39
Original file line numberDiff line numberDiff line change
@@ -7,76 +7,52 @@ on:
77
pull_request:
88

99
env:
10-
NODE_VERSION: 12
10+
NODE_VERSION: 14
1111
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
1212
PERCY_PARALLEL_TOTAL: 1
1313

1414
jobs:
15-
lint:
15+
lint:
1616
name: Lint files
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 3
1919
steps:
2020
- name: Check out a copy of the repo
2121
uses: actions/checkout@v2
2222

23-
- name: Use Node.js 14
24-
uses: volta-cli/action@v4
25-
26-
- name: Get Yarn cache path
27-
id: yarn-cache-dir-path
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
29-
30-
- name: Cache Yarn cache and node_modules
31-
id: cache-dependencies
32-
uses: actions/cache@v2
23+
- name: Use Node.js ${{ env.NODE_VERSION }}
24+
uses: actions/setup-node@v2
3325
with:
34-
path: |
35-
${{ steps.yarn-cache-dir-path.outputs.dir }}
36-
node_modules
37-
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
38-
restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-
26+
cache: 'npm'
27+
node-version: ${{ env.NODE_VERSION }}
3928

4029
- name: Install dependencies
41-
run: yarn install --frozen-lockfile
42-
if: steps.cache-dependencies.outputs.cache-hit != 'true'
30+
run: npm ci
4331

4432
- name: Lint
45-
run: yarn lint
33+
run: npm run lint
4634

4735

4836
test-app:
4937
name: Test app
5038
runs-on: ubuntu-latest
51-
timeout-minutes: 7
39+
timeout-minutes: 10
5240
steps:
5341
- name: Check out a copy of the repo
5442
uses: actions/checkout@v2
5543

56-
- name: Use Node.js 14
57-
uses: volta-cli/action@v4
58-
59-
- name: Get Yarn cache path
60-
id: yarn-cache-dir-path
61-
run: echo "::set-output name=dir::$(yarn cache dir)"
62-
63-
- name: Cache Yarn cache and node_modules
64-
id: cache-dependencies
65-
uses: actions/cache@v2
44+
- name: Use Node.js ${{ env.NODE_VERSION }}
45+
uses: actions/setup-node@v2
6646
with:
67-
path: |
68-
${{ steps.yarn-cache-dir-path.outputs.dir }}
69-
node_modules
70-
key: ${{ runner.os }}-14-${{ hashFiles('**/yarn.lock') }}
71-
restore-keys: ${{ runner.os }}-14-
47+
cache: 'npm'
48+
node-version: ${{ env.NODE_VERSION }}
7249

7350
- name: Install dependencies
74-
run: yarn install --frozen-lockfile
75-
if: steps.cache-dependencies.outputs.cache-hit != 'true'
51+
run: npm ci
7652

7753
- name: Test
7854
env:
7955
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
8056
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
8157
PERCY_TOKEN: 5ad6687f6b1ad3dec2b964f94d3d59ff3880baccf1492c0663e85c1ce79c1a52
82-
run: yarn run percy exec -- yarn test:ember
58+
run: npx percy exec -- npm test

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ terraform.tfstate.backup
2727
/libpeerconnection.log
2828
/npm-debug.log*
2929
/testem.log
30-
/yarn-error.log
3130

3231
public/json-docs/
3332
public/rev-index/

CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ clone the latest ember.js api docs from github
7777
cd to the cloned ember-api-docs directory
7878
- cd ember-api-docs
7979

80-
ensure Node.js and yarn are installed
80+
ensure Node.js and npm are installed
8181

8282
follow these commands to build ember.js
83-
- yarn install
84-
- yarn run build
83+
- npm install
84+
- npm build
8585
```
8686

8787
## Development steps
8888

8989
1. Follow the setup steps listed above under [Building Ember.js API](#building-emberjs-api-docs).
9090

91-
2. To start the development server, run `yarn start`.
91+
2. To start the development server, run `npm start`.
9292

93-
3. To run all tests run `yarn test`
93+
3. To run all tests run `npm test`
9494

9595
4. To run the app with fastboot cli like our server deployment run the following commands,
9696
```
@@ -106,7 +106,7 @@ We love pull requests. Here's a quick guide:
106106
1. Fork the repo.
107107

108108
2. Run the tests. We only take pull requests with passing tests, and it's great
109-
to know that you have a clean slate: `yarn install && yarn test`.
109+
to know that you have a clean slate: `npm install && npm test`.
110110

111111
3. Add a test for your change. Only refactoring and documentation changes
112112
require no new tests. If you are adding functionality or fixing a bug, we need

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ locally yourself.
4242
```
4343
git clone https://github.com/ember-learn/ember-api-docs.git
4444
cd ember-api-docs
45-
yarn install
45+
npm install
4646
ember serve
4747
```
4848
View at http://localhost:4200
@@ -53,9 +53,9 @@ To run a11y tests, run `test_a11y=yes ember serve`
5353

5454
## Linting
5555

56-
* `yarn run lint:hbs`
57-
* `yarn run lint:js`
58-
* `yarn run lint:js -- --fix`
56+
* `npm run lint:hbs`
57+
* `npm run lint:js`
58+
* `npm run lint:js -- --fix`
5959

6060
## Staging and Deployment
6161

config/ember-cli-update.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"codemodsSource": "ember-app-codemods-manifest@1",
1212
"isBaseBlueprint": true,
1313
"options": [
14-
"--yarn",
1514
"--no-welcome"
1615
]
1716
}

0 commit comments

Comments
 (0)