@doyuli/create-vue 0.1.1 → 0.1.2

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 doyuli
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2025 doyuli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- ### Usage
2
-
3
- ```bash
4
- npx @doyuli/create-vue
5
-
6
- # or
7
-
8
- npm create @doyuli/vue
9
- ```
1
+ ### Usage
2
+
3
+ ```bash
4
+ npx @doyuli/create-vue
5
+
6
+ # or
7
+
8
+ npm create @doyuli/vue
9
+ ```
package/bin/index.js CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- import '../dist/index.js'
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js'
package/dist/index.js CHANGED
@@ -58,8 +58,7 @@ function renderTemplates(root, result) {
58
58
  const needsVitest = features.includes("vitest");
59
59
  const templateRoot = fileURLToPath(new URL("../template", import.meta.url));
60
60
  const render = (templateName) => {
61
- const templateDir = path.resolve(templateRoot, templateName);
62
- renderTemplate(templateDir, root);
61
+ renderTemplate(path.resolve(templateRoot, templateName), root);
63
62
  };
64
63
  render("base");
65
64
  render("eslint");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@doyuli/create-vue",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "@doyuli/create-vue",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "@clack/prompts": "^0.11.0",
35
35
  "ejs": "3.1.10",
36
36
  "picocolors": "^1.1.1",
37
- "@doyuli/kits-core": "^0.1.1"
37
+ "@doyuli/kits-core": "^0.1.2"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "tsdown --watch",
@@ -1,11 +1,11 @@
1
- <script setup lang="ts"></script>
2
-
3
- <template>
4
- <div>
5
- <main>
6
- <slot />
7
- </main>
8
- </div>
9
- </template>
10
-
11
- <style scoped></style>
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <div>
5
+ <main>
6
+ <slot />
7
+ </main>
8
+ </div>
9
+ </template>
10
+
11
+ <style scoped></style>
@@ -1,21 +1,21 @@
1
- import {
2
- defineConfig,
3
- presetAttributify,
4
- presetIcons,
5
- presetUno,
6
- } from 'unocss'
7
-
8
- export default defineConfig({
9
- presets: [
10
- presetUno(),
11
- presetAttributify(),
12
- presetIcons({
13
- scale: 1.2,
14
- warn: true,
15
- extraProperties: {
16
- 'display': 'inline-block',
17
- 'vertical-align': 'middle',
18
- },
19
- }),
20
- ],
21
- })
1
+ import {
2
+ defineConfig,
3
+ presetAttributify,
4
+ presetIcons,
5
+ presetUno,
6
+ } from 'unocss'
7
+
8
+ export default defineConfig({
9
+ presets: [
10
+ presetUno(),
11
+ presetAttributify(),
12
+ presetIcons({
13
+ scale: 1.2,
14
+ warn: true,
15
+ extraProperties: {
16
+ 'display': 'inline-block',
17
+ 'vertical-align': 'middle',
18
+ },
19
+ }),
20
+ ],
21
+ })
@@ -1,29 +1,41 @@
1
- // @ts-check
2
-
3
- import { readFileSync } from 'node:fs'
4
- import path from 'node:path'
5
- import process from 'node:process'
6
- import pico from 'picocolors'
7
-
8
- const msgPath = path.resolve('.git/COMMIT_EDITMSG')
9
- const msg = readFileSync(msgPath, 'utf-8').trim()
10
-
11
- // eslint-disable-next-line regexp/no-unused-capturing-group
12
- const commitRE = /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release)(\(.+\))?: .{1,50}/
13
-
14
- if (!commitRE.test(msg)) {
15
- console.log()
16
- console.error(
17
- ` ${pico.white(pico.bgRed(' ERROR '))} ${pico.red(
18
- `invalid commit message format.`,
19
- )}\n\n${pico.red(
20
- ` Proper commit message format is required for automated changelog generation. Examples:\n\n`,
21
- )} ${pico.green(`feat(compiler): add 'comments' option`)}\n`
22
- + ` ${pico.green(
23
- `fix(v-model): handle events on blur (close #28)`,
24
- )}\n\n${pico.red(
25
- ` See https://github.com/vuejs/core/blob/main/.github/commit-convention.md for more details.\n`,
26
- )}`,
27
- )
28
- process.exit(1)
29
- }
1
+ // @ts-check
2
+
3
+ import { readFileSync } from 'node:fs'
4
+ import path from 'node:path'
5
+ import process from 'node:process'
6
+ import pico from 'picocolors'
7
+
8
+ const msgPath = path.resolve('.git/COMMIT_EDITMSG')
9
+ const msg = readFileSync(msgPath, 'utf-8').trim()
10
+
11
+ // eslint-disable-next-line regexp/no-unused-capturing-group
12
+ const COMMIT_RE = /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release)(\(.+\))?: .{1,50}/
13
+
14
+ if (!COMMIT_RE.test(msg)) {
15
+ console.log()
16
+ console.error(
17
+ ` ${pico.bgRed(pico.white(' ERROR '))} ${pico.red(`Invalid commit message format.`)}\n\n`
18
+ + ` ${pico.dim('Help us keep a meaningful git history by following')}\n\n`
19
+
20
+ + ` ${pico.yellow('Standard Format:')}\n`
21
+ + ` ${pico.green('<type>[optional scope]: <description>')}\n\n`
22
+
23
+ + ` ${pico.cyan('Common Types:')}\n`
24
+ + ` ${pico.green(' feat')} ${pico.dim('A new feature')}\n`
25
+ + ` ${pico.green(' fix')} ${pico.dim('A bug fix')}\n`
26
+ + ` ${pico.green(' docs')} ${pico.dim('Documentation only changes')}\n`
27
+ + ` ${pico.green(' style')} ${pico.dim('Changes that do not affect the meaning of the code')}\n`
28
+ + ` ${pico.green(' refactor')} ${pico.dim('Code change that neither fixes a bug nor adds a feature')}\n`
29
+ + ` ${pico.green(' perf')} ${pico.dim('A code change that improves performance')}\n`
30
+ + ` ${pico.green(' test')} ${pico.dim('Adding missing tests or correcting existing tests')}\n`
31
+ + ` ${pico.green(' build')} ${pico.dim('Changes that affect the build system or external dependencies')}\n`
32
+ + ` ${pico.green(' ci')} ${pico.dim('Changes to CI configuration files and scripts')}\n`
33
+ + ` ${pico.green(' chore')} ${pico.dim('Other changes that don\'t modify src or test files')}\n`
34
+ + ` ${pico.green(' revert')} ${pico.dim('Reverts a previous commit')}\n\n`
35
+
36
+ + ` ${pico.cyan('Correct Examples:')}\n`
37
+ + ` ${pico.white(' feat(ui): add secondary button style')}\n`
38
+ + ` ${pico.white(' fix(auth): resolve token expiration issue')}\n\n`,
39
+ )
40
+ process.exit(1)
41
+ }