File tree Expand file tree Collapse file tree 1 file changed +38
-16
lines changed
Expand file tree Collapse file tree 1 file changed +38
-16
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,15 @@ generated vue.js application.
2222
2323## setup
2424
25- install via npm:
26-
27- ``` sh
28- npm i vue-cli-template-dev-server -D
29- ```
30-
31-
32- ## usage
25+ - install via npm:
26+
27+ ``` sh
28+ npm i vue-cli-template-dev-server -D
29+ ```
3330
34- - in your custom vue-cli template project, add these bits:
31+ - add these bits:
3532
36- * package.json*
33+ * package.json < sup > \* </ sup > *
3734
3835 ``` json5
3936 {
@@ -48,18 +45,43 @@ npm i vue-cli-template-dev-server -D
4845 ``` gitignore
4946 out/
5047 ```
51-
52- - than, run:
5348
54- ``` sh
55- npm run dev
56- ```
49+ <sup >* \* if you don't have a package.json file, run ` npm init ` .* </sup >
50+
51+
52+ ## usage
53+
54+ simply run the dev script:
55+
56+ ``` sh
57+ npm run dev
58+ ```
59+
60+ the server script accepts two optional arguments. the first one is used for overriding the output directory path
61+ (defaults to ` out ` ), and the second for the output project name (` awesome-vue-app ` , if not provided).
62+
63+ to use them, either directly run:
64+
65+ ``` sh
66+ npm run dev -- ' dist/dev-server-out' ' my-app'
67+ ```
68+
69+ &hellip ; or put them in the package scripts for good:
70+
71+ ``` json5
72+ {
73+ " scripts" : {
74+ " dev" : " vue-cli-template-dev-server 'dist/dev-server-out' 'my-app'"
75+ },
76+ }
77+ ```
78+
5779
5880
5981## demo
6082
6183check out the [ * /example* ] [ 5 ] directory in this repository for an example usage with the most simple application.
62- it has just the bare minimum required for the dev-server to work.
84+ it only contains what's required for the dev-server to work.
6385
6486to see it in action:
6587
You can’t perform that action at this time.
0 commit comments