lucy-cli 0.7.15 → 0.8.1

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.
Files changed (47) hide show
  1. package/README.md +29 -1
  2. package/dist/Gulpfile.d.ts +1 -0
  3. package/dist/Gulpfile.js +14 -12
  4. package/dist/gulp/backend.d.ts +2 -5
  5. package/dist/gulp/backend.js +43 -82
  6. package/dist/gulp/checks.d.ts +2 -2
  7. package/dist/gulp/checks.js +21 -22
  8. package/dist/gulp/copy.d.ts +1 -2
  9. package/dist/gulp/copy.js +29 -34
  10. package/dist/gulp/helpers.d.ts +1 -0
  11. package/dist/gulp/helpers.js +7 -0
  12. package/dist/gulp/public.d.ts +1 -2
  13. package/dist/gulp/public.js +20 -33
  14. package/dist/gulp/styles.d.ts +1 -1
  15. package/dist/gulp/styles.js +19 -6
  16. package/dist/gulp/templates.d.ts +2 -2
  17. package/dist/gulp/templates.js +27 -30
  18. package/dist/gulp/test.d.ts +2 -2
  19. package/dist/gulp/test.js +24 -50
  20. package/dist/gulp/types.js +9 -18
  21. package/dist/gulp/watchers.d.ts +0 -6
  22. package/dist/gulp/watchers.js +27 -61
  23. package/dist/helpers.d.ts +4 -0
  24. package/dist/helpers.js +19 -0
  25. package/dist/index.js +7 -1
  26. package/dist/models.d.ts +37 -0
  27. package/dist/models.js +1 -0
  28. package/files/typescript/templates/render.ts +32 -0
  29. package/lucy.jpg +0 -0
  30. package/package.json +1 -1
  31. package/settings/master-settings.json +0 -1
  32. package/settings/page-settings.json +0 -1
  33. package/settings/public-settings.json +0 -1
  34. package/src/Gulpfile.ts +13 -17
  35. package/src/gulp/backend.ts +74 -107
  36. package/src/gulp/checks.ts +32 -28
  37. package/src/gulp/copy.ts +38 -40
  38. package/src/gulp/helpers.ts +9 -0
  39. package/src/gulp/public.ts +36 -47
  40. package/src/gulp/styles.ts +32 -13
  41. package/src/gulp/templates.ts +38 -39
  42. package/src/gulp/test.ts +55 -75
  43. package/src/gulp/types.ts +28 -41
  44. package/src/gulp/watchers.ts +31 -101
  45. package/src/helpers.ts +23 -1
  46. package/src/index.ts +7 -1
  47. package/src/models.ts +35 -0
@@ -1,2 +1,2 @@
1
- export declare function test(): () => any;
2
- export declare function testLib(): () => any;
1
+ import { TaskOptions } from '../Gulpfile.js';
2
+ export declare function test(options: TaskOptions): import("undertaker").TaskFunction;
package/dist/gulp/test.js CHANGED
@@ -1,11 +1,19 @@
1
1
  import gulp from 'gulp';
2
- import { blue, red } from '../index.js';
2
+ import { blue, orange, red } from '../index.js';
3
3
  import gulpJest from 'gulp-jest';
4
4
  const jest = gulpJest.default;
