lucy-cli 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
package/dist/init.js CHANGED
@@ -25,8 +25,10 @@ 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
- fs.rm(join(moduleSettings.targetFolder, '.eslintrc.json'), { recursive: false });
29
- fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
28
+ await fs.rm(join(moduleSettings.targetFolder, '.eslintrc.json'), { recursive: false }).catch(e => {
29
+ console.log((`💩 ${red.underline.bold("=> Could not delete .eslintrc.json")}`));
30
+ });
31
+ await fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
30
32
  console.log(chalk.greenBright.underline('🐶 => Initialization done!'));
31
33
  }
32
34
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "lucy-cli",
4
- "version": "0.7.5",
4
+ "version": "0.7.6",
5
5
  "description": "Lucy Framework for WIX Studio Editor",
6
6
  "main": ".dist/index.js",
7
7
  "scripts": {
package/src/init.ts CHANGED
@@ -36,8 +36,10 @@ export async function init(moduleSettings: ModuleSettings, projectSettings: Proj
36
36
 
37
37
  moduleSettings.settings.initialized = true;
38
38
 
39
- fs.rm(join(moduleSettings.targetFolder, '.eslintrc.json'), { recursive: false });
40
- fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
39
+ await fs.rm(join(moduleSettings.targetFolder, '.eslintrc.json'), { recursive: false }).catch(e => {
40
+ console.log((`💩 ${red.underline.bold("=> Could not delete .eslintrc.json")}`));
41
+ });
42
+ await fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
41
43
 
42
44
  console.log(chalk.greenBright.underline('🐶 => Initialization done!'));
43
45
  }