Skip to content

Commit d7f5358

Browse files
committed
do not touch local .git before copying template files #17
1 parent bd0cf34 commit d7f5358

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const { spawn } = require('child_process');
44
const { Select } = require('enquirer');
55
const fs = require('fs');
66
const path = require('path');
7-
const rimraf = require('rimraf');
87
const recursiveCopy = require('recursive-copy');
98

109
const isBun = (typeof(Bun) !== "undefined" || (process.env.npm_config_user_agent && process.env.npm_config_user_agent.indexOf("bun") >= 0));
@@ -50,10 +49,10 @@ prompt.run().then(language => {
5049
fs.mkdirSync(outputDir);
5150
}
5251

53-
// TODO: check "git status" before removing .git
54-
rimraf.sync(path.resolve(outputDir, '.git'));
55-
56-
const options = { dot: true, };
52+
const options = {
53+
dot: true,
54+
overwrite: false,
55+
};
5756

5857
recursiveCopy(path.resolve(__dirname, "templates", templateName), outputDir, options, function (err, results) {
5958
if (err) {

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-colyseus-app",
3-
"version": "0.16.3",
3+
"version": "0.16.4",
44
"description": "npm init template for bootstrapping an empty Colyseus project",
55
"main": "lib/index.js",
66
"bin": {
@@ -27,7 +27,6 @@
2727
"dependencies": {
2828
"enquirer": "^2.3.0",
2929
"npm": "^10.8.2",
30-
"recursive-copy": "^2.0.13",
31-
"rimraf": "^2.6.3"
30+
"recursive-copy": "^2.0.13"
3231
}
3332
}

0 commit comments

Comments
 (0)