@@ -6,7 +6,9 @@ const fs = require('fs');
66module . exports = function Methods ( api , projectOptions ) {
77
88 // 针对 vue plugin 的注册
9- api . extendMethod ( 'registerVuePlugin' , options => {
9+ api . extendMethod ( 'registerVuePlugin' , {
10+ description : '针对 vue-cli plugin 的注册方法.' ,
11+ } , options => {
1012 const { id, opts = { } , link, apply } = options ;
1113 assert ( id , 'id must supplied' ) ;
1214 assert ( typeof id === 'string' , 'id must be string' ) ;
@@ -25,11 +27,11 @@ module.exports = function Methods(api, projectOptions) {
2527 id : `vue-service:plugins-${ id } ` ,
2628 opts : Object . assign ( { } , projectOptions , opts ) , // vue.config.js
2729 } ) ;
28- } , {
29- description : '针对 vue-cli plugin 的注册方法.' ,
3030 } ) ;
3131
32- api . extendMethod ( 'registerVueCommand' , ( name , opts , fn ) => {
32+ api . extendMethod ( 'registerVueCommand' , {
33+ description : '针对 vue-cli command 的注册方法.' ,
34+ } , ( name , opts , fn ) => {
3335 assert ( name , 'name must supplied' ) ;
3436 assert ( typeof name === 'string' , 'name must be string' ) ;
3537 switch ( name ) {
@@ -80,8 +82,6 @@ module.exports = function Methods(api, projectOptions) {
8082 break ;
8183 }
8284 api . registerCommand ( `vue-service-${ name } ` , opts , fn ) ;
83- } , {
84- description : '针对 vue-cli command 的注册方法.' ,
8585 } ) ;
8686
8787} ;
0 commit comments