Skip to content

Commit b1eea70

Browse files
committed
Fix scandir path
1 parent 01479b9 commit b1eea70

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

typescript-express-starter/bin/cli.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ const destination = getDest(process.argv[2]);
1212
console.log('Setting up new TypeScript-Express-Starter Project');
1313

1414
tsExpressStarter(destination).then(() => {
15-
console.log('tsExpressStarter', destination);
1615
console.log('Project setup complete!');
1716
});
1817

1918
function getDest(destFolder) {
20-
console.log('getDest', destFolder);
2119
destFolder = destFolder || 'typescript-express-starter';
2220
return path.join(process.cwd(), destFolder);
2321
};

typescript-express-starter/lib/typescript-express-starter.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const editJsonFile = require('edit-json-file');
99
const childProcess = require('child_process');
1010
const inquirer = require('inquirer');
1111
const ncp = require('ncp').ncp;
12-
const TARGET_DIR = `${process.cwd()}/lib`;
1312

1413
async function tsExpressStarter(destination) {
1514
try {
@@ -26,16 +25,14 @@ async function tsExpressStarter(destination) {
2625
function getDirectorys() {
2726
let directorys = [];
2827

29-
console.log('getDirectorys', TARGET_DIR);
30-
fs.readdirSync(TARGET_DIR, { withFileTypes: true })
28+
fs.readdirSync(__dirname, { withFileTypes: true })
3129
.forEach(p => {
3230
const dir = p.name;
3331
if (p.isDirectory()) {
3432
directorys.push(dir);
3533
}
3634
});
3735

38-
console.log('directorys', directorys)
3936
return directorys;
4037
};
4138

typescript-express-starter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-express-starter",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Quick and easy TypeScript Express Starter package",
55
"author": "AGUMON [email protected]",
66
"license": "MIT",

0 commit comments

Comments
 (0)