dufu1991 il y a 2 ans
Parent
commit
650d77fe96

+ 4 - 4
README.md

@@ -60,11 +60,11 @@ Mobile web component library based on [Svelte](https://svelte.dev) and [Tailwind
 If you have a project configured with Svelte and Tailwind, install directly.
 
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 # or
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 
 ## Usage
@@ -83,8 +83,6 @@ import { Button } from 'stdf';
 You can try using [create-stdf](https://www.npmjs.com/package/create-stdf) to quickly create a project. (beta version)
 
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 # or
 npm create stdf@latest
@@ -92,6 +90,8 @@ npm create stdf@latest
 npm init stdf@latest
 # or
 npx create-stdf@latest
+# or
+bun create stdf
 ```
 
 Alternatively, you can create a Vite project and configure it to use Tailwind CSS and the configurations used by STDF. Refer to [Vite](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) & [Tailwind CSS](https://tailwindcss.com/docs/guides/vite) & [STDF](https://stdf.design/#/guide) for more information.

+ 4 - 4
README_CN.md

@@ -62,11 +62,11 @@
 已有配置好 Svelte 与 Tailwind 的工程,直接安装。
 
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 # or
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 
 ## 使用
@@ -85,8 +85,6 @@ import { Button } from 'stdf';
 可以尝试使用 [create-stdf](https://www.npmjs.com/package/create-stdf) 快速创建工程。(beta 版本)
 
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 # or
 npm create stdf@latest
@@ -94,6 +92,8 @@ npm create stdf@latest
 npm init stdf@latest
 # or
 npx create-stdf@latest
+# or
+bun create stdf
 ```
 
 或者自行创建 Vite 工程,并配置 Tailwind CSS 和 STDF 使用到的配置。参考 [Vite](https://cn.vitejs.dev/guide/#scaffolding-your-first-vite-project) & [Tailwind CSS](https://tailwindcss.com/docs/guides/vite) & [STDF](https://stdf.design/#/guide)。

+ 8 - 8
doc/guide/contribution.md

@@ -38,31 +38,31 @@ cd stdf
 cd packages/rollup-plugin-stdf-icon
 
 ## 安装依赖
-bun i
-## or
 pnpm i
 ## or
 npm i
+## or
+bun i
 
 ## 构建包
-bun run build
-## or
 npm run build
+## or
+bun run build
 
 ## 3. 使用 Demo 工程调试 STDF
 cd demo
 
 ## 安装依赖
-bun i
-## or
 pnpm i
 ## or
 npm i
+## or
+bun i
 
 ## 启动 Demo
-bun dev
-## or
 npm run dev
+## or
+bun dev
 ```
 
 启动成功之后,可在浏览器中打开 `http://localhost:8888` 查看效果,请将浏览器的开发者工具切换为移动端模式。

+ 8 - 8
doc/guide/contribution_en.md

@@ -36,31 +36,31 @@ cd stdf
 cd packages/rollup-plugin-stdf-icon
 
 ## Install dependencies
-bun i
-## or
 pnpm i
 ## or
 npm i
+## or
+bun i
 
 ## Build package
-bun run build
-## or
 npm run build
+## or
+bun run build
 
 ## 3. Use the Demo project to debug STDF
 cd demo
 
 ## Install dependencies
-bun i
-## or
 pnpm i
 ## or
 npm i
+## or
+bun i
 
 ## Start Demo
-bun dev_en
-## or
 npm run dev_en
+## or
+bun dev_en
 ```
 
 After the startup is successful, you can open `http://localhost:8888` in the browser to view the effect. Please switch the developer tools of the browser to the mobile mode.

+ 7 - 7
doc/guide/quickStart.md

@@ -7,11 +7,11 @@
 已有配置好 Svelte 与 Tailwind 的工程,直接安装。
 
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 # or
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 
 ### 在 Svelte 中使用
@@ -32,8 +32,6 @@ npm i stdf -D
 可以尝试使用 [create-stdf](https://www.npmjs.com/package/create-stdf) 快速创建工程。(beta 版本)
 
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 # or
 npm create stdf@latest
@@ -41,6 +39,8 @@ npm create stdf@latest
 npm init stdf@latest
 # or
 npx create-stdf@latest
+# or
+bun create stdf
 ```
 
 ### 自行搭建工程
@@ -62,7 +62,7 @@ npm install -D tailwindcss postcss autoprefixer
 npx tailwindcss init -p
 ```
 
-1. 在 `tailwind.config.js` 文件内添加模板文件。注意 content 内添加`./node_modules/stdf/**/*.svelte`,这是 STDF 的组件位置。其中 theme 的 colors 可以根据自己的需要进行修改。可参考 [STDF 指南 - 色彩](/#/guide/color)。
+2. 在 `tailwind.config.js` 文件内添加模板文件。注意 content 内添加`./node_modules/stdf/**/*.svelte`,这是 STDF 的组件位置。其中 theme 的 colors 可以根据自己的需要进行修改。可参考 [STDF 指南 - 色彩](/#/guide/color)。
 
 注意:Tailwind 配置文件中的 content 即表示所有可能用到 Tailwind 的文件,请不要遗漏。darkMode 请设置为 'class',这是为了配合 STDF 的暗黑模式。
 
@@ -146,7 +146,7 @@ export default {
 4. 启动项目。
 
 ```sh
-bun dev
-# or
 npm run dev
+# or
+bun dev
 ```

+ 7 - 7
doc/guide/quickStart_en.md

@@ -7,11 +7,11 @@
 Svelte and Tailwind have been configured for direct installation.
 
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 # or
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 
 ### Used in Svelte
@@ -32,8 +32,6 @@ npm i stdf -D
 You can try using [create-stdf](https://www.npmjs.com/package/create-stdf) to quickly create a project. (beta version)
 
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 # or
 npm create stdf@latest
@@ -41,6 +39,8 @@ npm create stdf@latest
 npm init stdf@latest
 # or
 npx create-stdf@latest
+# or
+bun create stdf
 ```
 
 ### Build your own project
@@ -62,7 +62,7 @@ npm install -D tailwindcss postcss autoprefixer
 npx tailwindcss init -p
 ```
 
-1. Add a template file within the `tailwind.config.js` file. Note that `./node_modules/stdf/**/*.svelte` is added in content, which is the component location of STDF.The colors of theme can be modified according to its own needs. Reference [STDF Guide - Color](/#/guide/color).
+2. Add a template file within the `tailwind.config.js` file. Note that `./node_modules/stdf/**/*.svelte` is added in content, which is the component location of STDF.The colors of theme can be modified according to its own needs. Reference [STDF Guide - Color](/#/guide/color).
 
 Note: The 'content' in the Tailwind configuration file represents all files that may use Tailwind, please do not omit any files. Please set darkMode to 'class' to match STDF's dark mode.
 
@@ -146,7 +146,7 @@ export default {
 4. Start the project.
 
 ```sh
-bun dev
-# or
 npm run dev
+# or
+bun dev
 ```

+ 2 - 1
jsconfig.json

@@ -2,5 +2,6 @@
 	"compilerOptions": {
 		"checkJs": true
 	},
-	"exclude": ["node_modules"]
+	"include": ["./**/*.js", "./**/*.svelte"],
+	"exclude": ["node_modules", "dist", "dist-old"]
 }

+ 15 - 15
packages/create-stdf/README.md

@@ -4,12 +4,6 @@
 
 A CLI for creating new [STDF](https://stdf.design) projects. Just run...
 
-With BUN:
-
-```bash
-bun create stdf
-```
-
 With PNPM:
 
 ```bash
@@ -26,29 +20,30 @@ npm init stdf@latest
 npx create-stdf@latest
 ```
 
+With BUN:
+
+```bash
+bun create stdf
+```
+
 ...and follow the prompts.
 
 You can also directly specify the project name and the template you want to use via additional command line options. For example, to create a new project named `my-app` using the **SvelteKit + Tailwind + STDF** template, run:
 
 ```bash
-# bun
-bun create stdf my-app
-
 # pnpm
 pnpm create stdf my-app
 
 # npm
 npm create stdf@latest my-app
+
+# bun
+bun create stdf my-app
 ```
 
 If you want to use the **Vite + UnoCSS + Svelte + STDF** template, run:
 
 ```bash
-# bun
-bun create stdf my-app -template vu
-# or
-bun create stdf my-app -t vu
-
 # pnpm
 pnpm create stdf my-app --template vu
 # or
@@ -58,6 +53,11 @@ pnpm create stdf my-app -t vu
 npm create stdf@latest my-app --template vu
 # or
 npm create stdf@latest my-app -t vu
+
+# bun
+bun create stdf my-app -template vu
+# or
+bun create stdf my-app -t vu
 ```
 
 Template presets include:
@@ -99,7 +99,7 @@ Template presets include:
 For example:
 
 ```bash
-bun create stdf my-app -l zh_CN
+pnpm create stdf my-app -l zh_CN
 ```
 
 # License

+ 15 - 15
packages/create-stdf/README_CN.md

@@ -4,12 +4,6 @@
 
 一个用于创建新的 [STDF](https://stdf.design) 项目的命令行工具。只需运行以下命令...
 
-使用 BUN:
-
-```bash
-bun create stdf
-```
-
 使用 PNPM:
 
 ```bash
@@ -26,29 +20,30 @@ npm init stdf@latest
 npx create-stdf@latest
 ```
 
+使用 BUN:
+
+```bash
+bun create stdf
+```
+
 ...然后按照提示进行操作。
 
 你也可以通过额外的命令行选项直接指定项目名称和要使用的模板。例如,如果要使用 **SvelteKit + Tailwind + STDF** 模板创建一个名为 `my-app` 的新项目,请运行:
 
 ```bash
-# bun
-bun create stdf my-app
-
 # pnpm
 pnpm create stdf my-app
 
 # npm
 npm create stdf@latest my-app
+
+# bun
+bun create stdf my-app
 ```
 
 如果要使用 **Vite + UnoCSS + Svelte + STDF** 模板,请运行:
 
 ```bash
-# bun
-bun create stdf my-app -template vu
-# 或者
-bun create stdf my-app -t vu
-
 # pnpm
 pnpm create stdf my-app --template vu
 # 或者
@@ -58,6 +53,11 @@ pnpm create stdf my-app -t vu
 npm create stdf@latest my-app --template vu
 # 或者
 npm create stdf@latest my-app -t vu
+
+# bun
+bun create stdf my-app -template vu
+# 或者
+bun create stdf my-app -t vu
 ```
 
 模板预设包括:
@@ -99,7 +99,7 @@ npm create stdf@latest my-app -t vu
 例如:
 
 ```bash
-bun create stdf my-app -l zh_CN
+pnpm create stdf my-app -l zh_CN
 ```
 
 # 许可证