@sugarat/create-theme 0.0.16 → 0.0.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- var y=Object.create;var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(o,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of _(n))!v.call(o,c)&&c!==e&&a(o,c,{get:()=>n[c],enumerable:!(s=d(n,c))||s.enumerable});return o};var i=(o,n,e)=>(e=o!=null?y(h(o)):{},w(n||!o||!o.__esModule?a(e,"default",{value:o,enumerable:!0}):e,o));var g=(o,n,e)=>new Promise((s,c)=>{var u=l=>{try{p(e.next(l))}catch(t){c(t)}},f=l=>{try{p(e.throw(l))}catch(t){c(t)}},p=l=>l.done?s(l.value):Promise.resolve(l.value).then(u,f);p((e=e.apply(o,n)).next())});var m=i(require("fs-extra")),r=i(require("path"));function b(o){let n=r.default.join(__dirname,"template");m.default.copy(n,o,e=>g(this,null,function*(){if(yield m.default.copy(r.default.join(__dirname,"move/gitignore"),r.default.join(o,".gitignore")),yield m.default.copy(r.default.join(__dirname,"move/npmrc"),r.default.join(o,".npmrc")),e)console.error("An error occurred while copying template files:",e);else{console.log("\u{1F389} \u{1F389} created successfully!"),console.log(),console.log(`project in ${o}`),console.log();let s=`Done. Now run:
2
+ var y=Object.create;var g=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(o,n,e,m)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of d(n))!v.call(o,r)&&r!==e&&g(o,r,{get:()=>n[r],enumerable:!(m=_(n,r))||m.enumerable});return o};var a=(o,n,e)=>(e=o!=null?y(h(o)):{},w(n||!o||!o.__esModule?g(e,"default",{value:o,enumerable:!0}):e,o));var j=(o,n,e)=>new Promise((m,r)=>{var f=l=>{try{s(e.next(l))}catch(t){r(t)}},u=l=>{try{s(e.throw(l))}catch(t){r(t)}},s=l=>l.done?m(l.value):Promise.resolve(l.value).then(f,u);s((e=e.apply(o,n)).next())});var c=a(require("path")),i=a(require("process")),p=a(require("fs-extra"));function b(o){let n=c.default.join(__dirname,"template");p.default.copy(n,o,e=>j(this,null,function*(){if(yield p.default.copy(c.default.join(__dirname,"move/gitignore"),c.default.join(o,".gitignore")),yield p.default.copy(c.default.join(__dirname,"move/npmrc"),c.default.join(o,".npmrc")),e)console.error("An error occurred while copying template files:",e);else{console.log("\u{1F389} \u{1F389} created successfully!"),console.log(),console.log(`project in ${o}`),console.log();let m=`Done. Now run:
3
3
 
4
- \u2460 cd ${r.default.parse(j).name}
4
+ \u2460 cd ${c.default.parse(o).name}
5
5
  \u2461 pnpm install
6
- \u2462 pnpm run dev`;console.log(s)}}))}console.log("Creating @sugarat/theme project...");console.log();var j=process.argv[2]||"my-blog";b(r.default.join(process.cwd(),j));
6
+ \u2462 pnpm run dev`;console.log(m)}}))}console.log("Creating @sugarat/theme project...");console.log();var N=i.default.argv[2]||"my-blog";b(c.default.join(i.default.cwd(),N));
7
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport path from 'node:path'\nimport process from 'process'\nimport fs from 'fs-extra'\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 }\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(destination).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,EAAiB,mBACjBC,EAAoB,sBACpBC,EAAe,uBAEf,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,MAEjE,CACH,QAAQ,IAAI,2CAA6B,EACzC,QAAQ,IAAI,EAEZ,QAAQ,IAAI,cAAcJ,GAAa,EAEvC,QAAQ,IAAI,EAEZ,IAAMM,EAAM;AAAA;AAAA,eAER,EAAAJ,QAAK,MAAMF,CAAW,EAAE;AAAA;AAAA,wBAI5B,QAAQ,IAAIM,CAAG,CACjB,CACF,EAAC,CACH,CAEA,QAAQ,IAAI,oCAAoC,EAChD,QAAQ,IAAI,EAEZ,IAAMC,EAAc,EAAAC,QAAQ,KAAK,IAAM,UACvCT,EAAmB,EAAAG,QAAK,KAAK,EAAAM,QAAQ,IAAI,EAAGD,CAAW,CAAC","names":["import_node_path","import_process","import_fs_extra","createThemeProject","destination","templatePath","path","fs","err","__async","msg","projectName","process"]}
@@ -1,5 +1,5 @@
1
1
  // 主题独有配置
