File tree Expand file tree Collapse file tree 5 files changed +43
-27
lines changed Expand file tree Collapse file tree 5 files changed +43
-27
lines changed Original file line number Diff line number Diff line change @@ -145,14 +145,10 @@ function tag() {
145145 execSync ( `git config --global user.name ${ process . env . GITHUB_USER_NAME } ` ) ;
146146 execSync ( `git tag ${ version } ` ) ;
147147 execSync (
148- `git push https://${
149- process . env . GITHUB_TOKEN
150- } @github.com/vueComponent/ant-design-vue.git ${ version } :${ version } `,
148+ `git push https://${ process . env . GITHUB_TOKEN } @github.com/vueComponent/ant-design-vue.git ${ version } :${ version } ` ,
151149 ) ;
152150 execSync (
153- `git push https://${
154- process . env . GITHUB_TOKEN
155- } @github.com/vueComponent/ant-design-vue.git master:master`,
151+ `git push https://${ process . env . GITHUB_TOKEN } @github.com/vueComponent/ant-design-vue.git master:master` ,
156152 ) ;
157153 console . log ( 'tagged' ) ;
158154}
Original file line number Diff line number Diff line change @@ -110,9 +110,7 @@ export default {
110110 if ( settings . centerMode ) {
111111 if ( settings . slidesToScroll > 1 && process . env . NODE_ENV !== 'production' ) {
112112 console . warn (
113- `slidesToScroll should be equal to 1 in centerMode, you are using ${
114- settings . slidesToScroll
115- } `,
113+ `slidesToScroll should be equal to 1 in centerMode, you are using ${ settings . slidesToScroll } ` ,
116114 ) ;
117115 }
118116 settings . slidesToScroll = 1 ;
@@ -121,16 +119,12 @@ export default {
121119 if ( settings . fade ) {
122120 if ( settings . slidesToShow > 1 && process . env . NODE_ENV !== 'production' ) {
123121 console . warn (
124- `slidesToShow should be equal to 1 when fade is true, you're using ${
125- settings . slidesToShow
126- } `,
122+ `slidesToShow should be equal to 1 when fade is true, you're using ${ settings . slidesToShow } ` ,
127123 ) ;
128124 }
129125 if ( settings . slidesToScroll > 1 && process . env . NODE_ENV !== 'production' ) {
130126 console . warn (
131- `slidesToScroll should be equal to 1 when fade is true, you're using ${
132- settings . slidesToScroll
133- } `,
127+ `slidesToScroll should be equal to 1 when fade is true, you're using ${ settings . slidesToScroll } ` ,
134128 ) ;
135129 }
136130 settings . slidesToShow = 1 ;
Original file line number Diff line number Diff line change @@ -385,9 +385,7 @@ function processEntity(entity, wrapper) {
385385 if ( currentEntity ) {
386386 warning (
387387 false ,
388- `Conflict! value of node '${ entity . key } ' (${ value } ) has already used by node '${
389- currentEntity . key
390- } '.`,
388+ `Conflict! value of node '${ entity . key } ' (${ value } ) has already used by node '${ currentEntity . key } '.` ,
391389 ) ;
392390 }
393391 wrapper . valueEntities [ value ] = entity ;
Original file line number Diff line number Diff line change @@ -110,12 +110,18 @@ function copyHtml() {
110110 ) ;
111111}
112112
113- gulp . task ( '_site' , done => {
114- dist ( ( ) => {
113+ gulp . task (
114+ '_site' ,
115+ gulp . series ( done => {
116+ dist ( ( ) => {
117+ copyHtml ( ) ;
118+ done ( ) ;
119+ } ) ;
120+ } ) ,
121+ ) ;
122+ gulp . task (
123+ 'copy-html' ,
124+ gulp . series ( ( ) => {
115125 copyHtml ( ) ;
116- done ( ) ;
117- } ) ;
118- } ) ;
119- gulp . task ( 'copy-html' , ( ) => {
120- copyHtml ( ) ;
121- } ) ;
126+ } ) ,
127+ ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,28 @@ program.on('--help', () => {
1313
1414program . parse ( process . argv ) ;
1515
16+ function runTask ( toRun ) {
17+ const metadata = { task : toRun } ;
18+ // Gulp >= 4.0.0 (doesn't support events)
19+ const taskInstance = gulp . task ( toRun ) ;
20+ if ( taskInstance === undefined ) {
21+ gulp . emit ( 'task_not_found' , metadata ) ;
22+ return ;
23+ }
24+ const start = process . hrtime ( ) ;
25+ gulp . emit ( 'task_start' , metadata ) ;
26+ try {
27+ taskInstance . apply ( gulp ) ;
28+ metadata . hrDuration = process . hrtime ( start ) ;
29+ gulp . emit ( 'task_stop' , metadata ) ;
30+ gulp . emit ( 'stop' ) ;
31+ } catch ( err ) {
32+ err . hrDuration = process . hrtime ( start ) ;
33+ err . task = metadata . task ;
34+ gulp . emit ( 'task_err' , err ) ;
35+ }
36+ }
37+
1638const task = program . args [ 0 ] ;
1739
1840if ( ! task ) {
@@ -22,5 +44,5 @@ if (!task) {
2244
2345 require ( './gulpfile' ) ;
2446
25- gulp . start ( task ) ;
47+ runTask ( task ) ;
2648}
You can’t perform that action at this time.
0 commit comments