1
1
module . exports = api => {
2
- api . describeTask ( {
3
- match : / v u e - c l i - s e r v i c e s s r : s e r v e / ,
4
- description : `Compiles and hot-reloads for development with SSR` ,
5
- link : 'https://github.com/Akryum/vue-cli-plugin-ssr#usage' ,
2
+ const taskCommon = {
6
3
prompts : [
7
4
{
8
5
name : 'port' ,
@@ -14,17 +11,25 @@ module.exports = api => {
14
11
onBeforeRun : ( { answers, args } ) => {
15
12
if ( answers . port ) args . push ( '--port' , answers . port )
16
13
} ,
14
+ }
15
+
16
+ api . describeTask ( {
17
+ match : / v u e - c l i - s e r v i c e s s r : s e r v e - - m o d e p r o d u c t i o n / ,
18
+ description : `Starts the included HTTP server for SSR in production` ,
19
+ link : 'https://github.com/Akryum/vue-cli-plugin-ssr#usage' ,
20
+ ...taskCommon ,
17
21
} )
18
22
19
23
api . describeTask ( {
20
- match : / v u e - c l i - s e r v i c e s s r : b u i l d / ,
21
- description : `Compiles and minifies for production with SSR` ,
24
+ match : / v u e - c l i - s e r v i c e s s r : s e r v e / ,
25
+ description : `Compiles and hot-reloads for development with SSR` ,
22
26
link : 'https://github.com/Akryum/vue-cli-plugin-ssr#usage' ,
27
+ ...taskCommon ,
23
28
} )
24
29
25
30
api . describeTask ( {
26
- match : / v u e - c l i - s e r v i c e s s r : s t a r t / ,
27
- description : `Starts the included HTTP server for SSR in production ` ,
31
+ match : / v u e - c l i - s e r v i c e s s r : b u i l d / ,
32
+ description : `Compiles and minifies for production with SSR ` ,
28
33
link : 'https://github.com/Akryum/vue-cli-plugin-ssr#usage' ,
29
34
} )
30
35
}
0 commit comments