components-differ 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +5 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -25,8 +25,8 @@ const runCommand = (command) => {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const ensureGitignore = () => {
|
|
28
|
-
const
|
|
29
|
-
if (!fs.existsSync(
|
|
28
|
+
const gitignorePath = path.join(process.cwd(), ".gitignore");
|
|
29
|
+
if (!fs.existsSync(gitignorePath)) {
|
|
30
30
|
console.log(".gitignore file is missing. Creating one...");
|
|
31
31
|
const content = `
|
|
32
32
|
/node_modules
|
|
@@ -67,10 +67,10 @@ yarn-error.log*
|
|
|
67
67
|
*.tsbuildinfo
|
|
68
68
|
next-env.d.ts
|
|
69
69
|
`;
|
|
70
|
-
fs.writeFileSync(
|
|
71
|
-
console.log(".
|
|
70
|
+
fs.writeFileSync(gitignorePath, content, "utf8");
|
|
71
|
+
console.log(".gitignore file created with default rules.");
|
|
72
72
|
} else {
|
|
73
|
-
console.log(".
|
|
73
|
+
console.log(".gitignore file already exists.");
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
|