@@ -61,41 +61,55 @@ Generator.prototype.copyFiles = function (arg) {
6161 ] ;
6262
6363 var ignores = [
64+ '.editorconfig' ,
6465 '.git' ,
6566 '.gitattributes' ,
66- '.gitignores ' ,
67+ '.gitignore ' ,
6768 '.jshintrc' ,
68- '.travis' ,
69+ '.travis.yml ' ,
6970 'CHANGELOG.md' ,
7071 'CONTRIBUTING.md' ,
71- 'doc' ,
7272 'LICENSE.md' ,
73- 'test' ,
74- 'README.md'
73+ 'README.md' ,
74+ 'bin' ,
75+ 'bower.json' ,
76+ 'doc' ,
77+ 'src' ,
78+ 'test'
7579 ] ;
7680
7781 var fetch = function ( configs ) {
7882
7983 var configsPath = path . join ( this . sourceRoot ( ) , configs . server ) ;
8084
85+ // Only the `node` server configs require the `package.json` file
86+ if ( configs . server !== 'node' ) {
87+ ignores . push ( 'package.json' ) ;
88+ }
89+
8190 this . tarball ( configs . url , configsPath , function ( ) {
8291
83- this . expand ( '*' , {
84- cwd : configsPath ,
85- dot : true
86- } ) . forEach ( function ( elem ) {
92+ if ( configs . server == "apache" ) {
93+ this . copy ( path . join ( configsPath , 'dist' , '.htaccess' ) , '.htaccess' ) ;
94+
95+ } else {
96+ this . expand ( '*' , {
97+ cwd : configsPath ,
98+ dot : true
99+ } ) . forEach ( function ( elem ) {
87100
88- var tmplPath = path . join ( configs . server , elem ) ;
101+ var tmplPath = path . join ( configs . server , elem ) ;
89102
90- if ( ignores . indexOf ( elem ) === - 1 ) {
91- if ( fs . lstatSync ( path . join ( configsPath , elem ) ) . isDirectory ( ) === true ) {
92- this . directory ( tmplPath , elem ) ;
93- } else {
94- this . copy ( tmplPath , elem ) ;
103+ if ( ignores . indexOf ( elem ) === - 1 ) {
104+ if ( fs . lstatSync ( path . join ( configsPath , elem ) ) . isDirectory ( ) === true ) {
105+ this . directory ( tmplPath , elem ) ;
106+ } else {
107+ this . copy ( tmplPath , elem ) ;
108+ }
95109 }
96- }
97110
98- } , this ) ;
111+ } , this ) ;
112+ }
99113
100114 cb ( ) ;
101115
@@ -136,7 +150,6 @@ Generator.prototype.copyFiles = function (arg) {
136150 // remove `doc` from `ignores`
137151 if ( props . includeDocs === true ) {
138152 ignores . splice ( ignores . indexOf ( 'doc' ) , 1 ) ;
139-
140153 }
141154
142155 fetch ( props . choice ) ;
0 commit comments