File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,13 @@ export interface CopyConfig {
8787export async function copy ( args : CopyConfig ) {
8888 const templateFiles = await globby ( slash ( args . templateDir ) , { dot : true } ) ;
8989 for ( const sourcePath of templateFiles ) {
90- const relativePath = path . relative ( args . templateDir , sourcePath ) ;
91- const targetPath = slash ( format (
92- path . resolve ( args . packageDir , relativePath ) ,
93- args . view
94- ) ) . replace ( / \/ g i t i g n o r e $ / , '/.gitignore' ) ; // https://github.com/uetchy/create-create-app/issues/38
90+ const relativePath = path . relative ( args . templateDir , slash ( sourcePath ) ) ;
91+ const targetPath = slash (
92+ format ( path . resolve ( args . packageDir , relativePath ) , args . view )
93+ ) . replace ( / \/ g i t i g n o r e $ / , '/.gitignore' ) ; // https://github.com/uetchy/create-create-app/issues/38
9594 prepareDirectory ( targetPath ) ;
9695
97- let sourceData = fs . readFileSync ( sourcePath ) ;
96+ let sourceData = fs . readFileSync ( slash ( sourcePath ) ) ;
9897 let targetData = sourceData ;
9998 if ( isUtf8 ( sourceData ) ) {
10099 targetData = Buffer . from ( format ( sourceData , args . view ) ) ;
You can’t perform that action at this time.
0 commit comments