@sugarat/create-theme 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport fs from 'fs-extra'\nimport path from 'path'\n\nfunction createThemeProject(destination) {\n const templatePath = path.join(__dirname, 'template')\n\n fs.copy(templatePath, destination, async (err) => {\n // 同步创建.gitignore文件和.npmrc文件\n await fs.copy(\n path.join(__dirname, 'move/gitignore'),\n path.join(destination, '.gitignore')\n )\n await fs.copy(\n path.join(__dirname, 'move/npmrc'),\n path.join(destination, '.npmrc')\n )\n if (err) {\n console.error('An error occurred while copying template files:', err)\n } else {\n console.log('🎉 🎉 created successfully!')\n console.log()\n\n console.log(`project in ${destination}`)\n\n console.log()\n\n const msg = `Done. Now run:\n\n ① cd ${path.parse(projectName).name}\n ② pnpm install\n ③ pnpm run dev`\n\n console.log(msg)\n }\n })\n}\n\nconsole.log('Creating @sugarat/theme project...')\nconsole.log()\n\nconst projectName = process.argv[2] || 'my-blog'\ncreateThemeProject(path.join(process.cwd(), projectName))\n"],"mappings":";wpBAEA,IAAAA,EAAe,uBACfC,EAAiB,mBAEjB,SAASC,EAAmBC,EAAa,CACvC,IAAMC,EAAe,EAAAC,QAAK,KAAK,UAAW,UAAU,EAEpD,EAAAC,QAAG,KAAKF,EAAcD,EAAoBI,GAAQC,EAAA,sBAUhD,GARA,MAAM,EAAAF,QAAG,KACP,EAAAD,QAAK,KAAK,UAAW,gBAAgB,EACrC,EAAAA,QAAK,KAAKF,EAAa,YAAY,CACrC,EACA,MAAM,EAAAG,QAAG,KACP,EAAAD,QAAK,KAAK,UAAW,YAAY,EACjC,EAAAA,QAAK,KAAKF,EAAa,QAAQ,CACjC,EACII,EACF,QAAQ,MAAM,kDAAmDA,CAAG,MAC/D,CACL,QAAQ,IAAI,2CAA6B,EACzC,QAAQ,IAAI,EAEZ,QAAQ,IAAI,cAAcJ,GAAa,EAEvC,QAAQ,IAAI,EAEZ,IAAMM,EAAM;AAAA;AAAA,eAER,EAAAJ,QAAK,MAAMK,CAAW,EAAE;AAAA;AAAA,wBAI5B,QAAQ,IAAID,CAAG,CACjB,CACF,EAAC,CACH,CAEA,QAAQ,IAAI,oCAAoC,EAChD,QAAQ,IAAI,EAEZ,IAAMC,EAAc,QAAQ,KAAK,IAAM,UACvCR,EAAmB,EAAAG,QAAK,KAAK,QAAQ,IAAI,EAAGK,CAAW,CAAC","names":["import_fs_extra","import_path","createThemeProject","destination","templatePath","path","fs","err","__async","msg","projectName"]}
|
|
@@ -28,6 +28,7 @@ sticky: 1
|
|
|
28
28
|
* tabs([vitepress-plugin-tabs](https://vitepress-plugins.sapphi.red/tabs/))
|
|
29
29
|
* 流程图([vitepress-plugin-mermaid](https://github.com/emersonbottero/vitepress-plugin-mermaid#readme))
|
|
30
30
|
* RSS
|
|
31
|
+
* 主题色统一
|
|
31
32
|
|
|
32
33
|
## 规划中功能
|
|
33
34
|
* Valine 评论系统
|
|
@@ -37,7 +38,6 @@ sticky: 1
|
|
|
37
38
|
* 博客案例集合
|
|
38
39
|
* 背景图自动更换
|
|
39
40
|
* 首屏铺满slogan,参考reco
|
|
40
|
-
* 主题色统一
|
|
41
41
|
|
|
42
42
|
## 参考项目
|
|
43
43
|
或多或少借鉴&使用了如下的一下开源项目,博客,网站的能力或者UI样式
|
|
@@ -89,25 +89,32 @@ vitepress 最新的默认主题色偏紫色,看着感觉有点不习惯
|
|
|
89
89
|
|
|
90
90
|

|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
主题包内置了一些主题色,可以自行选择,详见[全局配置:themeColor](https://theme.sugarat.top/config/global.html#themecolor)
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
`.vitepress/theme/green-theme.var.css`
|
|
94
|
+
如果内置的不满足要求,也可以进行自定义,自定义的方式是通过覆盖变量的方式
|
|
97
95
|
|
|
98
96
|
```css
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
--vp-c-
|
|
104
|
-
--vp-c-
|
|
105
|
-
--vp-c-
|
|
106
|
-
--vp-c-
|
|
107
|
-
--vp-c-
|
|
108
|
-
|
|
109
|
-
--vp-c-brand-
|
|
110
|
-
--vp-c-brand-
|
|
97
|
+
/* 所有变量:https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */
|
|
98
|
+
|
|
99
|
+
/* 自定义主题色,绿色 */
|
|
100
|
+
html[theme] {
|
|
101
|
+
--vp-c-green: #10b981;
|
|
102
|
+
--vp-c-green-light: #34d399;
|
|
103
|
+
--vp-c-green-lighter: #6ee7b7;
|
|
104
|
+
--vp-c-green-dark: #059669;
|
|
105
|
+
--vp-c-green-darker: #047857;
|
|
106
|
+
|
|
107
|
+
--vp-c-brand-1: var(--vp-c-green);
|
|
108
|
+
--vp-c-brand-2: var(--vp-c-green-light);
|
|
109
|
+
--vp-c-brand-3: var(--vp-c-green-lighter);
|
|
110
|
+
--vp-c-brand-soft: rgba(110, 231, 183, 0.22);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
html[theme].dark {
|
|
114
|
+
--vp-c-brand-1: var(--vp-c-green);
|
|
115
|
+
--vp-c-brand-2: var(--vp-c-green-dark);
|
|
116
|
+
--vp-c-brand-3: var(--vp-c-green-darker);
|
|
117
|
+
--vp-c-brand-soft: rgba(4, 120, 87, 0.25);
|
|
111
118
|
}
|
|
112
119
|
```
|
|
113
120
|
将其引入到`.vitepress/theme/index.ts`中即可
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@element-plus/icons-vue": "^2.1.0",
|
|
12
|
-
"@sugarat/theme": "^0.1.
|
|
12
|
+
"@sugarat/theme": "^0.1.46",
|
|
13
13
|
"element-plus": "^2.3.8",
|
|
14
14
|
"vue": "^3.3.4"
|
|
15
15
|
},
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"sass": "^1.64.1",
|
|
21
21
|
"typescript": "^5.1.6",
|
|
22
|
-
"vitepress": "1.0.0-rc.
|
|
22
|
+
"vitepress": "1.0.0-rc.13"
|
|
23
23
|
},
|
|
24
24
|
"author": "粥里有勺糖",
|
|
25
25
|
"license": "MIT"
|