You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github-tools.github.io/github-release-notes/)
[](https://github-tools.github.io/github-release-notes/)
8
8
9
9
vue-sfc-cli is a powerful tool for developing vue single-file component.
10
10
11
11
It makes writing docs and demo easily, integrated with an automated github workflow, and is always ready to publish to npm with best practices.
12
12
13
+
[中文文档](./README-zh.md)
14
+
13
15
## Table Of Contents
14
16
15
17
-[Links](#links)
18
+
-[Notice](#notice)
19
+
-[Requirement](#requirement)
20
+
-[Prettier and husky](#prettier-and-husky)
21
+
-[Stylelint](#stylelint)
22
+
-[Windows](#windows)
16
23
-[Tutorial](#tutorial)
17
24
-[Quick Start](#quick-start)
18
25
-[Options](#options)
@@ -24,15 +31,40 @@ It makes writing docs and demo easily, integrated with an automated github workf
24
31
-[Methods](#methods)
25
32
-[Working with third-party library](#working-with-third-party-library)
The component template has built-in prettier and husky setup that can format code when you commit.
49
+
50
+
However, you need to execute commands as following, otherwise the commit hook will not take effect:
51
+
52
+
```sh
53
+
npx vue-sfc-cli
54
+
55
+
# git init must run before yarn
56
+
git init
57
+
58
+
yarn
59
+
```
60
+
61
+
### Stylelint
62
+
63
+
The component template has built-in stylelint, which perfectly supports less/sass, but not stylus(it cannot have comment)
64
+
65
+
### Windows
66
+
67
+
It is not recommended to generate components under Windows, cause `.sh` files may lost execution permissions.
36
68
37
69
## Tutorial
38
70
@@ -66,9 +98,7 @@ yarn publish
66
98
67
99
### Options
68
100
69
-
```
70
-
-u, --upgrade
71
-
```
101
+
`-u`, `--upgrade`
72
102
73
103
According to the template files in the templates directory, new files will be generated and override the files with same name in current component directory. The default override files is defined in update-files.js. This option often used to upgrade the configuration of old components using the latest version of vue-sfc-cli:
74
104
@@ -77,22 +107,30 @@ According to the template files in the templates directory, new files will be ge
77
107
npx vue-sfc-cli -u
78
108
```
79
109
80
-
`—files`
110
+
`—-files`
81
111
82
112
If you want to update additional files, you can pass this option, multiple files use `,` to separate
The docs directory hosts your component's examples. You just write markdown files, and they will turn into demo. It is also recommended to name the markdown files in kebab-case style.
@@ -245,20 +283,6 @@ module.exports = {
245
283
}
246
284
```
247
285
248
-
### Prettier and husky
249
-
250
-
The component template has a built-in prettier and husky setup that can format code when you commit.
251
-
252
-
However, you need to execute the git init command before running yarn ,otherwise the commit hook will not take effect.
253
-
254
-
### Notice
255
-
256
-
It is not recommended to generate components under Windows, as `.sh` files may lost execution permissions.
257
-
258
-
## requirement
259
-
260
-
Node.js 8.x
261
-
262
286
## Contributors
263
287
264
288
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
[](https://github-tools.github.io/github-release-notes/)
0 commit comments