Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches: [master]

jobs:
build-release:
name: Build/Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
- run: yarn install --frozen-lockfile
- name: Run yarn commitlint --from=head_commit.message
run: echo "${{ github.event.head_commit.message }}" | yarn commitlint
- run: yarn prettier --check .
- run: yarn cspell --no-must-find-files '**'
- run: yarn semantic-release --branches ${{ github.ref_name }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/pr-metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR / Metadata

on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened, edited]

permissions:
pull-requests: write
contents: write

jobs:
validate-metadata:
name: Validate metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
- run: yarn install --frozen-lockfile
- name: Run yarn commitlint --from=pull_request.title
run: echo "${{ github.event.pull_request.title }}" | yarn commitlint
auto-merge:
name: Auto-merge
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: dependabot/fetch-metadata@v1.3.1
id: dependabot-metadata
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/pr-sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR / Sources

on:
pull_request:
branches: [master]

jobs:
validate-sources:
name: Validate sources
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn prettier --check .
- run: yarn cspell --no-must-find-files '**'
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
# Node.js
/node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
node_modules
.DS_Store
.AppleDouble
.LSOverride
logs
*.log
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"recommendations": ["esbenp.prettier-vscode"]
"recommendations": [
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"vivaxy.vscode-conventional-commits"
]
}
16 changes: 8 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
// Code style
"javascript.suggestionActions.enabled": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,

// Misc
"files.exclude": {
"node_modules/": true,
"yarn.lock": true
}
"node_modules": true,
"yarn.lock": true,
".husky": true
},
"conventionalCommits.gitmoji": false
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021 Minh-Phuc Tran
Copyright (c) 2020-2022 Minh-Phuc Tran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

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.

## Requirements

- Node.js 12+

- TailwindCSS 2+

## Install

```bash
Expand All @@ -26,13 +32,8 @@ module.exports = {
// ...
plugins: [
require("tailwindcss-text-fill"),
// Other plugins.
// ...other plugins.
],
variants: {
extend: {
textFill: ["dark"], // Enable variants.
},
},
};
```

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

## Requirements

- Node.js 12+

- TailwindCSS 2

---
## Author

Made by [@phuctm97].
- [Minh-Phuc Tran][@phuctm97]

<!-- Badges -->

Expand Down
4 changes: 4 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ["@commitlint/config-angular"],
ignores: [(commit) => /^build\((deps|deps-dev)\): bump/.test(commit)],
};
4 changes: 4 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"words": ["commitlint", "minh-phuc", "phuctm", "tailwindcss"],
"ignorePaths": ["package.json", "cspell.json", ".vscode"]
}
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"*": ["prettier --write --ignore-unknown", "cspell --no-must-find-files"],
};
28 changes: 17 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "tailwindcss-text-fill",
"version": "0.1.2",
"private": false,
"license": "MIT",
"description": "🎨 TailwindCSS utility to override foreground fill color of text content.",
"keywords": [
"tailwindcss",
Expand All @@ -9,28 +11,32 @@
"tailwindcss-utility"
],
"repository": "https://github.com/phuctm97/tailwindcss-text-fill",
"main": "index.js",
"files": [
"index.js"
],
"author": {
"name": "Minh-Phuc Tran",
"email": "me@phuctm97.com",
"url": "https://phuctm97.com"
},
"license": "MIT",
"private": false,
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"style:check": "prettier --check .",
"style:format": "prettier --write ."
"prepare": "husky install"
},
"dependencies": {
"flatten-tailwindcss-theme": "^0.1.1"
"flatten-tailwindcss-theme": "^1.0.0"
},
"peerDependencies": {
"tailwindcss": "^2.0.2"
"tailwindcss": ">=2.0.0"
},
"devDependencies": {
"prettier": "^2.4.1"
"@commitlint/cli": "^16.2.3",
"@commitlint/config-angular": "^16.2.3",
"@commitlint/prompt-cli": "^16.2.3",
"cspell": "^5.19.7",
"husky": "^7.0.4",
"lint-staged": "^12.4.1",
"prettier": "^2.6.2",
"semantic-release": "^19.0.2"
}
}
Loading