2
- import { getThemeConfig } from '@sugarat/theme/node';
2
+ import { getThemeConfig } from '@sugarat/theme/node'
3
3
 
4
4
  // 开启RSS支持(RSS配置)
5
5
  // import type { Theme } from '@sugarat/theme'
@@ -15,12 +15,11 @@ import { getThemeConfig } from '@sugarat/theme/node';
15
15
  // favicon: 'https://sugarat.top/favicon.ico',
16
16
  // }
17
17
 
18
-
19
18
  // 所有配置项,详见文档: https://theme.sugarat.top/
20
19
  const blogTheme = getThemeConfig({
21
20
  // 开启RSS支持
22
21
  // RSS,
23
-
22
+
24
23
  // 默认开启pagefind离线的全文搜索支持(如使用其它的可以设置为false)
25
24
  // 如果npx pagefind 时间过长,可以手动将其安装为项目依赖 pnpm add pagefind
26
25
  // search: false,
@@ -80,6 +79,6 @@ const blogTheme = getThemeConfig({
80
79
  ],
81
80
  duration: 0,
82
81
  },
83
- });
82
+ })
84
83
 
85
- export { blogTheme };
84
+ export { blogTheme }
@@ -1,7 +1,6 @@
1
1
  import { defineConfig } from '@sugarat/theme/node'
2
2
  import { blogTheme } from './blog-theme'
3
3
 
4
-
5
4
  // Vitepress 默认配置
6
5
  // 详见文档:https://vitepress.dev/reference/site-config
7
6
  export default defineConfig({
@@ -1,6 +1,8 @@
1
1
  import BlogTheme from '@sugarat/theme'
2
+
2
3
  // 默认颜色仍然使用绿色
3
4
  import './green-theme.var.css'
5
+
4
6
  // 自定义样式重载
5
7
  // import './style.scss'
6
8
 
@@ -2,6 +2,8 @@
2
2
  "name": "vitepress-blog",
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
+ "author": "粥里有勺糖",
6
+ "license": "MIT",
5
7
  "scripts": {
6
8
  "dev": "vitepress dev docs",
7
9
  "build": "vitepress build docs",
@@ -9,7 +11,7 @@
9
11
  },
10
12
  "dependencies": {
11
13
  "@element-plus/icons-vue": "^2.1.0",
12
- "@sugarat/theme": "^0.1.49",
14
+ "@sugarat/theme": "^0.1.50",
13
15
  "element-plus": "^2.3.8",
14
16
  "vue": "^3.3.4"
15
17
  },
@@ -20,7 +22,5 @@
20
22
  "sass": "^1.64.1",
21
23
  "typescript": "^5.1.6",
22
24
  "vitepress": "1.0.0-rc.14"
23
- },
24
- "author": "粥里有勺糖",
25
- "license": "MIT"
25
+ }
26
26
  }
package/package.json CHANGED
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "name": "@sugarat/create-theme",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
- "bin": {
6
- "create-theme": "./dist/index.js"
7
- },
8
- "files": [
9
- "dist"
10
- ],
5
+ "author": "粥里有勺糖",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/ATQQ/sugar-blog/tree/master/packages/create-theme",
11
8
  "repository": {
12
9
  "type": "git",
13
10
  "url": "git+https://github.com/ATQQ/sugar-blog.git"
14
11
  },
15
- "homepage": "https://github.com/ATQQ/sugar-blog/tree/master/packages/create-theme",
16
12
  "keywords": [
17
13
  "blog",
18
14
  "vitepress",
19
15
  "vitepress-blog",
20
16
  "vitepress-theme"
21
17
  ],
22
- "author": "粥里有勺糖",
23
- "license": "MIT",
24
- "devDependencies": {
25
- "rimraf": "^5.0.1",
26
- "tsup": " ^6.5.0"
18
+ "bin": {
19
+ "create-theme": "./dist/index.js"
27
20
  },
21
+ "files": [
22
+ "dist"
23
+ ],
28
24
  "dependencies": {
29
25
  "fs-extra": "^11.1.1"
30
26
  },
27
+ "devDependencies": {
28
+ "rimraf": "^5.0.1",
29
+ "tsup": " ^6.5.0"
30
+ },
31
31
  "scripts": {
32
32
  "dev": "tsup --watch --publicDir",
33
33
  "build": "rimraf dist && tsup --minify --publicDir"