lucy-cli 0.7.6 → 0.7.7
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/dist/init.js +8 -3
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/init.ts +9 -3
package/dist/init.js
CHANGED
@@ -25,9 +25,14 @@ export async function init(moduleSettings, projectSettings) {
|
|
25
25
|
await editJson(join(moduleSettings.targetFolder, 'typedoc.json'), ['name'], [path.basename(moduleSettings.targetFolder)]);
|
26
26
|
await gitInit(moduleSettings.targetFolder, moduleSettings.settings.modules);
|
27
27
|
moduleSettings.settings.initialized = true;
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
const eslintrcPath = join(moduleSettings.targetFolder, '.eslintrc.json');
|
29
|
+
if (existsSync(eslintrcPath)) {
|
30
|
+
console.log((`🐕 ${blue.underline.bold("=> Deleting .eslintrc.json")}`));
|
31
|
+
await fs.rm(join(eslintrcPath), { recursive: false }).catch(e => {
|
32
|
+
console.log((`💩 ${red.underline.bold("=> Could not delete .eslintrc.json ")} ${red.bold("=> ", e)}`));
|
33
|
+
});
|
34
|
+
}
|
35
|
+
console.log((`🐕 ${blue.underline.bold("=> Writing settings to lucy.json")}`));
|
31
36
|
await fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
|
32
37
|
console.log(chalk.greenBright.underline('🐶 => Initialization done!'));
|
33
38
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/init.ts
CHANGED
@@ -36,9 +36,15 @@ export async function init(moduleSettings: ModuleSettings, projectSettings: Proj
|
|
36
36
|
|
37
37
|
moduleSettings.settings.initialized = true;
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
const eslintrcPath = join(moduleSettings.targetFolder, '.eslintrc.json');
|
40
|
+
if(existsSync(eslintrcPath)) {
|
41
|
+
console.log((`🐕 ${blue.underline.bold("=> Deleting .eslintrc.json")}`));
|
42
|
+
await fs.rm(join(eslintrcPath), { recursive: false }).catch(e => {
|
43
|
+
console.log((`💩 ${red.underline.bold("=> Could not delete .eslintrc.json ")} ${red.bold("=> ", e)}`));
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
console.log((`🐕 ${blue.underline.bold("=> Writing settings to lucy.json")}`));
|
42
48
|
await fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
|
43
49
|
|
44
50
|
console.log(chalk.greenBright.underline('🐶 => Initialization done!'));
|