Skip to content

Commit 9db63f6

Browse files
committed
cpm directory bug fix
1 parent f487df8 commit 9db63f6

File tree

3 files changed

+234
-3
lines changed

3 files changed

+234
-3
lines changed

.gitignore

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,3 +1292,235 @@ dist
12921292
.vscode-test
12931293

12941294
# End of https://www.toptal.com/developers/gitignore/api/node
1295+
1296+
# Created by https://www.toptal.com/developers/gitignore/api/node
1297+
# Edit at https://www.toptal.com/developers/gitignore?templates=node
1298+
1299+
### Node ###
1300+
# Logs
1301+
logs
1302+
*.log
1303+
npm-debug.log*
1304+
yarn-debug.log*
1305+
yarn-error.log*
1306+
lerna-debug.log*
1307+
1308+
# Diagnostic reports (https://nodejs.org/api/report.html)
1309+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1310+
1311+
# Runtime data
1312+
pids
1313+
*.pid
1314+
*.seed
1315+
*.pid.lock
1316+
1317+
# Directory for instrumented libs generated by jscoverage/JSCover
1318+
lib-cov
1319+
1320+
# Coverage directory used by tools like istanbul
1321+
coverage
1322+
*.lcov
1323+
1324+
# nyc test coverage
1325+
.nyc_output
1326+
1327+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
1328+
.grunt
1329+
1330+
# Bower dependency directory (https://bower.io/)
1331+
bower_components
1332+
1333+
# node-waf configuration
1334+
.lock-wscript
1335+
1336+
# Compiled binary addons (https://nodejs.org/api/addons.html)
1337+
build/Release
1338+
1339+
# Dependency directories
1340+
node_modules/
1341+
jspm_packages/
1342+
1343+
# TypeScript v1 declaration files
1344+
typings/
1345+
1346+
# TypeScript cache
1347+
*.tsbuildinfo
1348+
1349+
# Optional npm cache directory
1350+
.npm
1351+
1352+
# Optional eslint cache
1353+
.eslintcache
1354+
1355+
# Microbundle cache
1356+
.rpt2_cache/
1357+
.rts2_cache_cjs/
1358+
.rts2_cache_es/
1359+
.rts2_cache_umd/
1360+
1361+
# Optional REPL history
1362+
.node_repl_history
1363+
1364+
# Output of 'npm pack'
1365+
*.tgz
1366+
1367+
# Yarn Integrity file
1368+
.yarn-integrity
1369+
1370+
# dotenv environment variables file
1371+
.env
1372+
.env.test
1373+
.env*.local
1374+
1375+
# parcel-bundler cache (https://parceljs.org/)
1376+
.cache
1377+
.parcel-cache
1378+
1379+
# Next.js build output
1380+
.next
1381+
1382+
# Nuxt.js build / generate output
1383+
.nuxt
1384+
dist
1385+
1386+
# Gatsby files
1387+
.cache/
1388+
# Comment in the public line in if your project uses Gatsby and not Next.js
1389+
# https://nextjs.org/blog/next-9-1#public-directory-support
1390+
# public
1391+
1392+
# vuepress build output
1393+
.vuepress/dist
1394+
1395+
# Serverless directories
1396+
.serverless/
1397+
1398+
# FuseBox cache
1399+
.fusebox/
1400+
1401+
# DynamoDB Local files
1402+
.dynamodb/
1403+
1404+
# TernJS port file
1405+
.tern-port
1406+
1407+
# Stores VSCode versions used for testing VSCode extensions
1408+
.vscode-test
1409+
1410+
# End of https://www.toptal.com/developers/gitignore/api/node
1411+
1412+
# Created by https://www.toptal.com/developers/gitignore/api/node
1413+
# Edit at https://www.toptal.com/developers/gitignore?templates=node
1414+
1415+
### Node ###
1416+
# Logs
1417+
logs
1418+
*.log
1419+
npm-debug.log*
1420+
yarn-debug.log*
1421+
yarn-error.log*
1422+
lerna-debug.log*
1423+
1424+
# Diagnostic reports (https://nodejs.org/api/report.html)
1425+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1426+
1427+
# Runtime data
1428+
pids
1429+
*.pid
1430+
*.seed
1431+
*.pid.lock
1432+
1433+
# Directory for instrumented libs generated by jscoverage/JSCover
1434+
lib-cov
1435+
1436+
# Coverage directory used by tools like istanbul
1437+
coverage
1438+
*.lcov
1439+
1440+
# nyc test coverage
1441+
.nyc_output
1442+
1443+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
1444+
.grunt
1445+
1446+
# Bower dependency directory (https://bower.io/)
1447+
bower_components
1448+
1449+
# node-waf configuration
1450+
.lock-wscript
1451+
1452+
# Compiled binary addons (https://nodejs.org/api/addons.html)
1453+
build/Release
1454+
1455+
# Dependency directories
1456+
node_modules/
1457+
jspm_packages/
1458+
1459+
# TypeScript v1 declaration files
1460+
typings/
1461+
1462+
# TypeScript cache
1463+
*.tsbuildinfo
1464+
1465+
# Optional npm cache directory
1466+
.npm
1467+
1468+
# Optional eslint cache
1469+
.eslintcache
1470+
1471+
# Microbundle cache
1472+
.rpt2_cache/
1473+
.rts2_cache_cjs/
1474+
.rts2_cache_es/
1475+
.rts2_cache_umd/
1476+
1477+
# Optional REPL history
1478+
.node_repl_history
1479+
1480+
# Output of 'npm pack'
1481+
*.tgz
1482+
1483+
# Yarn Integrity file
1484+
.yarn-integrity
1485+
1486+
# dotenv environment variables file
1487+
.env
1488+
.env.test
1489+
.env*.local
1490+
1491+
# parcel-bundler cache (https://parceljs.org/)
1492+
.cache
1493+
.parcel-cache
1494+
1495+
# Next.js build output
1496+
.next
1497+
1498+
# Nuxt.js build / generate output
1499+
.nuxt
1500+
dist
1501+
1502+
# Gatsby files
1503+
.cache/
1504+
# Comment in the public line in if your project uses Gatsby and not Next.js
1505+
# https://nextjs.org/blog/next-9-1#public-directory-support
1506+
# public
1507+
1508+
# vuepress build output
1509+
.vuepress/dist
1510+
1511+
# Serverless directories
1512+
.serverless/
1513+
1514+
# FuseBox cache
1515+
.fusebox/
1516+
1517+
# DynamoDB Local files
1518+
.dynamodb/
1519+
1520+
# TernJS port file
1521+
.tern-port
1522+
1523+
# Stores VSCode versions used for testing VSCode extensions
1524+
.vscode-test
1525+
1526+
# End of https://www.toptal.com/developers/gitignore/api/node

app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ const overWriteFile = async (filePath, contents) => {
6464
};
6565

6666
const generateGitignoreFile = async (contents) => {
67-
console.log("===generateGitignoreFile===", __dirname);
68-
const filePath = path.resolve(path.join(__dirname, ".gitignore"));
67+
const filePath = path.resolve(path.join(process.cwd(), ".gitignore"));
6968
const isExists = await fs.existsSync(filePath);
7069
if (isExists) {
7170
await overWriteFile(filePath, contents);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gigen",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "",
55
"main": "app.js",
66
"scripts": {

0 commit comments

Comments
 (0)