Skip to content

Commit

Permalink
Merge pull request #32 from jr-cologne/fix-installation-src-folder
Browse files Browse the repository at this point in the history
Fix installation bug: Prevent copying src folder if folder is already present
  • Loading branch information
jr-cologne authored Jun 20, 2019
2 parents 0c53d42 + d56a743 commit c5e10ac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If applicable, add screenshots to help explain your problem.
**Environment (please complete the following information):**
- Node Version: [e.g. 10]
- Gulp Version: [e.g. 4.0.2]
- Gulp Starter Kit Version: [e.g. 0.10.6-beta]
- Gulp Starter Kit Version: [e.g. 0.10.7-beta]
- Version of any other affected dependency: [e.g. [email protected]]

**OS (please complete the following information):**
Expand Down
7 changes: 5 additions & 2 deletions bin/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ const copyAdditionalFiles = async directory => {
const projectPath = (directory !== '') ? `${ directory }/` : '';

try {
await fs
.copy(path.join(__dirname, '../src'), `${ projectPath }src`);
if (!fs.existsSync(`${ projectPath }src`)) {
await fs
.copy(path.join(__dirname, '../src'), `${ projectPath }src`);
}

return true;
} catch (err) {
console.error(err);
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author JR Cologne <[email protected]>
* @copyright 2019 JR Cologne
* @license https://github.com/jr-cologne/gulp-starter-kit/blob/master/LICENSE MIT
* @version v0.10.6-beta
* @version v0.10.7-beta
* @link https://github.com/jr-cologne/gulp-starter-kit GitHub Repository
* @link https://www.npmjs.com/package/@jr-cologne/create-gulp-starter-kit npm package site
*
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jr-cologne/create-gulp-starter-kit",
"version": "0.10.6-beta",
"version": "0.10.7-beta",
"description": "A simple Gulp 4 Starter Kit for modern web development.",
"keywords": [
"gulp",
Expand Down

0 comments on commit c5e10ac

Please sign in to comment.