5
- export function test() {
6
- return () => {
7
- return gulp.src([
8
- 'typescript/backend/**/*.spec.ts',
5
+ export function test(options) {
6
+ const folders = ['typescript'];
7
+ if (options.modulesSync) {
8
+ for (const module of Object.keys(options.modulesSync)) {
9
+ folders.push(module);
10
+ }
11
+ }
12
+ // Create tasks for each folder
13
+ const tasks = folders.map((folder) => {
14
+ const taskName = `tests-${folder}`; // Create a unique name for each task
15
+ const task = () => gulp.src([
16
+ `${folder}/backend/**/*.spec.ts`,
9
17
  ])
10
18
  .pipe(jest({
11
19
  verbose: true,
@@ -14,7 +22,7 @@ export function test() {
14
22
  '^.+\\.tsx?$': [
15
23
  'ts-jest',
16
24
  {
17
- tsconfig: './typescript/tsconfig.json',
25
+ tsconfig: `./${folder}/tsconfig.json`,
18
26
  usESM: true,
19
27
  },
20
28
  ],
@@ -23,60 +31,26 @@ export function test() {
23
31
  setupFilesAfterEnv: [],
24
32
  testEnvironment: 'node',
25
33
  collectCoverage: true,
26
- coverageDirectory: '../coverage',
27
- coverageReporters: ['clover', 'json', 'lcov', 'text'],
28
- rootDir: './typescript',
29
- testMatch: ['**/*.spec.ts'],
30
- passWithNoTests: true,
31
- moduleNameMapper: {
32
- 'public/(.*)': '<rootDir>/public/$1'
33
- }
34
- }))
35
- .on('error', function () {
36
- console.log("💩" + red.underline.bold(' => Tests failed!'));
37
- this.emit('end');
38
- })
39
- .on('end', function () {
40
- console.log("🐶" + blue.underline(' => Test succeeded!'));
41
- });
42
- };
43
- }
44
- export function testLib() {
45
- return () => {
46
- return gulp.src([
47
- 'lib/backend/**/*.spec.ts',
48
- ])
49
- .pipe(jest({
50
- verbose: true,
51
- extensionsToTreatAsEsm: ['.ts'],
52
- transform: {
53
- '^.+\\.tsx?$': [
54
- 'ts-jest',
55
- {
56
- tsconfig: './lib/tsconfig.json',
57
- usESM: true,
58
- },
59
- ],
60
- },
61
- preset: 'ts-jest',
62
- setupFilesAfterEnv: [],
63
- testEnvironment: 'node',
64
- collectCoverage: true,
65
- passWithNoTests: true,
66
34
  coverageDirectory: './coverage',
67
35
  coverageReporters: ['clover', 'json', 'lcov', 'text'],
68
- rootDir: './lib',
36
+ rootDir: `./${folder}`,
69
37
  testMatch: ['**/*.spec.ts'],
38
+ passWithNoTests: true,
70
39
  moduleNameMapper: {
71
40
  'public/(.*)': '<rootDir>/public/$1'
72
41
  }
73
42
  }))
74
43
  .on('error', function () {
75
- console.log("💩" + red.underline.bold(' => Test (LIB) failed!'));
44
+ console.log("💩" + red.underline.bold(` => Tests for ${orange(folder)} failed!`));
76
45
  this.emit('end');
77
46
  })
78
47
  .on('end', function () {
79
- console.log("🐶" + blue.underline(' => Test (LIB) succeeded!'));
48
+ console.log("🐶" + blue.underline(` => Tests for ${orange(folder)} succeeded!`));
80
49
  });
81
- };
50
+ // Register the task with Gulp
51
+ Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
52
+ return task;
53
+ });
54
+ // Run all tasks in parallel
55
+ return gulp.parallel(...tasks);
82
56
  }
@@ -239,26 +239,17 @@ function processJson(obj) {
239
239
  }
240
240
  }
241
241
  function cleanTsConfig(json) {
242
- // Process the paths object to remove duplicates
242
+ // const paths: Record<string, string[]> = {};
243
243
  if (json.compilerOptions?.paths) {
244
- for (const key in json.compilerOptions.paths) {
245
- if (Array.isArray(json.compilerOptions.paths[key])) {
246
- const uniquePaths = [...new Set(json.compilerOptions.paths[key])];
247
- json.compilerOptions.paths[key] = uniquePaths.length > 0 ? uniquePaths : undefined;
248
- }
244
+ for (const [key, value] of Object.entries(json.compilerOptions.paths)) {
245
+ const uniquePaths = new Set(value);
246
+ json.compilerOptions.paths[key] = Array.from(uniquePaths);
247
+ // paths[key] = Array.from(uniquePaths);
249
248
  }
249
+ // json.compilerOptions.paths = paths;
250
250
  }
251
- // Process the include array to remove duplicates
252
- if (Array.isArray(json.include)) {
253
- const uniqueIncludes = [...new Set(json.include)];
254
- json.include = uniqueIncludes.length > 0 ? uniqueIncludes : undefined;
255
- }
256
- // Remove empty or undefined fields
257
- if (json.compilerOptions?.paths) {
258
- json.compilerOptions.paths = Object.fromEntries(Object.entries(json.compilerOptions.paths).filter(([_, value]) => value !== undefined));
259
- }
260
- if (json.include?.length === 0) {
261
- delete json.include;
262
- }
251
+ json.include = Array.from(new Set(json.include));
252
+ json.exclude = Array.from(new Set(json.exclude));
253
+ json.files = Array.from(new Set(json.files));
263
254
  return json;
264
255
  }
@@ -1,15 +1,9 @@
1
1
  import { TaskOptions } from '../Gulpfile.js';
2
2
  export declare function watchSCSS(): import("fs").FSWatcher;
3
3
  export declare function watchBackend(): import("fs").FSWatcher;
4
- export declare function watchBackendLib(): import("fs").FSWatcher;
5
- export declare function watchJSW(): import("fs").FSWatcher;
6
- export declare function watchJSWLib(): import("fs").FSWatcher;
7
4
  export declare function watchPublic(): import("fs").FSWatcher;
8
- export declare function watchPublicLib(): import("fs").FSWatcher;
9
5
  export declare function watchPages(): import("fs").FSWatcher;
10
6
  export declare function watchFiles(): import("fs").FSWatcher;
11
- export declare function watchFilesLib(): import("fs").FSWatcher;
12
7
  export declare function watchTemplates(): import("fs").FSWatcher;
13
- export declare function watchTemplatesLib(): import("fs").FSWatcher;
14
8
  export declare function watchTypes(): import("fs").FSWatcher;
15
9
  export declare function watchAll(options: TaskOptions): import("undertaker").TaskFunction;
@@ -1,85 +1,51 @@
1
1
  import gulp from 'gulp';
2
2
  import { green } from '../index.js';
3
- import { buildBackend, buildBackendJSW, buildBackendJSWLib, buildBackendLib } from './backend.js';
4
- import { buildPublic, buildPublicLib } from './public.js';
3
+ import { buildBackend } from './backend.js';
4
+ import { buildPublic } from './public.js';
5
5
  import { buildPages } from './pages.js';
6
- import { copyFiles, copyFilesLib } from './copy.js';
7
- import { previewTemplates, previewTemplatesLib } from './templates.js';
8
- import { checkTs, checkTsLib } from './checks.js';
9
- import { testLib, test } from './test.js';
6
+ import { copyFiles } from './copy.js';
7
+ import { previewTemplates } from './templates.js';
8
+ import { checkTs } from './checks.js';
9
+ import { test } from './test.js';
10
10
  let taskOptions;
11
11
  export function watchSCSS() {
12
12
  return gulp.watch([
13
- 'typescript/styles/**/*.scss',
14
- 'lib/styles/**/*.scss'
13
+ '*/styles/**/*.scss'
15
14
  ], gulp.parallel('scss'));
16
15
  }
17
16
  export function watchBackend() {
18
17
  return gulp.watch([
19
- 'typescript/backend/**/*.ts',
20
- 'typescript/backend/**/*.tsx',
21
- '!typescript/backend/**/*.spec.ts',
22
- '!typescript/backend/**/*.jsw.ts',
23
- ], gulp.parallel(test(), checkTs(), buildBackend(taskOptions)));
24
- }
25
- export function watchBackendLib() {
26
- return gulp.watch([
27
- 'lib/backend/**/*.ts',
28
- 'lib/backend/**/*.tsx',
29
- '!lib/backend/**/*.spec.ts',
30
- '!lib/backend/**/*.jsw.ts',
31
- ], gulp.parallel(testLib(), checkTsLib(), buildBackendLib(taskOptions)));
32
- }
33
- export function watchJSW() {
34
- return gulp.watch(['typescript/backend/**/*.jsw.ts'], gulp.parallel(test(), checkTs(), buildBackendJSW(taskOptions)));
35
- }
36
- export function watchJSWLib() {
37
- return gulp.watch(['lib/backend/**/*.jsw.ts'], gulp.parallel(testLib(), checkTsLib(), buildBackendJSWLib(taskOptions)));
18
+ '*/backend/**/*.ts',
19
+ '*/backend/**/*.tsx',
20
+ '!*/backend/**/*.spec.ts',
21
+ '!*/backend/**/*.jsw.ts',
22
+ '!src/**/**',
23
+ ], gulp.parallel(test(taskOptions), checkTs(taskOptions), buildBackend(taskOptions)));
38
24
  }
39
25
  export function watchPublic() {
40
26
  return gulp.watch([
41
- 'typescript/public/**/*.ts',
42
- 'typescript/public/**/*.tsx',
43
- ], gulp.parallel(test(), checkTs(), buildPublic(taskOptions)));
44
- }
45
- export function watchPublicLib() {
46
- return gulp.watch([
47
- 'lib/public/**/*.ts',
48
- 'lib/public/**/*.tsx',
49
- ], gulp.parallel(testLib(), checkTsLib(), buildPublicLib(taskOptions)));
27
+ '*/public/**/*.ts',
28
+ '*/public/**/*.tsx',
29
+ ], gulp.parallel(test(taskOptions), checkTs(taskOptions), buildPublic(taskOptions)));
50
30
  }
51
31
  export function watchPages() {
52
- return gulp.watch('typescript/pages/**/*.ts', gulp.parallel(checkTs(), buildPages(taskOptions)));
32
+ return gulp.watch('typescript/pages/**/*.ts', gulp.parallel(checkTs(taskOptions), buildPages(taskOptions)));
53
33
  }
54
34
  export function watchFiles() {
55
35
  return gulp.watch([
56
- 'typescript/backend/**/*',
57
- 'typescript/public/**/*',
58
- 'typescript/pages/**/*',
59
- '!typescript/**/*.ts',
36
+ '*/backend/**/*',
37
+ '*/public/**/*',
38
+ '*/pages/**/*',
39
+ '!*/**/*.ts',
40
+ '!*/**/*.tsx',
60
41
  ], gulp.parallel(copyFiles(taskOptions)));
61
42
  }
62
- export function watchFilesLib() {
63
- return gulp.watch([
64
- 'lib/backend/**/*',
65
- 'lib/public/**/*',
66
- 'lib/pages/**/*',
67
- '!lib/**/*.ts',
68
- ], gulp.parallel(copyFilesLib(taskOptions)));
69
- }
70
43
  export function watchTemplates() {
71
44
  return gulp.watch([
72
- 'typescript/backend/templates/**/*.tsx',
73
- 'typescript/backend/templates/data/*.json',
74
- '!typescript/backend/templates/render.ts',
75
- ], gulp.parallel(previewTemplates(), test()));
76
- }
77
- export function watchTemplatesLib() {
78
- return gulp.watch([
79
- 'lib/backend/templates/**/*.tsx',
80
- 'lib/backend/templates/data/*.json',
81
- '!lib/backend/templates/render.ts',
82
- ], gulp.parallel(previewTemplatesLib(), testLib()));
45
+ '*/backend/templates/**/*.tsx',
46
+ '*/backend/templates/data/*.json',
47
+ '!*/backend/templates/render.ts',
48
+ ], gulp.parallel(previewTemplates(taskOptions), test(taskOptions), checkTs(taskOptions)));
83
49
  }
