Skip to content

Commit

Permalink
Update repo (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell authored Sep 3, 2022
1 parent 31dc885 commit 5c8ef2a
Show file tree
Hide file tree
Showing 6 changed files with 2,528 additions and 3,352 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "${{ matrix.node-version }}"

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
key: node_modules-${{ matrix.node-version }}-${{ hashFiles('package.json', 'package-lock.json') }}

- name: npm ci
if: steps.cache-node_modules.outputs.cache-hit != 'true'
Expand All @@ -36,7 +36,7 @@ jobs:
run: npm run build

- name: ESLint
run: npx --no-install eslint . --report-unused-disable-directives
run: npx eslint . --report-unused-disable-directives

- name: Prettier
run: npx --no-install prettier --check .
run: npx prettier --check .
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "${{ matrix.node-version }}"

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
key: node_modules-${{ matrix.node-version }}-${{ hashFiles('package.json', 'package-lock.json') }}

- name: npm ci
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci

- name: Jest
run: npx --no-install jest --coverage
run: npx jest --coverage
7 changes: 1 addition & 6 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ const FILES_TO_COPY = [
.map((file) => ({ src: path.join(SRC, file), dest: file })),
];

if (fs.rmSync !== undefined) {
fs.rmSync(BUILD, { recursive: true, force: true });
} else if (fs.existsSync(BUILD)) {
fs.rmdirSync(BUILD, { recursive: true });
}

fs.rmSync(BUILD, { recursive: true, force: true });
fs.mkdirSync(BUILD);

for (const { src, dest = src, transform } of FILES_TO_COPY) {
Expand Down
Loading

0 comments on commit 5c8ef2a

Please sign in to comment.