Skip to content

Commit

Permalink
feat(projects): init project
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Nov 21, 2023
0 parents commit 9a278fc
Show file tree
Hide file tree
Showing 19 changed files with 6,955 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Editor configuration, see http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "soybeanjs"
}
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
registry-url: "https://registry.npmjs.org"

- run: npx githublogen
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Install Dependencies
run: pnpm i

- name: PNPM build
run: pnpm run build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
!.vscode/launch.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmmirror.com/
shamefully-hoist=true
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"antfu.unocss",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"formulahendry.auto-complete-tag",
"formulahendry.auto-close-tag",
"formulahendry.auto-rename-tag",
"kisstkondoros.vscode-gutter-preview",
"mhutchie.git-graph"
]
}
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "1.0.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "TS debugger",
"skipFiles": ["<node_internals>/**"],
"runtimeArgs": ["--loader", "tsx"],
"program": "${relativeFile}"
}
]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.eol": "\n",
"[html][css][less][scss][sass][markdown][yaml][yml][jsonc][json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}
Empty file added CHANGELOG.md
Empty file.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# unocss-preset-design

theme design for unocss

## Usage

### install

```bash
pnpm i -D unocss-preset-design
```

### unocss config

```ts
import { defineConfig } from "@unocss/vite";
import type { Theme } from "@unocss/preset-uno";
import presetUno from "@unocss/preset-uno";
import presetDesign from "unocss-preset-design";

export default defineConfig<Theme>({
content: {
pipeline: {
exclude: ["node_modules", "dist"],
},
},
presets: [presetUno({ dark: "class" }), presetDesign()],
});
```
13 changes: 13 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineBuildConfig } from 'unbuild';

export default defineBuildConfig({
entries: ['src/index'],
clean: true,
declaration: true,
rollup: {
emitCJS: true,
esbuild: {
minify: true
}
}
});
60 changes: 60 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "unocss-preset-design",
"version": "0.0.0",
"description": "theme design for unocss",
"packageManager": "[email protected]",
"author": {
"name": "Soybean",
"email": "[email protected]",
"url": "https://github.com/soybeanjs"
},
"license": "MIT",
"homepage": "https://github.com/soybeanjs/unocss-preset-design",
"repository": {
"url": "https://github.com/soybeanjs/unocss-preset-design.git"
},
"bugs": {
"url": "https://github.com/soybeanjs/unocss-preset-design/issues"
},
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "pnpm typecheck && unbuild",
"typecheck": "tsc --noEmit",
"lint": "eslint . --fix",
"format": "soy prettier-write",
"commit": "soy git-commit",
"cleanup": "soy cleanup",
"update-pkg": "soy ncu",
"publish-pkg": "pnpm publish --access public",
"release": "soy release && pnpm build && pnpm publish-pkg"
},
"dependencies": {
"@soybeanjs/color-palette": "0.0.2",
"@unocss/core": "0.57.7",
"@unocss/preset-uno": "0.57.7",
"colord": "2.9.3",
"consola": "3.2.3"
},
"devDependencies": {
"@soybeanjs/cli": "0.7.9",
"@types/cli-progress": "3.11.5",
"@types/node": "20.9.3",
"eslint": "8.54.0",
"eslint-config-soybeanjs": "0.5.8",
"tsx": "4.2.0",
"typescript": "5.3.2",
"unbuild": "2.0.0"
}
}
Loading

0 comments on commit 9a278fc

Please sign in to comment.