lucy-cli 0.8.2 → 0.9.0

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.
@@ -0,0 +1,141 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ import eslint from '@eslint/js';
4
+ import importPlugin from 'eslint-plugin-import';
5
+ import jsdoc from 'eslint-plugin-jsdoc';
6
+ import namedImportSpacing from 'eslint-plugin-named-import-spacing';
7
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
8
+ import globals from 'globals';
9
+ import tseslint from 'typescript-eslint';
10
+
11
+ export default tseslint.config(
12
+
13
+ eslint.configs.recommended,
14
+ tseslint.configs.recommendedTypeChecked,
15
+ jsdoc.configs['flat/recommended-typescript'],
16
+ {
17
+ ignores: ['./.wix', './src'],
18
+ plugins: {
19
+ '@typescript-eslint': tseslint.plugin,
20
+ 'simple-import-sort': simpleImportSort,
21
+ import: importPlugin,
22
+ 'named-import-spacing': namedImportSpacing,
23
+ jsdoc,
24
+ },
25
+ languageOptions: {
26
+ parser: tseslint.parser,
27
+ parserOptions: {
28
+ projectService: true,
29
+ },
30
+ ecmaVersion: 2020,
31
+ sourceType: 'module',
32
+ globals: {
33
+ $w: 'readonly',
34
+ ...globals.browser,
35
+ ...globals.node,
36
+ // ...globals.es6,
37
+ },
38
+ },
39
+ rules: {
40
+ 'no-restricted-syntax': [
41
+ 'error',
42
+ {
43
+ selector: 'StaticBlock',
44
+ message: 'Static blocks are not allowed in classes.',
45
+ },
46
+ ],
47
+ '@typescript-eslint/no-unsafe-argument': 'error',
48
+ '@typescript-eslint/no-unsafe-assignment': 'error',
49
+ '@typescript-eslint/no-unsafe-call': 'error',
50
+ '@typescript-eslint/no-unsafe-member-access': 'error',
51
+ '@typescript-eslint/no-unsafe-return': 'error',
52
+ quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
53
+ curly: ['error', 'multi-line'],
54
+ 'simple-import-sort/imports': 'error',
55
+ 'simple-import-sort/exports': 'error',
56
+ indent: ['error', 'tab'],
57
+ 'no-tabs': 0,
58
+ 'semi-style': ['error', 'last'],
59
+ semi: [2, 'always'],
60
+ 'object-curly-spacing': ['error', 'always'],
61
+ 'space-in-parens': ['error', 'never'],
62
+ 'newline-before-return': 'error',
63
+ 'space-before-blocks': ['error', { functions: 'always', keywords: 'never', classes: 'always' }],
64
+ 'comma-spacing': ['error', { before: false, after: true }],
65
+ 'no-multi-spaces': 'error',
66
+ 'import/newline-after-import': ['error', { count: 1 }],
67
+ 'named-import-spacing/named-import-spacing': 2,
68
+ 'no-unused-vars': 'warn',
69
+ 'import/no-unresolved': [0],
70
+ 'no-forbidden-relative-imports': [0],
71
+ '@typescript-eslint/triple-slash-reference': 'off',
72
+ '@typescript-eslint/member-ordering': [
73
+ 'error',
74
+ {
75
+ classes: [
76
+ 'constructor',
77
+ 'private-instance-field',
78
+ 'protected-instance-field',
79
+ 'public-instance-field',
80
+ 'public-instance-method',
81
+ 'private-instance-method',
82
+ ],
83
+ },
84
+ ],
85
+ '@typescript-eslint/naming-convention': [
86
+ 'error',
87
+ {
88
+ selector: ['variable', 'function'],
89
+ format: ['camelCase'],
90
+ leadingUnderscore: 'allow',
91
+ },
92
+ {
93
+ selector: ['objectLiteralProperty'],
94
+ format: null,
95
+ leadingUnderscore: 'allow',
96
+ },
97
+ {
98
+ selector: 'memberLike',
99
+ modifiers: ['private'],
100
+ format: ['camelCase'],
101
+ leadingUnderscore: 'require',
102
+ },
103
+ {
104
+ selector: 'memberLike',
105
+ modifiers: ['protected'],
106
+ format: ['camelCase'],
107
+ leadingUnderscore: 'require',
108
+ },
109
+ {
110
+ selector: 'memberLike',
111
+ modifiers: ['public'],
112
+ format: ['camelCase'],
113
+ leadingUnderscore: 'forbid',
114
+ },
115
+ {
116
+ selector: ['parameterProperty', 'parameter'],
117
+ format: ['camelCase'],
118
+ leadingUnderscore: 'forbid',
119
+ },
120
+ {
121
+ selector: 'default',
122
+ format: ['UPPER_CASE'],
123
+ leadingUnderscore: 'forbid',
124
+ trailingUnderscore: 'forbid',
125
+ custom: {
126
+ regex: '^[A-Z_]+$',
127
+ match: true,
128
+ },
129
+ },
130
+ {
131
+ selector: 'typeLike',
132
+ format: ['PascalCase'],
133
+ },
134
+ {
135
+ selector: 'function',
136
+ format: ['UPPER_CASE'],
137
+ },
138
+ ],
139
+ },
140
+ },
141
+ );
@@ -1,19 +1,29 @@
1
+ /** @type { import('typedoc').TypeDocOptionMap & import('typedoc-plugin-merge-modules').Config } */
1
2
  {
2
- "entryPoints": ["typescript/**/*.ts", "typescript/**/*.tsx"],
3
- "entryPointStrategy": "expand",
4
- "out": "docs",
5
- "plugin": ["typedoc-theme-hierarchy"],
6
- "theme": "hierarchy",
7
- "tsconfig": "docs.tsconfig.json",
8
- "excludeExternals": true,
9
- "externalPattern":[
10
- "**/node_modules/**",
11
- "./.wix/**",
12
- ".wix/**"
13
- ],
14
- "exclude": [
15
- "./.wix/**/*",
16
- ".wix/**/*"
17
- ],
18
- "name": "Wix-lucy"
3
+ "entryPoints": [
4
+ "*/**/*.ts",
5
+ "*/**/*.tsx"
6
+ ],
7
+ "entryPointStrategy": "expand",
8
+ "out": "docs",
9
+ "plugin": [
10
+ "typedoc-theme-hierarchy",
11
+ "typedoc-plugin-zod",
12
+ "typedoc-plugin-merge-modules"
13
+ ],
14
+ "theme": "hierarchy",
15
+ "tsconfig": "docs.tsconfig.json",
16
+ "excludeExternals": true,
17
+ "externalPattern": [
18
+ "**/node_modules/**",
19
+ "**/.wix/**",
20
+ ".wix/**"
21
+ ],
22
+ "exclude": [
23
+ "./.wix/**/*",
24
+ ".wix/**/*"
25
+ ],
26
+ "name": "Wix-lucy",
27
+ "mergeModulesRenameDefaults": true,
28
+ "mergeModulesMergeMode": "project",
19
29
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "lucy-cli",
4
- "version": "0.8.2",
4
+ "version": "0.9.0",
5
5
  "description": "Lucy Framework for WIX Studio Editor",
6
6
  "main": ".dist/index.js",
7
7
  "scripts": {
@@ -32,6 +32,7 @@
32
32
  "registry": "https://registry.npmjs.org"
33
33
  },
34
34
  "dependencies": {
35
+ "@swc/core": "^1.9.3",
35
36
  "@wix/cli": "^1.0.83",
36
37
  "@wix/eslint-plugin-cli": "^1.0.1",
37
38
  "chalk": "^5.3.0",
@@ -41,20 +42,21 @@
41
42
  "gulp-clean": "^0.4.0",
42
43
  "gulp-cli": "3.0.0",
43
44
  "gulp-concat": "^2.6.1",
44
- "gulp-esbuild": "0.12.1",
45
45
  "gulp-exec": "^5.0.0",
46
46
  "gulp-flatmap": "^1.0.2",
47
47
  "gulp-if": "^3.0.0",
48
48
  "gulp-insert": "^0.5.0",
49
49
  "gulp-jest": "^4.0.4",
50
50
  "gulp-json-editor": "2.6.0",
51
+ "gulp-plumber": "^1.2.1",
51
52
  "gulp-rename": "^2.0.0",
52
53
  "gulp-sass": "^5.1.0",
53
54
  "gulp-shell": "^0.8.0",
54
55
  "gulp-string-replace": "^1.1.2",
56
+ "gulp-swc": "^2.2.0",
55
57
  "gulp-tap": "^2.0.0",
56
58
  "gulp-typedoc": "^3.0.2",
57
- "gulp-typescript": "^6.0.0-alpha.1",
59
+ "gulp-typescript": "5.0.1",
58
60
  "gulp-wait": "^0.0.2",
59
61
  "jest": "^29.7.0",
60
62
  "merge-stream": "^2.0.0",
@@ -75,6 +77,7 @@
75
77
  "@types/gulp-concat": "^0.0.37",
76
78
  "@types/gulp-insert": "^0.5.13",
77
79
  "@types/gulp-json-editor": "^2.2.36",
80
+ "@types/gulp-plumber": "^0.0.37",
78
81
  "@types/gulp-rename": "^2.0.6",
79
82
  "@types/gulp-sass": "^5.0.4",
80
83
  "@types/gulp-tap": "^1.0.5",
@@ -84,13 +87,12 @@
84
87
  "@typescript-eslint/eslint-plugin": "8.14.0",
85
88
  "@typescript-eslint/parser": "8.14.0",
86
89
  "@typescript-eslint/utils": "8.14.0",
87
- "esbuild": "0.24.0",
88
90
  "eslint": "9.14.0",
89
91
  "eslint-plugin-import": "^2.27.5",
90
92
  "eslint-plugin-jsdoc": "50.5.0",
91
93
  "eslint-plugin-named-import-spacing": "^1.0.3",
92
94
  "eslint-plugin-simple-import-sort": "12.1.1",
93
95
  "ts-node": "^10.9.1",
94
- "typescript": "^5.1.6"
96
+ "typescript": "^5.6.3"
95
97
  }
96
98
  }
