lucy-cli 0.7.14 → 0.8.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.
- package/dist/Gulpfile.d.ts +1 -0
- package/dist/Gulpfile.js +14 -12
- package/dist/gulp/backend.d.ts +2 -5
- package/dist/gulp/backend.js +43 -82
- package/dist/gulp/checks.d.ts +2 -2
- package/dist/gulp/checks.js +21 -22
- package/dist/gulp/copy.d.ts +1 -2
- package/dist/gulp/copy.js +29 -34
- package/dist/gulp/helpers.d.ts +1 -0
- package/dist/gulp/helpers.js +7 -0
- package/dist/gulp/public.d.ts +1 -2
- package/dist/gulp/public.js +20 -33
- package/dist/gulp/styles.d.ts +1 -1
- package/dist/gulp/styles.js +19 -6
- package/dist/gulp/templates.d.ts +2 -2
- package/dist/gulp/templates.js +27 -30
- package/dist/gulp/test.d.ts +2 -2
- package/dist/gulp/test.js +24 -50
- package/dist/gulp/types.js +6 -3
- package/dist/gulp/watchers.d.ts +0 -6
- package/dist/gulp/watchers.js +27 -61
- package/dist/helpers.d.ts +4 -0
- package/dist/helpers.js +19 -0
- package/dist/index.js +7 -1
- package/package.json +1 -1
- package/settings/master-settings.json +0 -1
- package/settings/page-settings.json +0 -1
- package/settings/public-settings.json +0 -1
- package/src/Gulpfile.ts +13 -17
- package/src/gulp/backend.ts +74 -107
- package/src/gulp/checks.ts +32 -28
- package/src/gulp/copy.ts +39 -40
- package/src/gulp/helpers.ts +9 -0
- package/src/gulp/public.ts +36 -47
- package/src/gulp/styles.ts +32 -13
- package/src/gulp/templates.ts +38 -39
- package/src/gulp/test.ts +55 -75
- package/src/gulp/types.ts +5 -2
- package/src/gulp/watchers.ts +31 -101
- package/src/helpers.ts +23 -1
- package/src/index.ts +7 -1
package/dist/Gulpfile.d.ts
CHANGED
package/dist/Gulpfile.js
CHANGED
@@ -7,19 +7,20 @@ import backendSettings from '../settings/backend-settings.json' assert { type: '
|
|
7
7
|
import masterSettings from '../settings/master-settings.json' assert { type: 'json' };
|
8
8
|
import pageSettings from '../settings/page-settings.json' assert { type: 'json' };
|
9
9
|
import publicSettings from '../settings/public-settings.json' assert { type: 'json' };
|
10
|
-
import { buildPublic
|
11
|
-
import { buildBackend, buildBackendJSW
|
12
|
-
import { checkPages, checkTs
|
10
|
+
import { buildPublic } from './gulp/public.js';
|
11
|
+
import { buildBackend, buildBackendJSW } from './gulp/backend.js';
|
12
|
+
import { checkPages, checkTs } from './gulp/checks.js';
|
13
13
|
import { compileScss } from './gulp/styles.js';
|
14
14
|
import { buildPages } from './gulp/pages.js';
|
15
|
-
import { previewTemplates
|
16
|
-
import { copyFiles
|
15
|
+
import { previewTemplates } from './gulp/templates.js';
|
16
|
+
import { copyFiles } from './gulp/copy.js';
|
17
17
|
import { cleanSrc, cleanWix } from './gulp/clean.js';
|
18
18
|
import { addTypes, updateWixTypes } from './gulp/types.js';
|
19
19
|
import { setProdConfig } from './gulp/pipeline.js';
|
20
20
|
import { watchAll } from './gulp/watchers.js';
|
21
21
|
import { green, magenta, orange, red } from './index.js';
|
22
|
-
import {
|
22
|
+
import { test } from './gulp/test.js';
|
23
|
+
import { getModulesSync } from './gulp/helpers.js';
|
23
24
|
const sass = gulpSass(dartSass);
|
24
25
|
const outputDir = './src';
|
25
26
|
const userHomeDir = os.homedir();
|
@@ -39,14 +40,15 @@ const taskOptions = {
|
|
39
40
|
masterSettings,
|
40
41
|
replaceOptions,
|
41
42
|
cwd: process.cwd(),
|
43
|
+
modulesSync: getModulesSync(),
|
42
44
|
};
|
43
|
-
gulp.task('check-ts', gulp.parallel(checkTs()
|
45
|
+
gulp.task('check-ts', gulp.parallel(checkTs(taskOptions)));
|
44
46
|
gulp.task('scss', gulp.parallel(compileScss(taskOptions)));
|
45
|
-
gulp.task('build-backend', gulp.parallel(buildBackend(taskOptions),
|
46
|
-
gulp.task('build-public', gulp.parallel(buildPublic(taskOptions)
|
47
|
-
gulp.task('preview-templates', gulp.parallel(previewTemplates()
|
48
|
-
gulp.task('copy-files', gulp.parallel(copyFiles(taskOptions)
|
49
|
-
gulp.task('test', gulp.parallel(test()
|
47
|
+
gulp.task('build-backend', gulp.parallel(buildBackend(taskOptions), buildBackendJSW(taskOptions)));
|
48
|
+
gulp.task('build-public', gulp.parallel(buildPublic(taskOptions)));
|
49
|
+
gulp.task('preview-templates', gulp.parallel(previewTemplates(taskOptions)));
|
50
|
+
gulp.task('copy-files', gulp.parallel(copyFiles(taskOptions)));
|
51
|
+
gulp.task('test', gulp.parallel(test(taskOptions)));
|
50
52
|
gulp.task('sync-types', shell.task([
|
51
53
|
'yarn postinstall',
|
52
54
|
]));
|
package/dist/gulp/backend.d.ts
CHANGED
@@ -1,6 +1,3 @@
|
|
1
1
|
import { TaskOptions } from '../Gulpfile';
|
2
|
-
export declare function buildBackend(options: TaskOptions): ()
|
3
|
-
export declare function
|
4
|
-
export declare function buildBackendJSW(options: TaskOptions): () => NodeJS.ReadWriteStream;
|
5
|
-
export declare function buildBackendJSWLib(options: TaskOptions): () => NodeJS.ReadWriteStream;
|
6
|
-
export declare function buildBackendHTTP(options: TaskOptions): () => NodeJS.ReadWriteStream;
|
2
|
+
export declare function buildBackend(options: TaskOptions): import("undertaker").TaskFunction;
|
3
|
+
export declare function buildBackendJSW(options: TaskOptions): import("undertaker").TaskFunction;
|
package/dist/gulp/backend.js
CHANGED
@@ -2,117 +2,78 @@ import gulp from 'gulp';
|
|
2
2
|
import { createGulpEsbuild } from 'gulp-esbuild';
|
3
3
|
import rename from 'gulp-rename';
|
4
4
|
import * as path from 'path';
|
5
|
-
import { blue, red } from '../index.js';
|
6
|
-
import ts from 'gulp-typescript';
|
7
|
-
import tsConf from '../../files/typescript/tsconfig.json' assert { type: 'json' };
|
8
|
-
const tsOptions = tsConf.compilerOptions;
|
5
|
+
import { blue, orange, red } from '../index.js';
|
9
6
|
export function buildBackend(options) {
|
7
|
+
const folders = ['typescript'];
|
8
|
+
if (options.modulesSync) {
|
9
|
+
for (const module of Object.keys(options.modulesSync)) {
|
10
|
+
folders.push(module);
|
11
|
+
}
|
12
|
+
}
|
10
13
|
const { outputDir, enableIncrementalBuild } = options;
|
11
14
|
const gulpEsbuild = createGulpEsbuild({
|
12
15
|
incremental: enableIncrementalBuild,
|
13
16
|
});
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
// Create tasks for each folder
|
18
|
+
const tasks = folders.map((folder) => {
|
19
|
+
const taskName = `build_Backend-${folder}`; // Create a unique name for each task
|
20
|
+
const task = () => gulp.src([
|
21
|
+
`${folder}/backend/**/*.ts`,
|
22
|
+
`${folder}/backend/**/*.tsx`,
|
23
|
+
`!${folder}/backend/**/*.jsw.ts`,
|
24
|
+
`!${folder}/backend/**/*.spec.ts`,
|
21
25
|
])
|
22
26
|
.pipe(gulpEsbuild({
|
23
27
|
bundle: false,
|
24
28
|
}))
|
25
29
|
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
26
30
|
.on('error', function () {
|
27
|
-
console.log("💩" + red.underline.bold(
|
31
|
+
console.log("💩" + red.underline.bold(` => Build of Backend files for ${orange(folder)} failed!`));
|
28
32
|
this.emit('end');
|
29
33
|
})
|
30
34
|
.on('end', function () {
|
31
|
-
console.log("🐶" + blue.underline(
|
35
|
+
console.log("🐶" + blue.underline(` => Build of Backend files for ${orange(folder)} succeeded!`));
|
32
36
|
});
|
33
|
-
|
34
|
-
}
|
35
|
-
|
36
|
-
const { outputDir, enableIncrementalBuild } = options;
|
37
|
-
const gulpEsbuild = createGulpEsbuild({
|
38
|
-
incremental: enableIncrementalBuild,
|
37
|
+
// Register the task with Gulp
|
38
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
39
|
+
return task;
|
39
40
|
});
|
40
|
-
|
41
|
-
|
42
|
-
'lib/backend/**/*.ts',
|
43
|
-
'lib/backend/**/*.tsx',
|
44
|
-
'!lib/backend/**/*.jsw.ts',
|
45
|
-
'!lib/backend/**/*.spec.ts',
|
46
|
-
'!lib/backend/http-functions.ts',
|
47
|
-
])
|
48
|
-
.pipe(gulpEsbuild({
|
49
|
-
bundle: false,
|
50
|
-
}))
|
51
|
-
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
52
|
-
.on('error', function () {
|
53
|
-
console.log("💩" + red.underline.bold(' => Build of Backend TS (LIB) files failed!'));
|
54
|
-
this.emit('end');
|
55
|
-
})
|
56
|
-
.on('end', function () {
|
57
|
-
console.log("🐶" + blue.underline(' => Build of Backend TS (LIB) files succeeded!'));
|
58
|
-
});
|
59
|
-
};
|
41
|
+
// Run all tasks in parallel
|
42
|
+
return gulp.parallel(...tasks);
|
60
43
|
}
|
61
44
|
export function buildBackendJSW(options) {
|
45
|
+
const folders = ['typescript'];
|
46
|
+
if (options.modulesSync) {
|
47
|
+
for (const module of Object.keys(options.modulesSync)) {
|
48
|
+
folders.push(module);
|
49
|
+
}
|
50
|
+
}
|
62
51
|
const { outputDir, enableIncrementalBuild } = options;
|
63
52
|
const gulpEsbuild = createGulpEsbuild({
|
64
53
|
incremental: enableIncrementalBuild,
|
65
54
|
});
|
66
|
-
|
67
|
-
|
55
|
+
// Create tasks for each folder
|
56
|
+
const tasks = folders.map((folder) => {
|
57
|
+
const taskName = `build-${folder}`; // Create a unique name for each task
|
58
|
+
const task = () => gulp.src([
|
59
|
+
`${folder}/backend/**/*.jsw.ts`,
|
60
|
+
])
|
68
61
|
.pipe(gulpEsbuild({
|
69
62
|
bundle: false,
|
70
63
|
}))
|
71
64
|
.pipe(rename({ extname: '' }))
|
72
65
|
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
73
66
|
.on('error', function () {
|
74
|
-
console.log("💩" + red.underline.bold(
|
67
|
+
console.log("💩" + red.underline.bold(` => Build of JSW files for ${orange(folder)} failed!`));
|
75
68
|
this.emit('end');
|
76
69
|
})
|
77
|
-
.on('end', function () {
|
78
|
-
|
79
|
-
}
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
incremental: enableIncrementalBuild,
|
70
|
+
.on('end', function () {
|
71
|
+
console.log("🐶" + blue.underline(` => Build of JSW files for ${orange(folder)} succeeded!`));
|
72
|
+
});
|
73
|
+
// Register the task with Gulp
|
74
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
75
|
+
return task;
|
84
76
|
});
|
85
|
-
|
86
|
-
|
87
|
-
.pipe(gulpEsbuild({
|
88
|
-
bundle: false,
|
89
|
-
}))
|
90
|
-
.pipe(rename({ extname: '' }))
|
91
|
-
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
92
|
-
.on('error', function () {
|
93
|
-
console.log("💩" + red.underline.bold(' => Build of JSW (LIB) files failed!'));
|
94
|
-
this.emit('end');
|
95
|
-
})
|
96
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Build of JSW (LIB) files succeeded!')); });
|
97
|
-
};
|
98
|
-
}
|
99
|
-
export function buildBackendHTTP(options) {
|
100
|
-
const { outputDir, enableIncrementalBuild } = options;
|
101
|
-
delete tsOptions.outFile;
|
102
|
-
delete tsOptions.outDir;
|
103
|
-
delete tsOptions.rootDir;
|
104
|
-
// tsOptions.resolveJsonModule = false;
|
105
|
-
tsOptions.module = 'amd';
|
106
|
-
tsOptions.outFile = 'http-functions.js';
|
107
|
-
console.log({ tsOptions });
|
108
|
-
return () => {
|
109
|
-
return gulp.src(['lib/backend/http-functions.ts', 'typescript/backend/http-functions.ts'])
|
110
|
-
.pipe(ts(tsOptions))
|
111
|
-
.pipe(gulp.dest(path.join(outputDir, 'backend')))
|
112
|
-
.on('error', function () {
|
113
|
-
console.log("💩" + red.underline.bold(' => Build of HTTP (LIB) files failed!'));
|
114
|
-
this.emit('end');
|
115
|
-
})
|
116
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Build of HTTP (LIB) files succeeded!')); });
|
117
|
-
};
|
77
|
+
// Run all tasks in parallel
|
78
|
+
return gulp.parallel(...tasks);
|
118
79
|
}
|
package/dist/gulp/checks.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
+
import { TaskOptions } from '../Gulpfile.js';
|
1
2
|
export declare function checkPages(fail: boolean, force: boolean): Promise<void>;
|
2
|
-
export declare function checkTs(
|
3
|
-
export declare function checkTsLib(): () => import("gulp-typescript/release/project.js").ICompileStream;
|
3
|
+
export declare function checkTs(options: TaskOptions): import("undertaker").TaskFunction;
|
package/dist/gulp/checks.js
CHANGED
@@ -3,7 +3,7 @@ import glob from 'glob';
|
|
3
3
|
import * as path from 'path';
|
4
4
|
import gulp from 'gulp';
|
5
5
|
import ts from 'gulp-typescript';
|
6
|
-
import { blue, green, magenta, red, yellow } from '../index.js';
|
6
|
+
import { blue, green, magenta, orange, red, yellow } from '../index.js';
|
7
7
|
/**
|
8
8
|
* Extracts a match from a file
|
9
9
|
* @param {string} filePath File path
|
@@ -115,31 +115,30 @@ export async function checkPages(fail, force) {
|
|
115
115
|
}
|
116
116
|
});
|
117
117
|
}
|
118
|
-
export function checkTs() {
|
119
|
-
const
|
120
|
-
|
121
|
-
|
122
|
-
.
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
})
|
130
|
-
};
|
131
|
-
}
|
132
|
-
export function checkTsLib() {
|
133
|
-
const tsProject = ts.createProject('./lib/tsconfig.json', { noEmit: true });
|
134
|
-
return () => {
|
135
|
-
return gulp.src(['lib/typescript/**/*.ts', '!lib/typescript/types/**/*.ts'], { cwd: 'typescript' })
|
118
|
+
export function checkTs(options) {
|
119
|
+
const folders = ['typescript'];
|
120
|
+
if (options.modulesSync) {
|
121
|
+
for (const module of Object.keys(options.modulesSync)) {
|
122
|
+
folders.push(module);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
// Create tasks for each folder
|
126
|
+
const tasks = folders.map((folder) => {
|
127
|
+
const tsProject = ts.createProject(`./${folder}/tsconfig.json`, { noEmit: true });
|
128
|
+
const taskName = `test-${folder}`; // Create a unique name for each task
|
129
|
+
const task = () => gulp.src([`${folder}/**/*.ts`, `!${folder}/types/**/*.ts`], { cwd: folder })
|
136
130
|
.pipe(tsProject(ts.reporter.fullReporter()))
|
137
131
|
.on('error', function () {
|
138
|
-
console.log("💩" + red.underline.bold(
|
132
|
+
console.log("💩" + red.underline.bold(` => Typescriptcheck for ${orange(folder)} failed!`));
|
139
133
|
this.emit('end');
|
140
134
|
})
|
141
135
|
.on('end', function () {
|
142
|
-
console.log("🐶" + blue.underline(
|
136
|
+
console.log("🐶" + blue.underline(` => Typescriptcheck for ${orange(folder)} succeeded!`));
|
143
137
|
});
|
144
|
-
|
138
|
+
// Register the task with Gulp
|
139
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
140
|
+
return task;
|
141
|
+
});
|
142
|
+
// Run all tasks in parallel
|
143
|
+
return gulp.parallel(...tasks);
|
145
144
|
}
|
package/dist/gulp/copy.d.ts
CHANGED
@@ -1,3 +1,2 @@
|
|
1
1
|
import { TaskOptions } from '../Gulpfile';
|
2
|
-
export declare function copyFiles(options: TaskOptions): ()
|
3
|
-
export declare function copyFilesLib(options: TaskOptions): () => NodeJS.ReadWriteStream;
|
2
|
+
export declare function copyFiles(options: TaskOptions): import("undertaker").TaskFunction;
|
package/dist/gulp/copy.js
CHANGED
@@ -1,42 +1,37 @@
|
|
1
1
|
import gulp from 'gulp';
|
2
|
-
import { blue, red } from '../index.js';
|
2
|
+
import { blue, orange, red } from '../index.js';
|
3
3
|
export function copyFiles(options) {
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
const folders = ['typescript'];
|
5
|
+
if (options.modulesSync) {
|
6
|
+
for (const module of Object.keys(options.modulesSync)) {
|
7
|
+
folders.push(module);
|
8
|
+
}
|
9
|
+
}
|
10
|
+
// Create tasks for each folder
|
11
|
+
const tasks = folders.map((folder) => {
|
12
|
+
const { outputDir } = options;
|
13
|
+
const taskName = `copy-${folder}`; // Create a unique name for each task
|
14
|
+
const task = () => gulp.src([
|
15
|
+
`${folder}/**/*`,
|
16
|
+
`!${folder}/*tsconfig.json`,
|
17
|
+
`!${folder}/**/*.ts`,
|
18
|
+
`!${folder}/**/*.tsx`,
|
19
|
+
`!${folder}/types/**/**`,
|
20
|
+
`!${folder}/__mocks__/**/**`,
|
21
|
+
`!${folder}/styles/**`,
|
14
22
|
])
|
15
23
|
.pipe(gulp.dest(outputDir))
|
16
24
|
.on('error', function () {
|
17
|
-
console.log("💩" + red.underline.bold(
|
25
|
+
console.log("💩" + red.underline.bold(` => Copy of files for ${orange(folder)} failed!`));
|
18
26
|
this.emit('end');
|
19
27
|
})
|
20
|
-
.on('end', function () {
|
21
|
-
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
'!typescript/**/*.ts',
|
30
|
-
'!typescript/**/*.tsx',
|
31
|
-
'!typescript/types/**/**',
|
32
|
-
'!typescript/__mocks__/**/**',
|
33
|
-
'!typescript/styles/**',
|
34
|
-
])
|
35
|
-
.pipe(gulp.dest(outputDir))
|
36
|
-
.on('error', function () {
|
37
|
-
console.log("💩" + red.underline.bold(' => Copy of files (LIB) failed!'));
|
38
|
-
this.emit('end');
|
39
|
-
})
|
40
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Copy of files (LIB) succeeded!')); });
|
41
|
-
};
|
28
|
+
.on('end', function () {
|
29
|
+
console.log("🐶" + blue.underline(` => Copy of files for ${orange(folder)} succeeded!`));
|
30
|
+
});
|
31
|
+
// Register the task with Gulp
|
32
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
33
|
+
return task;
|
34
|
+
});
|
35
|
+
// Run all tasks in parallel
|
36
|
+
return gulp.parallel(...tasks);
|
42
37
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getModulesSync(): Record<string, string> | undefined;
|
package/dist/gulp/public.d.ts
CHANGED
@@ -1,3 +1,2 @@
|
|
1
1
|
import { TaskOptions } from '../Gulpfile';
|
2
|
-
export declare function buildPublic(options: TaskOptions): ()
|
3
|
-
export declare function buildPublicLib(options: TaskOptions): () => NodeJS.ReadWriteStream;
|
2
|
+
export declare function buildPublic(options: TaskOptions): import("undertaker").TaskFunction;
|
package/dist/gulp/public.js
CHANGED
@@ -1,16 +1,24 @@
|
|
1
1
|
import gulp from 'gulp';
|
2
2
|
import { createGulpEsbuild } from 'gulp-esbuild';
|
3
3
|
import * as path from 'path';
|
4
|
-
import { blue, red } from '../index.js';
|
4
|
+
import { blue, orange, red } from '../index.js';
|
5
5
|
export function buildPublic(options) {
|
6
|
+
const folders = ['typescript'];
|
7
|
+
if (options.modulesSync) {
|
8
|
+
for (const module of Object.keys(options.modulesSync)) {
|
9
|
+
folders.push(module);
|
10
|
+
}
|
11
|
+
}
|
6
12
|
const { outputDir, enableIncrementalBuild } = options;
|
7
13
|
const gulpEsbuild = createGulpEsbuild({
|
8
14
|
incremental: enableIncrementalBuild,
|
9
15
|
});
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
16
|
+
// Create tasks for each folder
|
17
|
+
const tasks = folders.map((folder) => {
|
18
|
+
const taskName = `build_Public-${folder}`; // Create a unique name for each task
|
19
|
+
const task = () => gulp.src([
|
20
|
+
`${folder}/public/**/*.ts`,
|
21
|
+
`${folder}/public/**/*.tsx`,
|
14
22
|
])
|
15
23
|
.pipe(gulpEsbuild({
|
16
24
|
bundle: false,
|
@@ -20,37 +28,16 @@ export function buildPublic(options) {
|
|
20
28
|
}))
|
21
29
|
.pipe(gulp.dest(path.join(outputDir, 'public')))
|
22
30
|
.on('error', function () {
|
23
|
-
console.log("💩" + red.underline.bold(
|
31
|
+
console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
|
24
32
|
this.emit('end');
|
25
33
|
})
|
26
34
|
.on('end', function () {
|
27
|
-
console.log("🐶" + blue.underline(
|
35
|
+
console.log("🐶" + blue.underline(` => Build of Public files for ${orange(folder)} succeeded!`));
|
28
36
|
});
|
29
|
-
|
30
|
-
}
|
31
|
-
|
32
|
-
const { outputDir, enableIncrementalBuild } = options;
|
33
|
-
const gulpEsbuild = createGulpEsbuild({
|
34
|
-
incremental: enableIncrementalBuild,
|
37
|
+
// Register the task with Gulp
|
38
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
39
|
+
return task;
|
35
40
|
});
|
36
|
-
|
37
|
-
|
38
|
-
'lib/public/**/*.ts',
|
39
|
-
'lib/public/**/*.tsx'
|
40
|
-
])
|
41
|
-
.pipe(gulpEsbuild({
|
42
|
-
bundle: false,
|
43
|
-
loader: {
|
44
|
-
'.tsx': 'tsx',
|
45
|
-
},
|
46
|
-
}))
|
47
|
-
.pipe(gulp.dest(path.join(outputDir, 'public')))
|
48
|
-
.on('error', function () {
|
49
|
-
console.log("💩" + red.underline.bold(' => Build of Public (LIB) TS files failed!'));
|
50
|
-
this.emit('end');
|
51
|
-
})
|
52
|
-
.on('end', function () {
|
53
|
-
console.log("🐶" + blue.underline(' => Build of Public (LIB) TS files succeeded!'));
|
54
|
-
});
|
55
|
-
};
|
41
|
+
// Run all tasks in parallel
|
42
|
+
return gulp.parallel(...tasks);
|
56
43
|
}
|
package/dist/gulp/styles.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import { TaskOptions } from '../Gulpfile';
|
2
|
-
export declare function compileScss(options: TaskOptions): ()
|
2
|
+
export declare function compileScss(options: TaskOptions): import("undertaker").TaskFunction;
|
package/dist/gulp/styles.js
CHANGED
@@ -1,17 +1,30 @@
|
|
1
1
|
import gulp from 'gulp';
|
2
|
-
import { blue, red } from '../index.js';
|
2
|
+
import { blue, orange, red } from '../index.js';
|
3
3
|
export function compileScss(options) {
|
4
|
+
const folders = ['typescript'];
|
5
|
+
// if (options.modulesSync){
|
6
|
+
// for (const module of Object.keys(options.modulesSync)) {
|
7
|
+
// folders.push(module);
|
8
|
+
// }
|
9
|
+
// }
|
4
10
|
const { sass, outputDir } = options;
|
5
|
-
|
6
|
-
|
11
|
+
// Create tasks for each folder
|
12
|
+
const tasks = folders.map((folder) => {
|
13
|
+
const taskName = `compile_sass-${folder}`; // Create a unique name for each task
|
14
|
+
const task = () => gulp.src(['typescript/styles/global.scss'])
|
7
15
|
.pipe(sass().on('error', sass.logError))
|
8
16
|
.pipe(gulp.dest(`${outputDir}/styles`))
|
9
17
|
.on('error', function () {
|
10
|
-
console.log("💩" + red.underline.bold(
|
18
|
+
console.log("💩" + red.underline.bold(` => Compiling of scss files for ${orange(folder)} failed!`));
|
11
19
|
this.emit('end');
|
12
20
|
})
|
13
21
|
.on('end', function () {
|
14
|
-
console.log("🐶" + blue.underline(
|
22
|
+
console.log("🐶" + blue.underline(` => Compiling of scss files for ${orange(folder)} succeeded!`));
|
15
23
|
});
|
16
|
-
|
24
|
+
// Register the task with Gulp
|
25
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
26
|
+
return task;
|
27
|
+
});
|
28
|
+
// Run all tasks in parallel
|
29
|
+
return gulp.parallel(...tasks);
|
17
30
|
}
|
package/dist/gulp/templates.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
export declare function
|
1
|
+
import { TaskOptions } from '../Gulpfile';
|
2
|
+
export declare function previewTemplates(options: TaskOptions): import("undertaker").TaskFunction;
|
package/dist/gulp/templates.js
CHANGED
@@ -1,39 +1,36 @@
|
|
1
1
|
import gulp from 'gulp';
|
2
2
|
import exec from 'gulp-exec';
|
3
|
-
import { blue, red } from '../index.js';
|
4
|
-
export function previewTemplates() {
|
5
|
-
const
|
3
|
+
import { blue, orange, red } from '../index.js';
|
4
|
+
export function previewTemplates(options) {
|
5
|
+
const folders = ['typescript'];
|
6
|
+
if (options.modulesSync) {
|
7
|
+
for (const module of Object.keys(options.modulesSync)) {
|
8
|
+
folders.push(module);
|
9
|
+
}
|
10
|
+
}
|
11
|
+
const taskOpt = {
|
6
12
|
continueOnError: true,
|
7
13
|
};
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
// Create tasks for each folder
|
15
|
+
const tasks = folders.map((folder) => {
|
16
|
+
const taskName = `render_templates-${folder}`; // Create a unique name for each task
|
17
|
+
const task = () => gulp.src([
|
18
|
+
`${folder}/backend/templates/**/*.tsx`,
|
19
|
+
`${folder}/backend/templates/data/*.json`,
|
20
|
+
`!${folder}/backend/templates/render.ts`,
|
13
21
|
])
|
14
|
-
.pipe(exec((file) => `npx ts-node-esm -T ${file.path}`,
|
22
|
+
.pipe(exec((file) => `npx ts-node-esm -T ${file.path}`, taskOpt))
|
15
23
|
.on('error', function () {
|
16
|
-
console.log("💩" + red.underline.bold(
|
24
|
+
console.log("💩" + red.underline.bold(` => Render of Template for ${orange(folder)} failed!`));
|
17
25
|
this.emit('end');
|
18
26
|
})
|
19
|
-
.on('end', function () {
|
20
|
-
|
21
|
-
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
};
|
26
|
-
|
27
|
-
|
28
|
-
'lib/backend/templates/**/*.tsx',
|
29
|
-
'lib/backend/templates/data/*.json',
|
30
|
-
'!lib/backend/templates/render.ts',
|
31
|
-
])
|
32
|
-
.pipe(exec((file) => `npx ts-node-esm -T ${file.path}`, options))
|
33
|
-
.on('error', function () {
|
34
|
-
console.log("💩" + red.underline.bold(' => Render of Template (LIB) failed!'));
|
35
|
-
this.emit('end');
|
36
|
-
})
|
37
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Render of Template (LIB) succeeded!')); });
|
38
|
-
};
|
27
|
+
.on('end', function () {
|
28
|
+
console.log("🐶" + blue.underline(` => Render of Template for ${orange(folder)} succeeded!`));
|
29
|
+
});
|
30
|
+
// Register the task with Gulp
|
31
|
+
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
32
|
+
return task;
|
33
|
+
});
|
34
|
+
// Run all tasks in parallel
|
35
|
+
return gulp.parallel(...tasks);
|
39
36
|
}
|
package/dist/gulp/test.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
export declare function
|
1
|
+
import { TaskOptions } from '../Gulpfile.js';
|
2
|
+
export declare function test(options: TaskOptions): import("undertaker").TaskFunction;
|