84
50
  export function watchTypes() {
85
51
  return gulp.watch([
@@ -90,5 +56,5 @@ export function watchTypes() {
90
56
  export function watchAll(options) {
91
57
  taskOptions = options;
92
58
  console.log("🐕" + green.underline.bold(' => Adding watchers...'));
93
- return gulp.parallel(watchSCSS, watchBackend, watchBackendLib, watchJSW, watchJSWLib, watchPublic, watchPublicLib, watchPages, watchFilesLib, watchFiles, watchTemplates, watchTemplatesLib, watchTypes);
59
+ return gulp.parallel(watchSCSS, watchBackend, watchPublic, watchPages, watchFiles, watchTemplates, watchTypes);
94
60
  }
package/dist/helpers.d.ts CHANGED
@@ -2,3 +2,7 @@ import { ModuleSettings, ProjectSettings } from '.';
2
2
  export declare function installPackages(wixPackages: Record<string, string>, devPackages: Record<string, string>, cwd: string, locked: boolean): Promise<void>;
3
3
  export declare function gitInit(cwd: string, modules: Record<string, string>): Promise<void>;
4
4
  export declare function runGulp(moduleSettings: ModuleSettings, projectSettings: ProjectSettings, task: string): Promise<void>;
5
+ /**
6
+ * Clean up and run a command before exiting the process.
7
+ */
8
+ export declare function handleExit(): void;
package/dist/helpers.js CHANGED
@@ -4,6 +4,7 @@ import { spawnSync } from 'child_process';
4
4
  // https://www.sergevandenoever.nl/run-gulp4-tasks-programatically-from-node/
5
5
  import path from 'path';
6
6
  import { fileURLToPath } from 'url';
7
+ import { exec } from 'child_process';
7
8
  import { blue, green, orange, red } from './index.js';
8
9
  export async function installPackages(wixPackages, devPackages, cwd, locked) {
9
10
  if (locked)
@@ -67,3 +68,21 @@ export async function runGulp(moduleSettings, projectSettings, task) {
67
68
  // Check if 'dev' task exists
68
69
  gulpfile.runTask(task, moduleSettings, projectSettings);
69
70
  }
71
+ /**
72
+ * Clean up and run a command before exiting the process.
73
+ */
74
+ export function handleExit() {
75
+ const cwd = process.cwd();
76
+ const command = `watchman watch-del '${cwd}'`;
77
+ console.log("🐕" + blue.underline(' => Cleaning up...'));
78
+ exec(command, (error, stdout, stderr) => {
79
+ if (error) {
80
+ console.error(`💩 Failed to run cleanup: ${error.message}`);
81
+ return;
82
+ }
83
+ if (stderr) {
84
+ console.error(`⚠️ Watchman stderr: ${stderr}`);
85
+ }
86
+ console.log(`✅ Watchman cleanup success: ${stdout}`);
87
+ });
88
+ }
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { join } from 'path';
9
9
  import fs from 'fs/promises';
10
10
  import { init } from './init.js';
11
11
  import { sync } from './sync.js';
12
- import { runGulp, installPackages } from './helpers.js';
12
+ import { runGulp, installPackages, handleExit } from './helpers.js';
13
13
  import { prepare } from './prepare.js';
14
14
  export const orange = chalk.hex('#FFA500');
15
15
  export const blue = chalk.blueBright;
@@ -21,6 +21,11 @@ export const magenta = chalk.magentaBright;
21
21
  const __filename = fileURLToPath(import.meta.url);
22
22
  // eslint-disable-next-line @typescript-eslint/naming-convention
23
23
  const __dirname = dirname(__filename);
24
+ process.on('SIGINT', () => {
25
+ console.log("🐕 Received Ctrl+C, cleaning up...");
26
+ handleExit();
27
+ process.exit(); // Exit the process explicitly
28
+ });
24
29
  /**
25
30
  * Main function
26
31
  * @returns {Promise<void>}
@@ -114,6 +119,7 @@ async function main() {
114
119
  }
115
120
  if (moduleSettings.args.includes('-l'))
116
121
  moduleSettings.lockVersion = true;
122
+ console.log("🐕" + magenta.underline(' => Lucy CLI => RUNNING: ' + orange('Press Ctrl+C to stop.')));
117
123
  // INFO: Run commands
118
124
  if (moduleSettings.args.includes('init')) {
119
125
  if (projectSettings.lucySettings?.initialized && !moduleSettings.force) {
@@ -0,0 +1,37 @@
1
+ export type TSConfig = {
2
+ compilerOptions?: {
3
+ target?: string;
4
+ module?: string;
5
+ lib?: string[];
6
+ outDir?: string;
7
+ rootDir?: string;
8
+ strict?: boolean;
9
+ esModuleInterop?: boolean;
10
+ allowJs?: boolean;
11
+ checkJs?: boolean;
12
+ declaration?: boolean;
13
+ declarationMap?: boolean;
14
+ sourceMap?: boolean;
15
+ removeComments?: boolean;
16
+ noImplicitAny?: boolean;
17
+ moduleResolution?: "node" | "classic";
18
+ resolveJsonModule?: boolean;
19
+ skipLibCheck?: boolean;
20
+ types?: string[];
21
+ typeRoots?: string[];
22
+ jsx?: "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native";
23
+ incremental?: boolean;
24
+ noEmit?: boolean;
25
+ paths?: Record<string, string[]>;
26
+ [key: string]: any;
27
+ };
28
+ include?: string[];
29
+ exclude?: string[];
30
+ files?: string[];
31
+ extends?: string;
32
+ references?: {
33
+ path: string;
34
+ }[];
35
+ compileOnSave?: boolean;
36
+ [key: string]: any;
37
+ };
package/dist/models.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import * as fs from 'fs';
2
+
3
+
4
+ export interface RenderToFsOPtions {
5
+ renderer: (arg0: any, arg1: any) => Promise<string>;
6
+ dataSource: string;
7
+ destination: string;
8
+ }
9
+ /**
10
+ * Render E-Mail to file system
11
+ * @param {RenderToFsOPtions} options Preview Options
12
+ * @returns {Promise<void>}
13
+ */
14
+ export async function renderToFs(options: RenderToFsOPtions): Promise<void> {
15
+ if (process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'development') return;
16
+ console.log('rendered', process.env.NODE_ENV, options);
17
+ fs.readFile(`typescript/backend/templates/data/${options.dataSource}`, 'utf8', async (err, data) => {
18
+ if (err){
19
+ console.error('Template Rendere => ', err);
20
+
21
+ return;
22
+ }
23
+ const fakeDate = JSON.parse(data) as any;
24
+ console.log('fakeDate', fakeDate);
25
+ const html = await options.renderer(fakeDate, 'de');
26
+ fs.writeFile(`typescript/backend/templates/preview/${options.destination}.html`, html, err => {
27
+ if (err){
28
+ console.error(err);
29
+ }
30
+ });
31
+ });
32
+ }
package/lucy.jpg CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "lucy-cli",
4
- "version": "0.7.15",
4
+ "version": "0.8.1",
5
5
  "description": "Lucy Framework for WIX Studio Editor",
6
6
  "main": ".dist/index.js",
7
7
  "scripts": {
@@ -6,7 +6,6 @@
6
6
  "jsx": "react-jsx",
7
7
  "noEmit": false,
8
8
  "noUncheckedIndexedAccess": true,
9
- "lib": ["DOM", "ESNext"],
10
9
  "paths": {
11
10
  "backend/*.web.js": [],
12
11
  "backend/*.web": [],
@@ -7,7 +7,6 @@
7
7
  "jsx": "react-jsx",
8
8
  "noEmit": false,
9
9
  "noUncheckedIndexedAccess": true,
10
- "lib": ["DOM", "ESNext"],
11
10
  "paths": {
12
11
  "backend/*.web.js": [],
13
12
  "backend/*.web": [],
@@ -6,7 +6,6 @@
6
6
  "strict": true,
7
7
  "jsx": "react-jsx",
8
8
  "strictNullChecks": true,
9
- "lib": ["DOM", "ESNext"],
10
9
  "paths": {
11
10
  "backend/*.web.js": [],
12
11
  "backend/*.web": [],
package/src/Gulpfile.ts CHANGED
@@ -9,19 +9,20 @@ import masterSettings from '../settings/master-settings.json' assert { type: 'js
9
9
  import pageSettings from '../settings/page-settings.json' assert { type: 'json' };
10
10
  import publicSettings from '../settings/public-settings.json' assert { type: 'json' };
11
11
 
12
- import { buildPublic, buildPublicLib } from './gulp/public.js';
13
- import { buildBackend, buildBackendHTTP, buildBackendJSW, buildBackendJSWLib, buildBackendLib } from './gulp/backend.js';
14
- import { checkPages, checkTs, checkTsLib } from './gulp/checks.js';
12
+ import { buildPublic } from './gulp/public.js';
13
+ import { buildBackend, buildBackendJSW } from './gulp/backend.js';
14
+ import { checkPages, checkTs } from './gulp/checks.js';
15
15
  import { compileScss } from './gulp/styles.js';
16
16
  import { buildPages } from './gulp/pages.js';
17
- import { previewTemplates, previewTemplatesLib } from './gulp/templates.js';
18
- import { copyFiles, copyFilesLib } from './gulp/copy.js';
17
+ import { previewTemplates } from './gulp/templates.js';
18
+ import { copyFiles } from './gulp/copy.js';
19
19
  import { cleanSrc, cleanWix } from './gulp/clean.js';
20
20
  import { addTypes, updateWixTypes } from './gulp/types.js';
21
21
  import { setProdConfig } from './gulp/pipeline.js';
22
22
  import { watchAll } from './gulp/watchers.js';
23
23
  import { ModuleSettings, ProjectSettings, green, magenta, orange, red } from './index.js';
24
- import { testLib, test } from './gulp/test.js';
24
+ import { test } from './gulp/test.js';
25
+ import { getModulesSync } from './gulp/helpers.js';
25
26
 
26
27
  const sass = gulpSass(dartSass);
27
28
 
@@ -37,6 +38,7 @@ export type TaskOptions = {
37
38
  masterSettings: typeof masterSettings,
38
39
  pageSettings: typeof pageSettings,
39
40
  publicSettings: typeof publicSettings,
41
+ modulesSync: Record<string, string> | undefined;
40
42
  cwd: string;
41
43
  }
42
44
 
@@ -64,11 +66,11 @@ const taskOptions: TaskOptions = {
64
66
  masterSettings,
65
67
  replaceOptions,
66
68
  cwd: process.cwd(),
69
+ modulesSync: getModulesSync(),
67
70
  }
68
71
 
69
72
  gulp.task('check-ts', gulp.parallel(
70
- checkTs(),
71
- checkTsLib(),
73
+ checkTs(taskOptions),
72
74
  ));
73
75
 
74
76
  gulp.task('scss', gulp.parallel(
@@ -77,30 +79,24 @@ gulp.task('scss', gulp.parallel(
77
79
 
78
80
  gulp.task('build-backend', gulp.parallel(
79
81
  buildBackend(taskOptions),
80
- buildBackendLib(taskOptions),
81
82
  buildBackendJSW(taskOptions),
82
- buildBackendJSWLib(taskOptions),
83
83
  // buildBackendHTTP(taskOptions),
84
84
  ));
85
85
 
86
86
  gulp.task('build-public', gulp.parallel(
87
87
  buildPublic(taskOptions),
88
- buildPublicLib(taskOptions),
89
88
  ));
90
89
 
91
90
  gulp.task('preview-templates', gulp.parallel(
92
- previewTemplates(),
93
- previewTemplatesLib()
91
+ previewTemplates(taskOptions),
94
92
  ));
95
93
 
96
94
  gulp.task('copy-files', gulp.parallel(
97
95
  copyFiles(taskOptions),
98
- copyFilesLib(taskOptions)
99
96
  ));
100
97
 
101
98
  gulp.task('test', gulp.parallel(
102
- test(),
103
- testLib(),
99
+ test(taskOptions),
104
100
  ));
105
101
 
106
102
  gulp.task('sync-types', shell.task([
@@ -196,7 +192,7 @@ async function gulpTaskRunner(task: string) {
196
192
  }
197
193
 
198
194
  export async function runTask(task: string, moduleSettings: ModuleSettings, projectSettings: ProjectSettings) {
199
- taskOptions.cwd = moduleSettings.targetFolder;
195
+ taskOptions.cwd = moduleSettings.targetFolder;
200
196
  taskOptions.moduleSettings = moduleSettings;
201
197
  taskOptions.projectSettings = projectSettings;
202
198
  console.log("🐕" + magenta.underline(' => Starting Task => ' + orange(task)));