create-treble-app
Advanced tools
Comparing version 0.0.16 to 0.0.17
{ | ||
"name": "create-treble-app", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -68,2 +68,18 @@ import path, { dirname } from 'path'; | ||
async function renameGitIgnore(outputDir) { | ||
// We need to rename the gitignore file to .gitignore | ||
if ( | ||
!fs.pathExistsSync(path.join(outputDir, '.gitignore')) && | ||
fs.pathExistsSync(path.join(outputDir, 'gitignore')) | ||
) { | ||
await fs.move( | ||
path.join(outputDir, 'gitignore'), | ||
path.join(outputDir, '.gitignore') | ||
); | ||
} | ||
if (fs.pathExistsSync(path.join(outputDir, 'gitignore'))) { | ||
fs.removeSync(path.join(outputDir, 'gitignore')); | ||
} | ||
} | ||
export default async function cloneTemplate( | ||
@@ -86,2 +102,3 @@ projectName, | ||
await installDependencies(outputDir); | ||
await renameGitIgnore(outputDir); | ||
messages.complete(outputDir, projectName); | ||
@@ -88,0 +105,0 @@ } catch (e) { |
42207
777