create-valaxy 0.3.1 → 0.3.4

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/README.md CHANGED
@@ -24,4 +24,4 @@ pnpm create valaxy
24
24
 
25
25
  ## FAQ
26
26
 
27
- Use `chalk@4` `execa@5` for cjs.
27
+ Use `execa@5` for cjs.
package/index.js CHANGED
@@ -8,7 +8,7 @@ const path = require('path')
8
8
  const argv = require('minimist')(process.argv.slice(2))
9
9
  const prompts = require('prompts')
10
10
  const execa = require('execa')
11
- const chalk = require('chalk')
11
+ const { bold, dim, blue, yellow, green, cyan, red, gray } = require('kolorist')
12
12
  const { version } = require('./package.json')
13
13
 
14
14
  const cwd = process.cwd()
@@ -20,7 +20,7 @@ const renameFiles = {
20
20
 
21
21
  async function init() {
22
22
  console.log()
23
- console.log(` ${chalk.bold('🌌 Valaxy')} ${chalk.blue(`v${version}`)}`)
23
+ console.log(` ${bold('🌌 Valaxy')} ${blue(`v${version}`)}`)
24
24
  console.log()
25
25
 
26
26
  let targetDir = argv._[0]
@@ -43,7 +43,7 @@ async function init() {
43
43
  else {
44
44
  const existing = fs.readdirSync(root)
45
45
  if (existing.length) {
46
- console.log(chalk.yellow(` Target directory "${targetDir}" is not empty.`))
46
+ console.log(yellow(` Target directory "${targetDir}" is not empty.`))
47
47
  /**
48
48
  * @type {{ yes: boolean }}
49
49
  */
@@ -61,9 +61,9 @@ async function init() {
61
61
  }
62
62
  }
63
63
 
64
- console.log(` ${chalk.dim('📁')} ${chalk.dim(root)}`)
64
+ console.log(` ${dim('📁')} ${dim(root)}`)
65
65
  console.log()
66
- console.log(chalk.dim(' Scaffolding project in ') + targetDir + chalk.dim(' ...'))
66
+ console.log(dim(' Scaffolding project in ') + targetDir + dim(' ...'))
67
67
 
68
68
  const templateDir = path.join(__dirname, 'template')
69
69
  const write = (file, content) => {
@@ -93,7 +93,7 @@ async function init() {
93
93
  : /yarn/.test(process.env.npm_execpath) ? 'yarn' : 'npm'
94
94
 
95
95
  const related = path.relative(cwd, root)
96
- console.log(chalk.green(' Done.\n'))
96
+ console.log(green(' Done.\n'))
97
97
 
98
98
  /**
99
99
  * @type {{ yes: boolean }}
@@ -120,14 +120,14 @@ async function init() {
120
120
  await execa(agent, ['run', 'dev'], { stdio: 'inherit', cwd: root })
121
121
  }
122
122
  else {
123
- console.log(chalk.dim('\n start it later by:\n'))
123
+ console.log(dim('\n start it later by:\n'))
124
124
  if (root !== cwd)
125
- console.log(chalk.blue(` cd ${chalk.bold(related)}`))
125
+ console.log(blue(` cd ${bold(related)}`))
126
126
 
127
- console.log(chalk.blue(` ${pkgManager === 'yarn' ? 'yarn' : `${pkgManager} install`}`))
128
- console.log(chalk.blue(` ${pkgManager === 'yarn' ? 'yarn dev' : `${pkgManager} run dev`}`))
127
+ console.log(blue(` ${pkgManager === 'yarn' ? 'yarn' : `${pkgManager} install`}`))
128
+ console.log(blue(` ${pkgManager === 'yarn' ? 'yarn dev' : `${pkgManager} run dev`}`))
129
129
  console.log()
130
- console.log(` ${chalk.cyan('✨')}`)
130
+ console.log(` ${cyan('✨')}`)
131
131
  console.log()
132
132
  }
133
133
  }
@@ -187,7 +187,7 @@ async function getValidPackageName(projectName) {
187
187
  function emptyDir(dir) {
188
188
  if (!fs.existsSync(dir))
189
189
  return
190
- console.log(chalk.red(' Remove ') + chalk.gray(dir))
190
+ console.log(red(' Remove ') + gray(dir))
191
191
  fs.rmSync(dir, { recursive: true, force: true })
192
192
  }
193
193
 
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "create-valaxy",
3
- "version": "0.3.1",
4
- "main": "index.js",
3
+ "version": "0.3.4",
5
4
  "description": "Create Starter Template for Valaxy",
6
- "homepage": "https://valaxy.yyj.moe",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/YunYouJun/valaxy"
10
- },
11
5
  "author": {
12
6
  "email": "me@yunyoujun.cn",
13
7
  "name": "YunYouJun",
14
8
  "url": "https://www.yunyoujun.cn"
15
9
  },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/YunYouJun/valaxy"
13
+ },
16
14
  "funding": "https://github.com/sponsors/YunYouJun",
15
+ "main": "index.js",
16
+ "homepage": "https://valaxy.yyj.moe",
17
17
  "bin": {
18
18
  "create-valaxy": "index.js"
19
19
  },
@@ -21,8 +21,8 @@
21
21
  "node": ">=14.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "chalk": "4",
25
24
  "execa": "5",
25
+ "kolorist": "^1.5.1",
26
26
  "minimist": "^1.2.6",
27
27
  "prompts": "^2.4.2"
28
28
  }
@@ -26,7 +26,7 @@ jobs:
26
26
 
27
27
  - name: 📦 Install Dependencies
28
28
  run: npm i
29
-
29
+
30
30
  - name: 🌌 Build Valaxy Blog
31
31
  run: npm run build
32
32
 
@@ -11,7 +11,7 @@
11
11
  "serve": "vite preview"
12
12
  },
13
13
  "dependencies": {
14
- "valaxy": "0.3.1",
15
- "valaxy-theme-yun": "0.3.1"
14
+ "valaxy": "0.3.4",
15
+ "valaxy-theme-yun": "0.3.4"
16
16
  }
17
17
  }
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "baseUrl": ".",
4
4
  "paths": {
5
- "@/*": ["demo/yun/*"],
5
+ "@/*": ["demo/yun/*"]
6
6
  }
7
7
  },
8
8
  "exclude": ["dist", "node_modules"]