@@ -12,7 +12,7 @@ const mkdirp = require('mkdirp');
1212const cwd = process . cwd ( ) ;
1313
1414function dist ( done ) {
15- rimraf . sync ( path . join ( cwd , 'site-dist ' ) ) ;
15+ rimraf . sync ( path . join ( cwd , '_site ' ) ) ;
1616 process . env . RUN_ENV = 'PRODUCTION' ;
1717 const webpackConfig = require ( path . join ( cwd , 'webpack.site.config.js' ) ) ;
1818 webpack ( webpackConfig , ( err , stats ) => {
@@ -53,30 +53,30 @@ function copyHtml() {
5353 input : fs . createReadStream ( path . join ( cwd , 'site/demoRoutes.js' ) ) ,
5454 } ) ;
5555 fs . writeFileSync (
56- path . join ( cwd , 'site-dist /404.html' ) ,
56+ path . join ( cwd , '_site /404.html' ) ,
5757 fs . readFileSync ( path . join ( cwd , 'site/404.html' ) ) ,
5858 ) ;
5959 fs . writeFileSync (
60- path . join ( cwd , 'site-dist /index-cn.html' ) ,
61- fs . readFileSync ( path . join ( cwd , 'site-dist /index.html' ) ) ,
60+ path . join ( cwd , '_site /index-cn.html' ) ,
61+ fs . readFileSync ( path . join ( cwd , '_site /index.html' ) ) ,
6262 ) ;
63- fs . writeFileSync ( path . join ( cwd , 'site-dist /CNAME' ) , 'vue.ant.design' ) ;
63+ fs . writeFileSync ( path . join ( cwd , '_site /CNAME' ) , 'vue.ant.design' ) ;
6464 rl . on ( 'line' , line => {
6565 if ( line . indexOf ( 'path:' ) > - 1 ) {
6666 const name = line . split ( "'" ) [ 1 ] . split ( "'" ) [ 0 ] ;
6767 console . log ( 'create path:' , name ) ;
6868 const toPaths = [
69- `site-dist /components/${ name } ` ,
70- // `site-dist /components/${name}-cn`,
71- `site-dist /iframe/${ name } ` ,
72- // `site-dist /iframe/${name}-cn`,
69+ `_site /components/${ name } ` ,
70+ // `_site /components/${name}-cn`,
71+ `_site /iframe/${ name } ` ,
72+ // `_site /iframe/${name}-cn`,
7373 ] ;
7474 toPaths . forEach ( toPath => {
7575 rimraf . sync ( path . join ( cwd , toPath ) ) ;
7676 mkdirp ( path . join ( cwd , toPath ) , function ( ) {
7777 fs . writeFileSync (
7878 path . join ( cwd , `${ toPath } /index.html` ) ,
79- fs . readFileSync ( path . join ( cwd , 'site-dist /index.html' ) ) ,
79+ fs . readFileSync ( path . join ( cwd , '_site /index.html' ) ) ,
8080 ) ;
8181 } ) ;
8282 } ) ;
@@ -92,16 +92,16 @@ function copyHtml() {
9292 const paths = file . path . split ( '/' ) ;
9393 const name = paths [ paths . length - 1 ] . split ( '.' ) [ 0 ] . toLowerCase ( ) ;
9494 const toPaths = [
95- 'site-dist /docs' ,
96- 'site-dist /docs/vue' ,
97- `site-dist /docs/vue/${ name } ` ,
98- `site-dist /docs/vue/${ name } -cn` ,
95+ '_site /docs' ,
96+ '_site /docs/vue' ,
97+ `_site /docs/vue/${ name } ` ,
98+ `_site /docs/vue/${ name } -cn` ,
9999 ] ;
100100 toPaths . forEach ( toPath => {
101101 mkdirp ( path . join ( cwd , toPath ) , function ( ) {
102102 fs . writeFileSync (
103103 path . join ( cwd , `${ toPath } /index.html` ) ,
104- fs . readFileSync ( path . join ( cwd , 'site-dist /index.html' ) ) ,
104+ fs . readFileSync ( path . join ( cwd , '_site /index.html' ) ) ,
105105 ) ;
106106 } ) ;
107107 } ) ;
@@ -110,7 +110,7 @@ function copyHtml() {
110110 ) ;
111111}
112112
113- gulp . task ( 'site-dist ' , done => {
113+ gulp . task ( '_site ' , done => {
114114 dist ( ( ) => {
115115 copyHtml ( ) ;
116116 } ) ;
0 commit comments