-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tailwind): ✨ add tailwind config module
- Loading branch information
Showing
7 changed files
with
100 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# @bit-ocean/tailwind | ||
|
||
![npm](https://img.shields.io/npm/v/@bit-ocean/tailwind?logo=tailwindcss&label=tailwind) | ||
|
||
> Universal Tailwind CSS configuration. | ||
## Installation | ||
|
||
```bash | ||
pnpm add -D tailwindcss postcss autoprefixer @bit-ocean/tailwind | ||
npx tailwindcss init -p | ||
``` | ||
|
||
## Configuration | ||
|
||
Add the following styles to your `src/styles/index.scss` or global styles file: | ||
|
||
```scss | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
``` | ||
|
||
Then add the following tailwind config presets to your `tailwind.config.js`: | ||
|
||
```js | ||
module.exports = { | ||
presets: [require('@raipiot-infra/tailwind/preset')], | ||
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "@bit-ocean/tailwind", | ||
"version": "0.0.28", | ||
"description": "Universal Tailwind CSS configuration.", | ||
"author": "Bruce Song <[email protected]> (https://github.com/recallwei/)", | ||
"homepage": "https://github.com/bit-ocean-studio/infra#readme", | ||
"bugs": "https://github.com/bit-ocean-studio/infra/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/bit-ocean-studio/infra.git", | ||
"directory": "packages/tailwind" | ||
}, | ||
"keywords": [ | ||
"bit-ocean", | ||
"bit-ocean-infra", | ||
"tailwind", | ||
"tailwind-config" | ||
], | ||
"files": [ | ||
"tailwind.config.ts" | ||
], | ||
"exports": { | ||
".": "./tailwind.config.ts" | ||
}, | ||
"scripts": { | ||
"type:check": "tsc --pretty --noEmit", | ||
"cspell:check": "cspell --no-progress --show-suggestions --show-context --cache **", | ||
"eslint:check": "eslint . --color --cache", | ||
"eslint:fix": "eslint . --color --cache --fix", | ||
"prettier:check": "prettier --check --cache --ignore-unknown --ignore-path=../../.prettierignore .", | ||
"prettier:fix": "prettier --write --cache --ignore-unknown --ignore-path=../../.prettierignore ." | ||
}, | ||
"peerDependencies": { | ||
"tailwindcss": "^3.4.4" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Config } from 'tailwindcss' | ||
|
||
const config: Omit<Config, 'content'> = { | ||
theme: { | ||
extend: {} | ||
}, | ||
plugins: [], | ||
darkMode: ['class', '[data-theme="dark"]'] | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "@bit-ocean/tsconfig/base", | ||
"include": ["tailwind.config.ts"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.