Skip to content

Commit 92be893

Browse files
authored
feat: initial commit (#14)
BREAKING CHANGE: v1.0.0
1 parent 7cc665c commit 92be893

15 files changed

+4674
-26
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ updates:
44
- package-ecosystem: npm
55
directory: /
66
schedule:
7-
interval: weekly
7+
interval: monthly
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: monthly

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build-release:
9+
name: Build/Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 14
16+
cache: yarn
17+
- run: yarn install --frozen-lockfile
18+
- name: Run yarn commitlint --from=head_commit.message
19+
run: echo "${{ github.event.head_commit.message }}" | yarn commitlint
20+
- run: yarn prettier --check .
21+
- run: yarn cspell --no-must-find-files '**'
22+
- run: yarn semantic-release --branches ${{ github.ref_name }}
23+
env:
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-metadata.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PR / Metadata
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
types: [opened, synchronize, reopened, edited]
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
validate-metadata:
14+
name: Validate metadata
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 14
21+
cache: yarn
22+
- run: yarn install --frozen-lockfile
23+
- name: Run yarn commitlint --from=pull_request.title
24+
run: echo "${{ github.event.pull_request.title }}" | yarn commitlint
25+
auto-merge:
26+
name: Auto-merge
27+
if: ${{ github.actor == 'dependabot[bot]' }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: dependabot/fetch-metadata@v1.3.1
31+
id: dependabot-metadata
32+
with:
33+
github-token: "${{ secrets.GITHUB_TOKEN }}"
34+
- run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
35+
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-sources.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: PR / Sources
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
validate-sources:
9+
name: Validate sources
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 14
16+
cache: yarn
17+
- run: yarn install --frozen-lockfile
18+
- run: yarn prettier --check .
19+
- run: yarn cspell --no-must-find-files '**'

.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+
yarn 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+
yarn lint-staged

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"recommendations": ["esbenp.prettier-vscode"]
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"streetsidesoftware.code-spell-checker",
5+
"vivaxy.vscode-conventional-commits"
6+
]
37
}

.vscode/settings.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
// Code style
2+
"javascript.suggestionActions.enabled": false,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true,
35
"files.trimTrailingWhitespace": true,
46
"files.trimFinalNewlines": true,
57
"files.insertFinalNewline": true,
6-
"editor.defaultFormatter": "esbenp.prettier-vscode",
7-
"editor.formatOnSave": true,
8-
9-
// Misc
108
"files.exclude": {
11-
"node_modules/": true,
12-
"yarn.lock": true
13-
}
9+
"node_modules": true,
10+
"yarn.lock": true,
11+
".husky": true
12+
},
13+
"conventionalCommits.gitmoji": false
1414
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2021 Minh-Phuc Tran
3+
Copyright (c) 2020-2022 Minh-Phuc Tran
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
TailwindCSS variant to style autocompleted form fields.
77

8+
## Requirements
9+
10+
- Node.js 12+
11+
12+
- TailwindCSS 2+
13+
814
## Install
915

1016
```bash
@@ -42,11 +48,29 @@ Style your components using `autofill:`:
4248
<input className="border border-gray-100 autofill:border-gray-900" />
4349
```
4450

45-
## Requirements
51+
## Contributing
4652

47-
- Node.js 12+
53+
### Requirements
54+
55+
- Node 12+
56+
57+
- Yarn 1.22+
58+
59+
### Setup
60+
61+
1. Install requirements
62+
63+
2. Clone the repository
64+
65+
3. Run `yarn` to install dependencies
66+
67+
### Develop
68+
69+
- Commit adhering to [Angular commit convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit), use `yarn commit` or [Code conventional commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) to commit interactively
70+
71+
- Submit a PR and make sure required status checks pass
4872

49-
- TailwindCSS 2
73+
- When a PR is merged or code is pushed to `master`, Github automatically builds and publishes a new release if there're relevant changes
5074

5175
---
5276

0 commit comments

Comments
 (0)