package/src/Gulpfile.ts CHANGED
@@ -133,7 +133,7 @@ gulp.task('fix-wix', gulp.series(
133
133
  gulp.task('build', gulp.parallel(
134
134
  'build-backend',
135
135
  'build-public',
136
- buildPages(taskOptions),
136
+ buildPages(taskOptions),
137
137
  compileScss(taskOptions),
138
138
  'copy-files'
139
139
  )
@@ -196,6 +196,10 @@ export async function runTask(task: string, moduleSettings: ModuleSettings, proj
196
196
  taskOptions.moduleSettings = moduleSettings;
197
197
  taskOptions.projectSettings = projectSettings;
198
198
  console.log("🐕" + magenta.underline(' => Starting Task => ' + orange(task)));
199
+ try {
199
200
  await gulpTaskRunner(task);
201
+ } catch (err) {
202
+ console.log((`💩 ${red.underline.bold("=> Error starting tasks =>")} ${orange(err)}`));
203
+ }
200
204
  console.log("🐶" + green.underline.bold(' => Task completed: ' + task));
201
205
  }
@@ -1,9 +1,20 @@
1
1
  import gulp from 'gulp';
2
- import { createGulpEsbuild } from 'gulp-esbuild';
3
2
  import rename from 'gulp-rename';
4
3
  import * as path from 'path';
5
4
  import { TaskOptions } from '../Gulpfile';
6
5
  import { blue, orange, red } from '../index.js';
6
+ import swc from 'gulp-swc';
7
+ import { cond } from 'cypress/types/lodash';
8
+
9
+ const swcOptions = {
10
+ jsc: {
11
+ target: 'es2020',
12
+ parser: {
13
+ syntax: "typescript",
14
+ tsx: true,
15
+ },
16
+ },
17
+ };
7
18
 
8
19
  export function buildBackend(options: TaskOptions) {
9
20
  const folders = ['typescript'];
@@ -13,11 +24,7 @@ export function buildBackend(options: TaskOptions) {
13
24
  }
14
25
  }
15
26
 
16
- const { outputDir, enableIncrementalBuild } = options;
17
- const gulpEsbuild = createGulpEsbuild({
18
- incremental: enableIncrementalBuild,
19
- pipe: true,
20
- });
27
+ const { outputDir } = options;
21
28
 
22
29
  // Create tasks for each folder
23
30
  const tasks = folders.map((folder) => {
@@ -30,14 +37,17 @@ export function buildBackend(options: TaskOptions) {
30
37
  `!${folder}/backend/**/*.jsw.ts`,
31
38
  `!${folder}/backend/**/*.spec.ts`,
32
39
  ])
33
- .pipe(
34
- gulpEsbuild({
35
- bundle: false,
36
- })
37
- )
40
+ .pipe(swc(swcOptions))
41
+ .pipe(swc(swcOptions))
42
+ .on('error', function (e: Error) {
43
+ console.log("💩" + red.underline.bold(` => Build of Backend files for ${orange(folder)} failed!`));
44
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
45
+ this.emit('end');
46
+ })
38
47
  .pipe(gulp.dest(path.join(outputDir, 'backend')))
39
- .on('error', function () {
48
+ .on('error', function (e: Error) {
40
49
  console.log("💩" + red.underline.bold(` => Build of Backend files for ${orange(folder)} failed!`));
50
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
41
51
  this.emit('end');
42
52
  })
43
53
  .on('end', function () {
@@ -61,12 +71,12 @@ export function buildBackendJSW(options: TaskOptions) {
61
71
  folders.push(module);
62
72
  }
63
73
  }
64
-
65
- const { outputDir, enableIncrementalBuild } = options;
66
- const gulpEsbuild = createGulpEsbuild({
67
- incremental: enableIncrementalBuild,
68
- pipe: true,
69
- });
74
+ const swcOptions = {
75
+ jsc: {
76
+ target: 'es6',
77
+ },
78
+ };
79
+ const { outputDir } = options;
70
80
 
71
81
  // Create tasks for each folder
72
82
  const tasks = folders.map((folder) => {
@@ -76,20 +86,22 @@ export function buildBackendJSW(options: TaskOptions) {
76
86
  gulp.src([
77
87
  `${folder}/backend/**/*.jsw.ts`,
78
88
  ])
79
- .pipe(
80
- gulpEsbuild({
81
- bundle: false,
82
- })
83
- )
84
- .pipe(rename({ extname: '' }))
85
- .pipe(gulp.dest(path.join(outputDir, 'backend')))
86
- .on('error', function () {
87
- console.log("💩" + red.underline.bold(` => Build of JSW files for ${orange(folder)} failed!`));
88
- this.emit('end');
89
- })
90
- .on('end', function () {
91
- console.log("🐶" + blue.underline(` => Build of JSW files for ${orange(folder)} succeeded!`));
92
- });
89
+ .pipe(swc(swcOptions))
90
+ .on('error', function (e: Error) {
91
+ console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
92
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
93
+ this.emit('end');
94
+ })
95
+ .pipe(rename({ extname: '' }))
96
+ .pipe(gulp.dest(path.join(outputDir, 'backend')))
97
+ .on('error', function (e: Error) {
98
+ console.log("💩" + red.underline.bold(` => Build of JSW files for ${orange(folder)} failed!`));
99
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
100
+ this.emit('end');
101
+ })
102
+ .on('end', function () {
103
+ console.log("🐶" + blue.underline(` => Build of JSW files for ${orange(folder)} succeeded!`));
104
+ });
93
105
 
94
106
  // Register the task with Gulp
95
107
  Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
@@ -136,8 +136,9 @@ export function checkTs(options: TaskOptions) {
136
136
  const task = () =>
137
137
  gulp.src([`${folder}/**/*.ts`, `!${folder}/types/**/*.ts`], { cwd: folder })
138
138
  .pipe(tsProject(ts.reporter.fullReporter()))
139
- .on('error', function () {
139
+ .on('error', function (e: Error) {
140
140
  console.log("💩" + red.underline.bold(` => Typescriptcheck for ${orange(folder)} failed!`));
141
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
141
142
  this.emit('end');
142
143
  })
143
144
  .on('end', function () {
package/src/gulp/clean.ts CHANGED
@@ -2,14 +2,15 @@ import chalk from 'chalk';
2
2
  import gulp from 'gulp';
3
3
  import { TaskOptions } from '../Gulpfile';
4
4
  import clean from 'gulp-clean';
5
- import { blue, red } from '../index.js';
5
+ import { blue, orange, red } from '../index.js';
6
6
 
7
7
  export function cleanWix() {
8
8
  return () => {
9
9
  return gulp.src('./.wix', { read: false, allowEmpty: true })
10
10
  .pipe(clean({ force: true }))
11
- .on('error', function () {
11
+ .on('error', function (e: Error) {
12
12
  console.log("💩" + red.underline.bold(' => Cleaning of .wix failed!'));
13
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
13
14
  this.emit('end');
14
15
  })
15
16
  .on('end', function() { console.log("🐶" + blue.underline(' => Cleaning of .wix succeeded!')); });
@@ -22,8 +23,9 @@ export function cleanSrc(options: TaskOptions) {
22
23
  return () => {
23
24
  return gulp.src([`${outputDir}/pages`, `${outputDir}/public`, `${outputDir}/backend`], { read: false, allowEmpty: true })
24
25
  .pipe(clean({ force: true }))
25
- .on('error', function () {
26
+ .on('error', function (e: Error) {
26
27
  console.log("💩" + red.underline.bold('Cleaning of output files failed!'));
28
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
27
29
  this.emit('end');
28
30
  })
29
31
  .on('end', function() { console.log("🐶" + blue.underline(' => Cleaning of .src succeeded!')); });
package/src/gulp/copy.ts CHANGED
@@ -28,8 +28,9 @@ export function copyFiles(options: TaskOptions) {
28
28
  `!${folder}/styles/**`,
29
29
  ])
30
30
  .pipe(gulp.dest(outputDir))
31
- .on('error', function () {
31
+ .on('error', function (e: Error) {
32
32
  console.log("💩" + red.underline.bold(` => Copy of files for ${orange(folder)} failed!`));
33
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
33
34
  this.emit('end');
34
35
  })
35
36
  .on('end', function () {
package/src/gulp/pages.ts CHANGED
@@ -1,26 +1,36 @@
1
1
  import gulp from 'gulp';
2
2
  import { TaskOptions } from '../Gulpfile';
3
- import { createGulpEsbuild } from 'gulp-esbuild';
4
3
  import * as path from 'path';
5
- import { blue, red } from '../index.js';
4
+ import { blue, orange, red } from '../index.js';
5
+ import swc from 'gulp-swc';
6
+
7
+ const swcOptions = {
8
+ jsc: {
9
+ target: 'es2020',
10
+ parser: {
11
+ syntax: "typescript",
12
+ tsx: true,
13
+ },
14
+ },
15
+ };
6
16
 
7
17
  export function buildPages(options: TaskOptions) {
8
- const { outputDir, enableIncrementalBuild} = options;
9
- const gulpEsbuild = createGulpEsbuild({
10
- incremental: enableIncrementalBuild, // enables the esbuild's incremental build
11
- pipe: true, // enables the esbuild's pipe mode
12
- });
18
+ const { outputDir} = options;
13
19
 
14
20
  return () => {
15
21
  return gulp.src('typescript/pages/*.ts')
16
- .pipe(gulpEsbuild({
17
- bundle: false,
18
- }))
19
- .pipe(gulp.dest(path.join(outputDir, 'pages')))
20
- .on('error', function () {
21
- console.log("💩" + red.underline.bold(' => Build of Pages TS files failed!'));
22
- this.emit('end');
23
- })
24
- .on('end', function() { console.log("🐶" + blue.underline(' => Build of Pages TS files succeeded!')); });
22
+ .pipe(swc(swcOptions))
23
+ .on('error', function (e: Error) {
24
+ console.log("💩" + red.underline.bold(` => Build of Pages files failed!`));
25
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
26
+ this.emit('end');
27
+ })
28
+ .pipe(gulp.dest(path.join(outputDir, 'pages')))
29
+ .on('error', function (e: Error) {
30
+ console.log("💩" + red.underline.bold(' => Build of Pages TS files failed!'));
31
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
32
+ this.emit('end');
33
+ })
34
+ .on('end', function() { console.log("🐶" + blue.underline(' => Build of Pages TS files succeeded!')); });
25
35
  };
26
36
  }
@@ -2,7 +2,7 @@ import gulp from 'gulp';
2
2
  import * as path from 'path';
3
3
  import { File } from '../Gulpfile';
4
4
  import replace from 'gulp-string-replace';
5
- import { blue, red } from '../index.js';
5
+ import { blue, orange, red } from '../index.js';
6
6
 
7
7
  export function setProdConfig() {
8
8
  const tag = process.env.GIT_TAG || 'development';
@@ -20,8 +20,9 @@ export function setProdConfig() {
20
20
 
21
21
  return path.join(`${outputDir}/constants`);
22
22
  }))
23
- .on('error', function () {
23
+ .on('error', function (e: Error) {
24
24
  console.log("💩" + red.underline.bold(' => Setting the git tag failed!'));
25
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
25
26
  this.emit('end');
26
27
  })
27
28
  .on('end', function() { console.log("🐶" + blue.underline(' => Setting the git tag succeeded!'));
@@ -1,9 +1,18 @@
1
1
  import gulp from 'gulp';
2
- import { createGulpEsbuild } from 'gulp-esbuild';
3
-
4
2
  import * as path from 'path';
5
3
  import { TaskOptions } from '../Gulpfile';
6
4
  import { blue, orange, red } from '../index.js';
5
+ import swc from 'gulp-swc';
6
+
7
+ const swcOptions = {
8
+ jsc: {
9
+ target: 'es2020',
10
+ parser: {
11
+ syntax: "typescript",
12
+ tsx: true,
13
+ },
14
+ },
15
+ };
7
16
 
8
17
  export function buildPublic(options: TaskOptions) {
9
18
  const folders = ['typescript'];
@@ -13,11 +22,7 @@ export function buildPublic(options: TaskOptions) {
13
22
  }
14
23
  }
15
24
 
16
- const { outputDir, enableIncrementalBuild } = options;
17
- const gulpEsbuild = createGulpEsbuild({
18
- incremental: enableIncrementalBuild,
19
- pipe: true,
20
- });
25
+ const { outputDir } = options;
21
26
 
22
27
  // Create tasks for each folder
23
28
  const tasks = folders.map((folder) => {
@@ -28,15 +33,16 @@ export function buildPublic(options: TaskOptions) {
28
33
  `${folder}/public/**/*.ts`,
29
34
  `${folder}/public/**/*.tsx`,
30
35
  ])
31
- .pipe(gulpEsbuild({
32
- bundle: false,
33
- loader: {
34
- '.tsx': 'tsx',
35
- },
36
- }))
37
- .pipe(gulp.dest(path.join(outputDir, 'public')))
38
- .on('error', function () {
36
+ .pipe(swc(swcOptions))
37
+ .on('error', function (e: Error) {
38
+ console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
39
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
40
+ this.emit('end');
41
+ })
42
+ .pipe(gulp.dest(path.join(outputDir, 'public')))
43
+ .on('error', function (e: Error) {
39
44
  console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
45
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
40
46
  this.emit('end');
41
47
  })
42
48
  .on('end', function () {
@@ -21,9 +21,15 @@ export function compileScss(options: TaskOptions) {
21
21
  const task = () =>
22
22
  gulp.src(['typescript/styles/global.scss'])
23
23
  .pipe(sass().on('error', sass.logError))
24
+ .on('error', function (e: Error) {
25
+ console.log("💩" + red.underline.bold(` => Build of SCSS files for ${orange(folder)} failed!`));
26
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
27
+ this.emit('end');
28
+ })
24
29
  .pipe(gulp.dest(`${outputDir}/styles`))
25
- .on('error', function () {
30
+ .on('error', function (e: Error) {
26
31
  console.log("💩" + red.underline.bold(` => Compiling of scss files for ${orange(folder)} failed!`));
32
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
27
33
  this.emit('end');
28
34
  })
29
35
  .on('end', function () {
@@ -25,8 +25,9 @@ export function previewTemplates(options: TaskOptions) {
25
25
  `!${folder}/backend/templates/render.ts`,
26
26
  ])
27
27
  .pipe(exec((file: File) => `npx ts-node-esm -T ${file.path}`, taskOpt))
28
- .on('error', function () {
28
+ .on('error', function (e: Error) {
29
29
  console.log("💩" + red.underline.bold(` => Render of Template for ${orange(folder)} failed!`));
30
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
30
31
  this.emit('end');
31
32
  })
32
33
  .on('end', function () {
package/src/gulp/test.ts CHANGED
@@ -44,8 +44,9 @@ export function test(options: TaskOptions) {
44
44
  'public/(.*)': '<rootDir>/public/$1'
45
45
  }
46
46
  }))
47
- .on('error', function () {
47
+ .on('error', function (e: Error) {
48
48
  console.log("💩" + red.underline.bold(` => Tests for ${orange(folder)} failed!`));
49
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
49
50
  this.emit('end');
50
51
  })
51
52
  .on('end', function () {
package/src/gulp/types.ts CHANGED
@@ -7,7 +7,7 @@ import flatmap from 'gulp-flatmap';
7
7
  import jeditor from 'gulp-json-editor';
8
8
  import merge from 'merge-stream';
9
9
  import * as insert from 'gulp-insert';
10
- import { blue, red, yellow } from '../index.js';
10
+ import { blue, orange, red, yellow } from '../index.js';
11
11
  import tap from 'gulp-tap';
12
12
  import { TSConfig } from '../models';
13
13
 
@@ -150,7 +150,7 @@ export function updateWixTypes(options: TaskOptions) {
150
150
  }))
151
151
  .on('error', function (e: Error) {
152
152
  console.log("💩" + red.underline.bold('Modification of WIX configs failed!'));
153
- console.error(e);
153
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
154
154
  this.emit('end');
155
155
  })
156
156
  .on('end', function() { console.log("🐶" + blue.underline(`Modification of ${yellow(count)} WIX configs succeeded!`)); });
@@ -187,8 +187,8 @@ export function addTypes(options: TaskOptions, done: gulp.TaskFunctionCallback):
187
187
  exportTypes,
188
188
  )
189
189
  .on('error', function(e: Error) {
190
- console.error(e);
191
190
  console.log("💩" + red.underline.bold(' => Updating WIX failed!'));
191
+ console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
192
192
  this.emit('end');
193
193
  done();
194
194
  })