lucy-cli 0.7.6 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/gulp/types.js +3 -2
- package/dist/init.js +8 -3
- package/package.json +1 -1
- package/settings/page-settings.json +1 -1
- package/src/gulp/types.ts +3 -2
- package/src/index.ts +1 -1
- package/src/init.ts +9 -3
package/dist/gulp/types.js
CHANGED
@@ -29,6 +29,7 @@ export function updateWixTypes(options) {
|
|
29
29
|
masterSettings.include = ["../../../typescript/public/**/*", "index.d.ts", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*"];
|
30
30
|
// Add module to pageSettings
|
31
31
|
pageSettings.compilerOptions.paths['types/*'] = ["../../../typescript/types/*"];
|
32
|
+
pageSettings.compilerOptions.paths['backend/*'] = ["../../../typescript/backend/*.jsw.ts"];
|
32
33
|
pageSettings.include = ["../../../typescript/public/**/*", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*"];
|
33
34
|
if (modules) {
|
34
35
|
for (const [name] of Object.entries(modules)) {
|
@@ -58,12 +59,12 @@ export function updateWixTypes(options) {
|
|
58
59
|
pageSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`];
|
59
60
|
pageSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`];
|
60
61
|
pageSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*`);
|
61
|
-
pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend
|
62
|
+
pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*.jsw.ts`);
|
62
63
|
pageSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*`);
|
63
64
|
pageSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*`]);
|
64
65
|
}
|
65
66
|
}
|
66
|
-
return gulp.src(['./.wix/types
|
67
|
+
return gulp.src(['./.wix/types/**/*.json', '!./.wix/types/wix-code-types/*.json'])
|
67
68
|
.pipe(flatmap(function (stream, file) {
|
68
69
|
count++;
|
69
70
|
if (file.dirname.endsWith('public'))
|
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/gulp/types.ts
CHANGED
@@ -33,6 +33,7 @@ export function updateWixTypes(options: TaskOptions) {
|
|
33
33
|
masterSettings.include = [ "../../../typescript/public/**/*", "index.d.ts", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*" ] as never;
|
34
34
|
// Add module to pageSettings
|
35
35
|
pageSettings.compilerOptions.paths['types/*'] = [ "../../../typescript/types/*" ] as never;
|
36
|
+
pageSettings.compilerOptions.paths['backend/*'] = [ "../../../typescript/backend/*.jsw.ts" ] as never;
|
36
37
|
pageSettings.include = [ "../../../typescript/public/**/*", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*" ] as never;
|
37
38
|
|
38
39
|
if (modules) {
|
@@ -63,13 +64,13 @@ export function updateWixTypes(options: TaskOptions) {
|
|
63
64
|
pageSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`] as never;
|
64
65
|
pageSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`] as never;
|
65
66
|
pageSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*` as never);
|
66
|
-
pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend
|
67
|
+
pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*.jsw.ts` as never);
|
67
68
|
pageSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*` as never);
|
68
69
|
pageSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*` ] as never[]);
|
69
70
|
}
|
70
71
|
}
|
71
72
|
|
72
|
-
return gulp.src(['./.wix/types
|
73
|
+
return gulp.src(['./.wix/types/**/*.json', '!./.wix/types/wix-code-types/*.json'])
|
73
74
|
.pipe(flatmap(function(stream: NodeJS.ReadableStream, file: File) {
|
74
75
|
count ++;
|
75
76
|
if (file.dirname.endsWith('public')) return stream.pipe(jeditor(publicSettings)).pipe(jeditor((json: any) => processJson(json)));
|
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!'));
|