Skip to content

Commit 49c8c5b

Browse files
committed
chore: init
0 parents  commit 49c8c5b

16 files changed

+4636
-0
lines changed

.github/workflows/ci.yml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
20+
21+
- name: Set node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: lts/*
25+
26+
- name: Setup
27+
run: npm i -g @antfu/ni
28+
29+
- name: Install
30+
run: nci
31+
32+
- name: Lint
33+
run: nr lint
34+
35+
typecheck:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v3
39+
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v2
42+
43+
- name: Set node
44+
uses: actions/setup-node@v3
45+
with:
46+
node-version: lts/*
47+
48+
- name: Setup
49+
run: npm i -g @antfu/ni
50+
51+
- name: Install
52+
run: nci
53+
54+
- name: Typecheck
55+
run: nr typecheck
56+
57+
test:
58+
runs-on: ${{ matrix.os }}
59+
60+
strategy:
61+
matrix:
62+
node: [lts/*]
63+
os: [ubuntu-latest, windows-latest, macos-latest]
64+
fail-fast: false
65+
66+
steps:
67+
- uses: actions/checkout@v3
68+
69+
- name: Install pnpm
70+
uses: pnpm/action-setup@v2
71+
72+
- name: Set node ${{ matrix.node }}
73+
uses: actions/setup-node@v3
74+
with:
75+
node-version: ${{ matrix.node }}
76+
77+
- name: Setup
78+
run: npm i -g @antfu/ni
79+
80+
- name: Install
81+
run: nci
82+
83+
- name: Build
84+
run: nr build
85+
86+
- name: Test
87+
run: nr test

.github/workflows/release.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v2
21+
22+
- name: Set node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: lts/*
26+
27+
- run: npx changelogithub
28+
env:
29+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.cache
2+
.DS_Store
3+
.idea
4+
*.log
5+
*.tgz
6+
coverage
7+
dist
8+
lib-cov
9+
logs
10+
node_modules
11+
temp

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-workspace-root-check=true

.vscode/settings.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
// Enable the ESlint flat config support
3+
"eslint.experimental.useFlatConfig": true,
4+
5+
// Disable the default formatter, use eslint instead
6+
"prettier.enable": false,
7+
"editor.formatOnSave": false,
8+
9+
// Auto fix
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll": "explicit",
12+
"source.organizeImports": "never"
13+
},
14+
15+
// Silent the stylistic rules in you IDE, but still auto fix them
16+
"eslint.rules.customizations": [
17+
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "*-indent", "severity": "off" },
19+
{ "rule": "*-spacing", "severity": "off" },
20+
{ "rule": "*-spaces", "severity": "off" },
21+
{ "rule": "*-order", "severity": "off" },
22+
{ "rule": "*-dangle", "severity": "off" },
23+
{ "rule": "*-newline", "severity": "off" },
24+
{ "rule": "*quotes", "severity": "off" },
25+
{ "rule": "*semi", "severity": "off" }
26+
],
27+
28+
// Enable eslint for all supported languages
29+
"eslint.validate": [
30+
"javascript",
31+
"javascriptreact",
32+
"typescript",
33+
"typescriptreact",
34+
"vue",
35+
"html",
36+
"markdown",
37+
"json",
38+
"jsonc",
39+
"yaml"
40+
]
41+
}

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please refer to https://github.com/antfu/contribute

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Anthony Fu <https://github.com/antfu>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# unocss-preset-shadcn
2+
3+
[![npm version][npm-version-src]][npm-version-href]
4+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5+
[![bundle][bundle-src]][bundle-href]
6+
[![JSDocs][jsdocs-src]][jsdocs-href]
7+
[![License][license-src]][license-href]
8+
9+
use shadcn ui with unocss
10+
11+
<!-- Badges -->
12+
13+
[npm-version-src]: https://img.shields.io/npm/v/unocss-preset-shadcn?style=flat&colorA=080f12&colorB=1fa669
14+
[npm-version-href]: https://npmjs.com/package/unocss-preset-shadcn
15+
[npm-downloads-src]: https://img.shields.io/npm/dm/unocss-preset-shadcn?style=flat&colorA=080f12&colorB=1fa669
16+
[npm-downloads-href]: https://npmjs.com/package/unocss-preset-shadcn
17+
[bundle-src]: https://img.shields.io/bundlephobia/minzip/unocss-preset-shadcn?style=flat&colorA=080f12&colorB=1fa669&label=minzip
18+
[bundle-href]: https://bundlephobia.com/result?p=unocss-preset-shadcn
19+
[license-src]: https://img.shields.io/github/license/antfu/unocss-preset-shadcn.svg?style=flat&colorA=080f12&colorB=1fa669
20+
[license-href]: https://github.com/antfu/unocss-preset-shadcn/blob/main/LICENSE
21+
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
22+
[jsdocs-href]: https://www.jsdocs.io/package/unocss-preset-shadcn

build.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
entries: [
5+
'src/index',
6+
],
7+
declaration: true,
8+
clean: true,
9+
rollup: {
10+
emitCJS: true,
11+
},
12+
})

eslint.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
import antfu from '@antfu/eslint-config'
3+
4+
export default antfu(
5+
{
6+
ignores: [
7+
// eslint ignore globs here
8+
],
9+
},
10+
{
11+
rules: {
12+
// overrides
13+
},
14+
},
15+
)

package.json

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "unocss-preset-shadcn",
3+
"type": "module",
4+
"version": "0.0.0",
5+
"packageManager": "[email protected]",
6+
"description": "use shadcn ui with unocss",
7+
"author": "Stephen Zhou <[email protected]>",
8+
"license": "MIT",
9+
"homepage": "https://github.com/hyoban/unocss-preset-shadcn#readme",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/hyoban/unocss-preset-shadcn.git"
13+
},
14+
"bugs": "https://github.com/hyoban/unocss-preset-shadcn/issues",
15+
"keywords": [],
16+
"sideEffects": false,
17+
"exports": {
18+
".": {
19+
"types": "./dist/index.d.ts",
20+
"import": "./dist/index.mjs",
21+
"require": "./dist/index.cjs"
22+
}
23+
},
24+
"main": "./dist/index.mjs",
25+
"module": "./dist/index.mjs",
26+
"types": "./dist/index.d.ts",
27+
"typesVersions": {
28+
"*": {
29+
"*": [
30+
"./dist/*",
31+
"./dist/index.d.ts"
32+
]
33+
}
34+
},
35+
"files": [
36+
"dist"
37+
],
38+
"scripts": {
39+
"build": "unbuild",
40+
"dev": "unbuild --stub",
41+
"lint": "eslint .",
42+
"prepublishOnly": "nr build",
43+
"release": "bumpp && npm publish",
44+
"start": "esno src/index.ts",
45+
"test": "vitest",
46+
"typecheck": "tsc --noEmit",
47+
"prepare": "simple-git-hooks"
48+
},
49+
"devDependencies": {
50+
"@antfu/eslint-config": "^2.1.2",
51+
"@antfu/ni": "^0.21.12",
52+
"@antfu/utils": "^0.7.6",
53+
"@types/node": "^20.10.1",
54+
"bumpp": "^9.2.0",
55+
"eslint": "^8.54.0",
56+
"esno": "^4.0.0",
57+
"lint-staged": "^15.1.0",
58+
"pnpm": "^8.11.0",
59+
"rimraf": "^5.0.5",
60+
"simple-git-hooks": "^2.9.0",
61+
"typescript": "^5.3.2",
62+
"unbuild": "^2.0.0",
63+
"vite": "^5.0.4",
64+
"vitest": "^1.0.0-beta.6"
65+
},
66+
"simple-git-hooks": {
67+
"pre-commit": "pnpm lint-staged"
68+
},
69+
"lint-staged": {
70+
"*": "eslint --fix"
71+
}
72+
}

0 commit comments

Comments
 (0)