dufu1991 2 年 前
コミット
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.
 If you have a project configured with Svelte and Tailwind, install directly.
 
 
 ```bash
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 pnpm i stdf -D
 # or
 # or
 npm i stdf -D
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 ```
 
 
 ## Usage
 ## 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)
 You can try using [create-stdf](https://www.npmjs.com/package/create-stdf) to quickly create a project. (beta version)
 
 
 ```bash
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 pnpm create stdf
 # or
 # or
 npm create stdf@latest
 npm create stdf@latest
@@ -92,6 +90,8 @@ npm create stdf@latest
 npm init stdf@latest
 npm init stdf@latest
 # or
 # or
 npx create-stdf@latest
 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.
 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 的工程,直接安装。
 已有配置好 Svelte 与 Tailwind 的工程,直接安装。
 
 
 ```bash
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 pnpm i stdf -D
 # or
 # or
 npm i stdf -D
 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 版本)
 可以尝试使用 [create-stdf](https://www.npmjs.com/package/create-stdf) 快速创建工程。(beta 版本)
 
 
 ```bash
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 pnpm create stdf
 # or
 # or
 npm create stdf@latest
 npm create stdf@latest
@@ -94,6 +92,8 @@ npm create stdf@latest
 npm init stdf@latest
 npm init stdf@latest
 # or
 # or
 npx create-stdf@latest
 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)。
 或者自行创建 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
 cd packages/rollup-plugin-stdf-icon
 
 
 ## 安装依赖
 ## 安装依赖
-bun i
-## or
 pnpm i
 pnpm i
 ## or
 ## or
 npm i
 npm i
+## or
+bun i
 
 
 ## 构建包
 ## 构建包
-bun run build
-## or
 npm run build
 npm run build
+## or
+bun run build
 
 
 ## 3. 使用 Demo 工程调试 STDF
 ## 3. 使用 Demo 工程调试 STDF
 cd demo
 cd demo
 
 
 ## 安装依赖
 ## 安装依赖
-bun i
-## or
 pnpm i
 pnpm i
 ## or
 ## or
 npm i
 npm i
+## or
+bun i
 
 
 ## 启动 Demo
 ## 启动 Demo
-bun dev
-## or
 npm run dev
 npm run dev
+## or
+bun dev
 ```
 ```
 
 
 启动成功之后,可在浏览器中打开 `http://localhost:8888` 查看效果,请将浏览器的开发者工具切换为移动端模式。
 启动成功之后,可在浏览器中打开 `http://localhost:8888` 查看效果,请将浏览器的开发者工具切换为移动端模式。

+ 8 - 8
doc/guide/contribution_en.md

@@ -36,31 +36,31 @@ cd stdf
 cd packages/rollup-plugin-stdf-icon
 cd packages/rollup-plugin-stdf-icon
 
 
 ## Install dependencies
 ## Install dependencies
-bun i
-## or
 pnpm i
 pnpm i
 ## or
 ## or
 npm i
 npm i
+## or
+bun i
 
 
 ## Build package
 ## Build package
-bun run build
-## or
 npm run build
 npm run build
+## or
+bun run build
 
 
 ## 3. Use the Demo project to debug STDF
 ## 3. Use the Demo project to debug STDF
 cd demo
 cd demo
 
 
 ## Install dependencies
 ## Install dependencies
-bun i
-## or
 pnpm i
 pnpm i
 ## or
 ## or
 npm i
 npm i
+## or
+bun i
 
 
 ## Start Demo
 ## Start Demo
-bun dev_en
-## or
 npm run dev_en
 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.
 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 的工程,直接安装。
 已有配置好 Svelte 与 Tailwind 的工程,直接安装。
 
 
 ```bash
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 pnpm i stdf -D
 # or
 # or
 npm i stdf -D
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 ```
 
 
 ### 在 Svelte 中使用
 ### 在 Svelte 中使用
@@ -32,8 +32,6 @@ npm i stdf -D
 可以尝试使用 [create-stdf](https://www.npmjs.com/package/create-stdf) 快速创建工程。(beta 版本)
 可以尝试使用 [create-stdf](https://www.npmjs.com/package/create-stdf) 快速创建工程。(beta 版本)
 
 
 ```bash
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 pnpm create stdf
 # or
 # or
 npm create stdf@latest
 npm create stdf@latest
@@ -41,6 +39,8 @@ npm create stdf@latest
 npm init stdf@latest
 npm init stdf@latest
 # or
 # or
 npx create-stdf@latest
 npx create-stdf@latest
+# or
+bun create stdf
 ```
 ```
 
 
 ### 自行搭建工程
 ### 自行搭建工程
@@ -62,7 +62,7 @@ npm install -D tailwindcss postcss autoprefixer
 npx tailwindcss init -p
 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 的暗黑模式。
 注意:Tailwind 配置文件中的 content 即表示所有可能用到 Tailwind 的文件,请不要遗漏。darkMode 请设置为 'class',这是为了配合 STDF 的暗黑模式。
 
 
@@ -146,7 +146,7 @@ export default {
 4. 启动项目。
 4. 启动项目。
 
 
 ```sh
 ```sh
-bun dev
-# or
 npm run dev
 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.
 Svelte and Tailwind have been configured for direct installation.
 
 
 ```bash
 ```bash
-bun i stdf -D
-# or
 pnpm i stdf -D
 pnpm i stdf -D
 # or
 # or
 npm i stdf -D
 npm i stdf -D
+# or
+bun i stdf -D
 ```
 ```
 
 
 ### Used in Svelte
 ### 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)
 You can try using [create-stdf](https://www.npmjs.com/package/create-stdf) to quickly create a project. (beta version)
 
 
 ```bash
 ```bash
-bun create stdf
-# or
 pnpm create stdf
 pnpm create stdf
 # or
 # or
 npm create stdf@latest
 npm create stdf@latest
@@ -41,6 +39,8 @@ npm create stdf@latest
 npm init stdf@latest
 npm init stdf@latest
 # or
 # or
 npx create-stdf@latest
 npx create-stdf@latest
+# or
+bun create stdf
 ```
 ```
 
 
 ### Build your own project
 ### Build your own project
@@ -62,7 +62,7 @@ npm install -D tailwindcss postcss autoprefixer
 npx tailwindcss init -p
 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.
 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.
 4. Start the project.
 
 
 ```sh
 ```sh
-bun dev
-# or
 npm run dev
 npm run dev
+# or
+bun dev
 ```
 ```

+ 2 - 1
jsconfig.json

@@ -2,5 +2,6 @@
 	"compilerOptions": {
 	"compilerOptions": {
 		"checkJs": true
 		"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...
 A CLI for creating new [STDF](https://stdf.design) projects. Just run...
 
 
-With BUN:
-
-```bash
-bun create stdf
-```
-
 With PNPM:
 With PNPM:
 
 
 ```bash
 ```bash
@@ -26,29 +20,30 @@ npm init stdf@latest
 npx create-stdf@latest
 npx create-stdf@latest
 ```
 ```
 
 
+With BUN:
+
+```bash
+bun create stdf
+```
+
 ...and follow the prompts.
 ...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:
 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
 ```bash
-# bun
-bun create stdf my-app
-
 # pnpm
 # pnpm
 pnpm create stdf my-app
 pnpm create stdf my-app
 
 
 # npm
 # npm
 npm create stdf@latest my-app
 npm create stdf@latest my-app
+
+# bun
+bun create stdf my-app
 ```
 ```
 
 
 If you want to use the **Vite + UnoCSS + Svelte + STDF** template, run:
 If you want to use the **Vite + UnoCSS + Svelte + STDF** template, run:
 
 
 ```bash
 ```bash
-# bun
-bun create stdf my-app -template vu
-# or
-bun create stdf my-app -t vu
-
 # pnpm
 # pnpm
 pnpm create stdf my-app --template vu
 pnpm create stdf my-app --template vu
 # or
 # or
@@ -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 --template vu
 # or
 # or
 npm create stdf@latest my-app -t vu
 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:
 Template presets include:
@@ -99,7 +99,7 @@ Template presets include:
 For example:
 For example:
 
 
 ```bash
 ```bash
-bun create stdf my-app -l zh_CN
+pnpm create stdf my-app -l zh_CN
 ```
 ```
 
 
 # License
 # License

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

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