Skip to content

Commit d5429d9

Browse files
authored
feat: initial commit (#12)
1 parent 6efa678 commit d5429d9

16 files changed

+4662
-53
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 '**'

.gitignore

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
# Node.js
2-
/node_modules/
3-
npm-debug.log*
4-
yarn-debug.log*
5-
yarn-error.log*
6-
7-
# Misc
1+
node_modules
82
.DS_Store
9-
.AppleDouble
10-
.LSOverride
11-
logs
12-
*.log

.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: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
TailwindCSS utility to override foreground fill color of text content, is especially useful to style autocompleted form fields with [tailwindcss-autofill] because `color` won't work.
77

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

1016
```bash
@@ -26,13 +32,8 @@ module.exports = {
2632
// ...
2733
plugins: [
2834
require("tailwindcss-text-fill"),
29-
// Other plugins.
35+
// ...other plugins.
3036
],
31-
variants: {
32-
extend: {
33-
textFill: ["dark"], // Enable variants.
34-
},
35-
},
3637
};
3738
```
3839

@@ -42,15 +43,9 @@ Style your components using `text-fill-{color}`, e.g. `text-fill-gray-100`, `tex
4243
<input className="text-fill-gray-900 dark:text-fill-gray-100" />
4344
```
4445

45-
## Requirements
46-
47-
- Node.js 12+
48-
49-
- TailwindCSS 2
50-
51-
---
46+
## Author
5247

53-
Made by [@phuctm97].
48+
- [Minh-Phuc Tran][@phuctm97]
5449

5550
<!-- Badges -->
5651

commitlint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
extends: ["@commitlint/config-angular"],
3+
ignores: [(commit) => /^build\((deps|deps-dev)\): bump/.test(commit)],
4+
};

cspell.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"words": ["commitlint", "minh-phuc", "phuctm", "tailwindcss"],
3+
"ignorePaths": ["package.json", "cspell.json", ".vscode"]
4+
}

lint-staged.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
"*": ["prettier --write --ignore-unknown", "cspell --no-must-find-files"],
3+
};

package.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"name": "tailwindcss-text-fill",
33
"version": "0.1.2",
4+
"private": false,
5+
"license": "MIT",
46
"description": "🎨 TailwindCSS utility to override foreground fill color of text content.",
57
"keywords": [
68
"tailwindcss",
@@ -9,28 +11,32 @@
911
"tailwindcss-utility"
1012
],
1113
"repository": "https://github.com/phuctm97/tailwindcss-text-fill",
12-
"main": "index.js",
13-
"files": [
14-
"index.js"
15-
],
1614
"author": {
1715
"name": "Minh-Phuc Tran",
1816
"email": "me@phuctm97.com",
1917
"url": "https://phuctm97.com"
2018
},
21-
"license": "MIT",
22-
"private": false,
19+
"main": "index.js",
20+
"files": [
21+
"index.js"
22+
],
2323
"scripts": {
24-
"style:check": "prettier --check .",
25-
"style:format": "prettier --write ."
24+
"prepare": "husky install"
2625
},
2726
"dependencies": {
28-
"flatten-tailwindcss-theme": "^0.1.1"
27+
"flatten-tailwindcss-theme": "^1.0.0"
2928
},
3029
"peerDependencies": {
31-
"tailwindcss": "^2.0.2"
30+
"tailwindcss": ">=2.0.0"
3231
},
3332
"devDependencies": {
34-
"prettier": "^2.4.1"
33+
"@commitlint/cli": "^16.2.3",
34+
"@commitlint/config-angular": "^16.2.3",
35+
"@commitlint/prompt-cli": "^16.2.3",
36+
"cspell": "^5.19.7",
37+
"husky": "^7.0.4",
38+
"lint-staged": "^12.4.1",
39+
"prettier": "^2.6.2",
40+
"semantic-release": "^19.0.2"
3541
}
3642
}

0 commit comments

Comments
 (0)