Skip to content

Commit 8b973c8

Browse files
committed
chore: use pnpm and github actions
1 parent eb5322e commit 8b973c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+9527
-10121
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
3840
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/pull_request_template.md

100644100755
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Thank you for contributing to Dash
1+
> IMPORTANT: Please do not create a Pull Request without creating an issue first.
2+
> **Any change needs to be discussed before proceeding.** Failure to do so may result
3+
> in the rejection of the pull request.
4+
5+
## Thank you for contributing to `@dash-ui/react-layout`
26

3-
## Before submitting
7+
### Before submitting
48

59
Read the [CONTRIBUTING.md](../CONTRIBUTING.md) file and confirm that you're following
610
all of the guidelines
711

8-
> ⚠️ Please do not create a Pull Request without creating an issue first.
9-
> **Any change needs to be discussed before proceeding.** Failure to do so may result
10-
> in the rejection of the pull request.
11-
12-
## Please provide enough information so that others can review your pull request
12+
### Please provide enough information so that others can review your pull request
1313

1414
- What does this implement/fix? Explain your changes.
1515
- Does this close any currently open issues?
1616

17-
## Testing
17+
### Testing
1818

1919
Confirm that your pull request contains tests and that all existing tests pass.
2020

21-
## Closing issues
21+
### Closing issues
2222

2323
Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
- alpha
9+
pull_request:
10+
branches:
11+
- main
12+
- next
13+
- alpha
14+
15+
jobs:
16+
release:
17+
name: 🚀 Release
18+
if: "!contains(github.event.head_commit.message, '[skip ci]') && !startsWith(github.event.head_commit.message, 'chore:') && !startsWith(github.event.head_commit.message, 'style:') && !contains(github.event.pull_request.title, '[skip ci]') && !startsWith(github.event.pull_request.title, 'chore:') && !startsWith(github.event.pull_request.title, 'style:') && !startsWith(github.event.head_commit.message, 'chore(') && !startsWith(github.event.head_commit.message, 'style(') && !startsWith(github.event.pull_request.title, 'chore(') && !startsWith(github.event.pull_request.title, 'style(')"
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
node-version: [16.x]
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 0
28+
- name: Setup pnpm
29+
uses: pnpm/[email protected]
30+
with:
31+
version: 6.14.3
32+
- name: Setup Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
- name: Cache node_modules
37+
id: cache-node-modules
38+
uses: actions/cache@v2
39+
with:
40+
path: node_modules
41+
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
- name: Install
43+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
44+
run: pnpm install --reporter=silent
45+
- name: ✅ Check types
46+
run: pnpm check-types
47+
- name: 🧹 Lint
48+
run: pnpm lint -- --quiet
49+
- name: 🧪 Test
50+
run: pnpm test -- --coverage --silent
51+
- name: Publish tests to Codecov
52+
if: always()
53+
uses: codecov/codecov-action@v2
54+
with:
55+
files: coverage/clover.xml
56+
verbose: false
57+
fail_ci_if_error: false
58+
- name: Build
59+
if: "github.event_name == 'push'"
60+
run: pnpm build
61+
- name: Stage changes
62+
if: "github.event_name == 'push'"
63+
run: git add .
64+
- name: 🚀 Release
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
68+
run: pnpx -y semantic-release

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm lint-staged

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

CONTRIBUTING.md

100644100755
Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
# Contributing to Dash
1+
# Contributing to @dash-ui/react-layout
22

33
To contribute to this project, first:
44

55
1. [Fork this repo to your account](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo)
6-
2. ```sh
7-
# Create a directory for Dash if you don't already have one
8-
mkdir dash-ui
9-
cd dash-ui
10-
# Clone your forked repo
11-
git clone https://github.com/[your-username]/react-layout.git
12-
# Install the repo using Yarn
13-
cd react-layout
14-
yarn install
6+
2. [Clone this repo](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) to your local machine
7+
3. ```sh
8+
# Install the repo using pnpm
9+
cd [repo-name]
10+
pnpm install
1511
# Start dev mode
16-
yarn dev
12+
pnpm dev
1713
```
1814

1915
## Before you contribute
@@ -29,7 +25,7 @@ Before your PR will be considered I will look for:
2925

3026
- **Documentation** Please submit updates to the docs when public-facing APIs are changed.
3127
- **Tests** Your PR will not be accepted if it doesn't have well-designed tests. Additionally, make sure
32-
that you run `yarn validate` before you submit your PR and make sure your PR passes the linting rules,
28+
that you run `pnpm validate` before you submit your PR and make sure your PR passes the linting rules,
3329
type checking, and tests that already exist.
3430
- **Types** Your types should be as strong as possible.
3531
- **Comments** If your PR implements non-obvious logic, I fully expect you to explain the rationale in
@@ -38,7 +34,7 @@ Before your PR will be considered I will look for:
3834

3935
## Development
4036

41-
Here's what you need to know to start developing Dash.
37+
Here's what you need to know to start developing `@dash-ui/react-layout`.
4238

4339
### Package scripts
4440

@@ -62,30 +58,21 @@ Formats all of the applicable source files with prettier
6258

6359
Runs `eslint` on the package source
6460

65-
#### `prerelease`
66-
67-
Runs before the package is published. This calls `validate` and `build` scripts.
68-
69-
#### `release`
70-
71-
Starts a release using `standard-version`. This must be run before `npm publish`.
72-
7361
#### `test`
7462

7563
Tests the package with `jest`
7664

7765
#### `validate`
7866

79-
Runs `check-types`, `lint`, and `test` scripts. This is used in CI and
80-
in `prerelease`.
67+
Runs `check-types`, `lint`, and `test` scripts.
8168

8269
---
8370

8471
### Husky hooks
8572

8673
#### `pre-commit`
8774

88-
Runs `lint-staged` and the `build-types` script
75+
Runs `lint-staged` script
8976

9077
#### `commit-msg`
9178

0 commit comments

Comments
 (0)