lucy-cli 1.2.5 → 2.0.0-alpha.10
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/args.d.ts +7 -0
- package/dist/args.js +23 -0
- package/dist/commands.d.ts +3 -0
- package/dist/commands.js +18 -0
- package/dist/config.d.ts +20 -0
- package/dist/config.js +39 -0
- package/dist/error.d.ts +17 -0
- package/dist/error.js +5 -0
- package/dist/helpers.d.ts +1 -32
- package/dist/helpers.js +6 -261
- package/dist/index.d.ts +2 -59
- package/dist/index.js +25 -282
- package/dist/init.d.ts +4 -8
- package/dist/init.js +269 -158
- package/dist/params.d.ts +7 -0
- package/dist/params.js +23 -0
- package/dist/policy.d.ts +3 -0
- package/dist/policy.js +5 -0
- package/dist/prepare.d.ts +0 -8
- package/dist/prepare.js +20 -19
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +11 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/types.js +1 -0
- package/dist/states.d.ts +10 -0
- package/dist/states.js +7 -0
- package/files/expo/.nvmrc +1 -0
- package/files/expo/.prettierignore +23 -0
- package/files/expo/.prettierrc.js +16 -0
- package/files/expo/.yarnrc +1 -0
- package/files/expo/.yarnrc.yml +3 -0
- package/files/expo/README.md +45 -0
- package/files/expo/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/expo/assets/images/adaptive-icon.png +0 -0
- package/files/expo/assets/images/favicon.png +0 -0
- package/files/expo/assets/images/icon.png +0 -0
- package/files/expo/assets/images/splash-icon.png +0 -0
- package/files/expo/babel.config.js +10 -0
- package/files/expo/constants/theme.ts +18 -0
- package/files/expo/eas.json +32 -0
- package/files/expo/eslint.config.mjs +181 -0
- package/files/expo/global.css +47 -0
- package/files/expo/hooks/useColorScheme.ts +17 -0
- package/files/expo/index.ts +11 -0
- package/files/expo/lib/data.ts +48 -0
- package/files/expo/lib/utils/index.ts +11 -0
- package/files/expo/lib/utils/polyfills.ts +29 -0
- package/files/expo/lib/wix/client.ts +12 -0
- package/files/expo/lib/wix/error.ts +3 -0
- package/files/expo/lib/wix/index.ts +2 -0
- package/files/expo/lucy.json +8 -0
- package/files/expo/metro.config.js +57 -0
- package/files/expo/nativewind-env.d.ts +1 -0
- package/files/expo/scripts/reset-project.ts +116 -0
- package/files/expo/tailwind.config.js +63 -0
- package/files/expo/tsconfig.json +46 -0
- package/files/expo/types/reset.d.ts +1 -0
- package/files/velo/typescript/public/scss/app.scss +0 -0
- package/files/velo/typescript/styles/.gitkeep +0 -0
- package/files/velo/typescript/styles/global.scss +0 -0
- package/package.json +16 -12
- package/src/args.ts +36 -0
- package/src/commands.ts +21 -0
- package/src/config.ts +61 -0
- package/src/error.ts +4 -0
- package/src/helpers.ts +7 -305
- package/src/index.ts +29 -369
- package/src/init.ts +386 -177
- package/src/policy.ts +6 -0
- package/src/prepare.ts +19 -19
- package/src/runtime.ts +20 -0
- package/src/schemas/index.ts +3 -0
- package/src/schemas/types.ts +0 -0
- package/src/states.ts +15 -0
- package/src copy/helpers.ts +307 -0
- package/src copy/index.ts +379 -0
- package/src copy/init.ts +183 -0
- package/src copy/models.ts +35 -0
- package/src copy/prepare.ts +24 -0
- package/src copy/schemas/index.ts +0 -0
- package/src copy/schemas/types.ts +0 -0
- package/src copy/settings.json +67 -0
- package/src copy/types.d.ts +8 -0
- package/dist/Gulpfile.d.ts +0 -34
- package/dist/Gulpfile.js +0 -115
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -44
- package/dist/dev.d.ts +0 -2
- package/dist/dev.js +0 -14
- package/dist/gulp/backend copy.d.ts +0 -4
- package/dist/gulp/backend copy.js +0 -50
- package/dist/gulp/backend.d.ts +0 -3
- package/dist/gulp/backend.js +0 -91
- package/dist/gulp/checks.d.ts +0 -3
- package/dist/gulp/checks.js +0 -204
- package/dist/gulp/clean copy.d.ts +0 -2
- package/dist/gulp/clean copy.js +0 -19
- package/dist/gulp/clean.d.ts +0 -3
- package/dist/gulp/clean.js +0 -28
- package/dist/gulp/copy.d.ts +0 -2
- package/dist/gulp/copy.js +0 -33
- package/dist/gulp/docs.d.ts +0 -2
- package/dist/gulp/docs.js +0 -27
- package/dist/gulp/helpers.d.ts +0 -2
- package/dist/gulp/helpers.js +0 -24
- package/dist/gulp/pages copy.d.ts +0 -3
- package/dist/gulp/pages copy.js +0 -22
- package/dist/gulp/pages.d.ts +0 -2
- package/dist/gulp/pages.js +0 -36
- package/dist/gulp/pipeline.d.ts +0 -1
- package/dist/gulp/pipeline.js +0 -28
- package/dist/gulp/public.d.ts +0 -2
- package/dist/gulp/public.js +0 -49
- package/dist/gulp/styles.d.ts +0 -2
- package/dist/gulp/styles.js +0 -39
- package/dist/gulp/templates.d.ts +0 -2
- package/dist/gulp/templates.js +0 -32
- package/dist/gulp/test.d.ts +0 -2
- package/dist/gulp/test.js +0 -26
- package/dist/gulp/types.d.ts +0 -4
- package/dist/gulp/types.js +0 -288
- package/dist/gulp/watchers.d.ts +0 -9
- package/dist/gulp/watchers.js +0 -58
- package/dist/init copy.d.ts +0 -8
- package/dist/init copy.js +0 -167
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -53
- package/dist/settings.json +0 -67
- package/dist/start_gulp.d.ts +0 -2
- package/dist/start_gulp.js +0 -14
- package/dist/sync.d.ts +0 -2
- package/dist/sync.js +0 -87
- /package/{files/.gitmodules → dist/schemas/types.d.ts} +0 -0
- /package/files/{typescript/__mocks__ → expo/components}/.gitkeep +0 -0
- /package/files/{typescript/pages → expo/components/ui}/.gitkeep +0 -0
- /package/files/{typescript/backend/data.ts → velo/.gitmodules} +0 -0
- /package/files/{.madgerc → velo/.madgerc} +0 -0
- /package/files/{.nvmrc → velo/.nvmrc} +0 -0
- /package/files/{.stylelintrc.js → velo/.stylelintrc.js} +0 -0
- /package/files/{.yarnrc.yml → velo/.yarnrc.yml} +0 -0
- /package/files/{currents.config.js → velo/currents.config.js} +0 -0
- /package/files/{cypress → velo/cypress}/e2e/base/base.cy.ts +0 -0
- /package/files/{cypress → velo/cypress}/fixtures/example.json +0 -0
- /package/files/{cypress → velo/cypress}/support/commands.ts +0 -0
- /package/files/{cypress → velo/cypress}/support/e2e.ts +0 -0
- /package/files/{cypress → velo/cypress}/tsconfig.json +0 -0
- /package/files/{cypress.config.mjs → velo/cypress.config.mjs} +0 -0
- /package/files/{eslint.config.mjs → velo/eslint.config.mjs} +0 -0
- /package/files/{local.tsconfig.json → velo/local.tsconfig.json} +0 -0
- /package/files/{typedoc.json → velo/typedoc.json} +0 -0
- /package/files/{typescript/public → velo/typescript/__mocks__}/.gitkeep +0 -0
- /package/files/{typescript/backend/events.ts → velo/typescript/backend/data.ts} +0 -0
- /package/files/{typescript/public/scss/app.scss → velo/typescript/backend/events.ts} +0 -0
- /package/files/{typescript → velo/typescript}/backend/http-functions.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/lib/http-functions/sync.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/permissions.json +0 -0
- /package/files/{typescript/styles → velo/typescript/pages}/.gitkeep +0 -0
- /package/files/{typescript/styles/global.scss → velo/typescript/public/.gitkeep} +0 -0
- /package/files/{typescript → velo/typescript}/tsconfig.json +0 -0
- /package/files/{vitest.config.ts → velo/vitest.config.ts} +0 -0
- /package/{src → src copy}/Gulpfile.ts +0 -0
- /package/{src → src copy}/gulp/backend.ts +0 -0
- /package/{src → src copy}/gulp/checks.ts +0 -0
- /package/{src → src copy}/gulp/clean.ts +0 -0
- /package/{src → src copy}/gulp/copy.ts +0 -0
- /package/{src → src copy}/gulp/helpers.ts +0 -0
- /package/{src → src copy}/gulp/pages.ts +0 -0
- /package/{src → src copy}/gulp/pipeline.ts +0 -0
- /package/{src → src copy}/gulp/public.ts +0 -0
- /package/{src → src copy}/gulp/styles.ts +0 -0
- /package/{src → src copy}/gulp/templates.ts +0 -0
- /package/{src → src copy}/gulp/types.ts +0 -0
- /package/{src → src copy}/gulp/watchers.ts +0 -0
- /package/{src → src copy}/sync.ts +0 -0
package/dist/gulp/clean copy.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import chalk from 'chalk';
|
2
|
-
import gulp from 'gulp';
|
3
|
-
import { createGulpEsbuild } from 'gulp-esbuild';
|
4
|
-
import clean from 'gulp-clean';
|
5
|
-
export function cleanWix(options) {
|
6
|
-
const { outputDir, enableIncrementalBuild } = options;
|
7
|
-
const gulpEsbuild = createGulpEsbuild({
|
8
|
-
incremental: enableIncrementalBuild,
|
9
|
-
});
|
10
|
-
return () => {
|
11
|
-
return gulp.src('./.wix', { read: false, allowEmpty: true })
|
12
|
-
.pipe(clean({ force: true }))
|
13
|
-
.on('error', function () {
|
14
|
-
console.log(chalk.red.underline.bold('Cleaning of .wix failed!'));
|
15
|
-
this.emit('end');
|
16
|
-
})
|
17
|
-
.on('end', function () { console.log(chalk.blueBright.underline('Cleaning of .wix succeeded!')); });
|
18
|
-
};
|
19
|
-
}
|
package/dist/gulp/clean.d.ts
DELETED
package/dist/gulp/clean.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import clean from 'gulp-clean';
|
3
|
-
import { blue, orange, red } from '../index.js';
|
4
|
-
export function cleanWix() {
|
5
|
-
return () => {
|
6
|
-
return gulp.src('./.wix', { read: false, allowEmpty: true })
|
7
|
-
.pipe(clean({ force: true }))
|
8
|
-
.on('error', function (e) {
|
9
|
-
console.log("💩" + red.underline.bold(' => Cleaning of .wix failed!'));
|
10
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
11
|
-
this.emit('end');
|
12
|
-
})
|
13
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Cleaning of .wix succeeded!')); });
|
14
|
-
};
|
15
|
-
}
|
16
|
-
export function cleanSrc(options) {
|
17
|
-
const { outputDir } = options;
|
18
|
-
return () => {
|
19
|
-
return gulp.src([`${outputDir}/pages`, `${outputDir}/public`, `${outputDir}/backend`], { read: false, allowEmpty: true })
|
20
|
-
.pipe(clean({ force: true }))
|
21
|
-
.on('error', function (e) {
|
22
|
-
console.log("💩" + red.underline.bold('Cleaning of output files failed!'));
|
23
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
24
|
-
this.emit('end');
|
25
|
-
})
|
26
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Cleaning of .src succeeded!')); });
|
27
|
-
};
|
28
|
-
}
|
package/dist/gulp/copy.d.ts
DELETED
package/dist/gulp/copy.js
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import { blue, orange, red } from '../index.js';
|
3
|
-
export function copyFiles(options) {
|
4
|
-
const folders = ['typescript', ...options.modulesSourcePaths];
|
5
|
-
// Create tasks for each folder
|
6
|
-
const tasks = folders.map((folder) => {
|
7
|
-
const { outputDir } = options;
|
8
|
-
const taskName = `copy-${folder}`; // Create a unique name for each task
|
9
|
-
const task = () => gulp.src([
|
10
|
-
`${folder}/**/*`,
|
11
|
-
`!${folder}/*tsconfig.json`,
|
12
|
-
`!${folder}/**/*.ts`,
|
13
|
-
`!${folder}/**/*.tsx`,
|
14
|
-
`!${folder}/types/**/**`,
|
15
|
-
`!${folder}/__mocks__/**/**`,
|
16
|
-
`!${folder}/styles/**`,
|
17
|
-
])
|
18
|
-
.pipe(gulp.dest(outputDir))
|
19
|
-
.on('error', function (e) {
|
20
|
-
console.log("💩" + red.underline.bold(` => Copy of files for ${orange(folder)} failed!`));
|
21
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
22
|
-
this.emit('end');
|
23
|
-
})
|
24
|
-
.on('end', function () {
|
25
|
-
console.log("🐶" + blue.underline(` => Copy of files for ${orange(folder)} succeeded!`));
|
26
|
-
});
|
27
|
-
// Register the task with Gulp
|
28
|
-
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
29
|
-
return task;
|
30
|
-
});
|
31
|
-
// Run all tasks in parallel
|
32
|
-
return gulp.parallel(...tasks);
|
33
|
-
}
|
package/dist/gulp/docs.d.ts
DELETED
package/dist/gulp/docs.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import { blue, red } from '../index.js';
|
3
|
-
import typedoc from 'gulp-typedoc';
|
4
|
-
export function generateDocs() {
|
5
|
-
// path.basename(options.cwd)
|
6
|
-
return gulp.src([
|
7
|
-
'typescript/backend/**/*.ts',
|
8
|
-
'typescript/backend/**/*.tsx',
|
9
|
-
'!typescript/backend/**/*.jsw.ts',
|
10
|
-
'!typescript/backend/**/*.spec.ts',
|
11
|
-
])
|
12
|
-
.pipe(typedoc({
|
13
|
-
out: "docs",
|
14
|
-
plugins: [
|
15
|
-
"typedoc-theme-hierarchy"
|
16
|
-
],
|
17
|
-
theme: "hierarchy",
|
18
|
-
name: "wix-development"
|
19
|
-
}))
|
20
|
-
.on('error', function () {
|
21
|
-
console.log("💩" + red.underline.bold(' => Build of Backend TS files failed!'));
|
22
|
-
this.emit('end');
|
23
|
-
})
|
24
|
-
.on('end', function () {
|
25
|
-
console.log("🐶" + blue.underline(' => Build of Backend TS files succeeded!'));
|
26
|
-
});
|
27
|
-
}
|
package/dist/gulp/helpers.d.ts
DELETED
package/dist/gulp/helpers.js
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
import * as path from 'path';
|
2
|
-
import * as fs from 'fs';
|
3
|
-
export function getModulesSync() {
|
4
|
-
const absolutePath = path.resolve('./lucy.json');
|
5
|
-
const fileContent = fs.readFileSync(absolutePath, 'utf8');
|
6
|
-
return JSON.parse(fileContent).modules;
|
7
|
-
}
|
8
|
-
export function getModulesSourcePaths() {
|
9
|
-
const absolutePath = path.resolve('./lucy.json');
|
10
|
-
const fileContent = fs.readFileSync(absolutePath, 'utf8');
|
11
|
-
const data = JSON.parse(fileContent).modules;
|
12
|
-
const paths = [];
|
13
|
-
for (const module of Object.keys(data)) {
|
14
|
-
if (!data[module].noCompile) {
|
15
|
-
if (data[module].path) {
|
16
|
-
paths.push(data[module].path);
|
17
|
-
}
|
18
|
-
else {
|
19
|
-
paths.push(module);
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
return paths;
|
24
|
-
}
|
package/dist/gulp/pages copy.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import chalk from 'chalk';
|
3
|
-
import { createGulpEsbuild } from 'gulp-esbuild';
|
4
|
-
import * as path from 'path';
|
5
|
-
export function buildPages(options) {
|
6
|
-
const { outputDir, enableIncrementalBuild } = options;
|
7
|
-
const gulpEsbuild = createGulpEsbuild({
|
8
|
-
incremental: enableIncrementalBuild, // enables the esbuild's incremental build
|
9
|
-
});
|
10
|
-
return () => {
|
11
|
-
return gulp.src('typescript/pages/*.ts')
|
12
|
-
.pipe(gulpEsbuild({
|
13
|
-
bundle: false,
|
14
|
-
}))
|
15
|
-
.pipe(gulp.dest(path.join(outputDir, 'pages')))
|
16
|
-
.on('error', function () {
|
17
|
-
console.log(chalk.red.underline.bold('Build of Pages TS files failed!'));
|
18
|
-
this.emit('end');
|
19
|
-
})
|
20
|
-
.on('end', function () { console.log(chalk.blueBright.underline('Build of Pages TS files succeeded!')); });
|
21
|
-
};
|
22
|
-
}
|
package/dist/gulp/pages.d.ts
DELETED
package/dist/gulp/pages.js
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import * as path from 'path';
|
3
|
-
import { blue, orange, red } from '../index.js';
|
4
|
-
import swc from 'gulp-swc';
|
5
|
-
const swcOptions = {
|
6
|
-
jsc: {
|
7
|
-
target: 'es2020',
|
8
|
-
parser: {
|
9
|
-
syntax: "typescript",
|
10
|
-
tsx: true,
|
11
|
-
},
|
12
|
-
preserveAllComments: false,
|
13
|
-
minify: {
|
14
|
-
compress: true // equivalent to {}
|
15
|
-
}
|
16
|
-
},
|
17
|
-
};
|
18
|
-
export function buildPages(options) {
|
19
|
-
const { outputDir } = options;
|
20
|
-
return () => {
|
21
|
-
return gulp.src('typescript/pages/*.ts')
|
22
|
-
.pipe(swc(swcOptions))
|
23
|
-
.on('error', function (e) {
|
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) {
|
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!')); });
|
35
|
-
};
|
36
|
-
}
|
package/dist/gulp/pipeline.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare function setProdConfig(): () => any;
|
package/dist/gulp/pipeline.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import * as path from 'path';
|
3
|
-
import replace from 'gulp-string-replace';
|
4
|
-
import { blue, orange, red } from '../index.js';
|
5
|
-
export function setProdConfig() {
|
6
|
-
const tag = process.env.GIT_TAG || 'development';
|
7
|
-
const regexGit = /gitTag:\s*(.*),/g;
|
8
|
-
const regexDev = /devMode:\s*(.*),/g;
|
9
|
-
return () => {
|
10
|
-
return gulp
|
11
|
-
.src(['./typescript/public/constants/env.ts'])
|
12
|
-
.pipe(replace(regexGit, `gitTag: '${tag}',`))
|
13
|
-
.pipe(replace(regexDev, `devMode: false,`))
|
14
|
-
.pipe(gulp.dest((file) => {
|
15
|
-
const filePath = file.dirname;
|
16
|
-
const outputDir = path.dirname(filePath);
|
17
|
-
return path.join(`${outputDir}/constants`);
|
18
|
-
}))
|
19
|
-
.on('error', function (e) {
|
20
|
-
console.log("💩" + red.underline.bold(' => Setting the git tag failed!'));
|
21
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
22
|
-
this.emit('end');
|
23
|
-
})
|
24
|
-
.on('end', function () {
|
25
|
-
console.log("🐶" + blue.underline(' => Setting the git tag succeeded!'));
|
26
|
-
});
|
27
|
-
};
|
28
|
-
}
|
package/dist/gulp/public.d.ts
DELETED
package/dist/gulp/public.js
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import * as path from 'path';
|
3
|
-
import { blue, orange, red } from '../index.js';
|
4
|
-
import swc from 'gulp-swc';
|
5
|
-
const swcOptions = {
|
6
|
-
jsc: {
|
7
|
-
target: 'es2020',
|
8
|
-
parser: {
|
9
|
-
syntax: "typescript",
|
10
|
-
tsx: true,
|
11
|
-
},
|
12
|
-
preserveAllComments: false,
|
13
|
-
minify: {
|
14
|
-
compress: true // equivalent to {}
|
15
|
-
}
|
16
|
-
},
|
17
|
-
};
|
18
|
-
export function buildPublic(options) {
|
19
|
-
const folders = ['typescript', ...options.modulesSourcePaths];
|
20
|
-
const { outputDir } = options;
|
21
|
-
// Create tasks for each folder
|
22
|
-
const tasks = folders.map((folder) => {
|
23
|
-
const taskName = `build_Public-${folder}`; // Create a unique name for each task
|
24
|
-
const task = () => gulp.src([
|
25
|
-
`${folder}/public/**/*.ts`,
|
26
|
-
`${folder}/public/**/*.tsx`,
|
27
|
-
])
|
28
|
-
.pipe(swc(swcOptions))
|
29
|
-
.on('error', function (e) {
|
30
|
-
console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
|
31
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
32
|
-
this.emit('end');
|
33
|
-
})
|
34
|
-
.pipe(gulp.dest(path.join(outputDir, 'public')))
|
35
|
-
.on('error', function (e) {
|
36
|
-
console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
|
37
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
38
|
-
this.emit('end');
|
39
|
-
})
|
40
|
-
.on('end', function () {
|
41
|
-
console.log("🐶" + blue.underline(` => Build of Public files for ${orange(folder)} succeeded!`));
|
42
|
-
});
|
43
|
-
// Register the task with Gulp
|
44
|
-
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
45
|
-
return task;
|
46
|
-
});
|
47
|
-
// Run all tasks in parallel
|
48
|
-
return gulp.parallel(...tasks);
|
49
|
-
}
|
package/dist/gulp/styles.d.ts
DELETED
package/dist/gulp/styles.js
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import { blue, orange, red } from '../index.js';
|
3
|
-
export function compileScss(options) {
|
4
|
-
const folders = ['typescript'];
|
5
|
-
const { sass, outputDir } = options;
|
6
|
-
const buildWixScss = () => gulp.src(['typescript/styles/global.scss'], { allowEmpty: true })
|
7
|
-
.pipe(sass().on('error', sass.logError))
|
8
|
-
.on('error', function (e) {
|
9
|
-
console.log("💩" + red.underline.bold(` => Build of SCSS files for ${orange('global.scs')} failed!`));
|
10
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
11
|
-
this.emit('end');
|
12
|
-
})
|
13
|
-
.pipe(gulp.dest(`${outputDir}/styles`))
|
14
|
-
.on('error', function (e) {
|
15
|
-
console.log("💩" + red.underline.bold(` => Compiling of scss files for ${orange('global.scs')} failed!`));
|
16
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
17
|
-
this.emit('end');
|
18
|
-
})
|
19
|
-
.on('end', function () {
|
20
|
-
console.log("🐶" + blue.underline(` => Compiling of scss files for ${orange('global.scs')} succeeded!`));
|
21
|
-
});
|
22
|
-
const buildScss = () => gulp.src(['typescript/public/scss/app.scss'], { allowEmpty: true })
|
23
|
-
.pipe(sass().on('error', sass.logError))
|
24
|
-
.on('error', function (e) {
|
25
|
-
console.log("💩" + red.underline.bold(` => Build of SCSS files for ${orange('app.scss')} failed!`));
|
26
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
27
|
-
this.emit('end');
|
28
|
-
})
|
29
|
-
.pipe(gulp.dest(`${outputDir}/public/css`))
|
30
|
-
.on('error', function (e) {
|
31
|
-
console.log("💩" + red.underline.bold(` => Compiling of scss files for ${orange('app.scss')} failed!`));
|
32
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
33
|
-
this.emit('end');
|
34
|
-
})
|
35
|
-
.on('end', function () {
|
36
|
-
console.log("🐶" + blue.underline(` => Compiling of scss files for ${orange('app.scss')} succeeded!`));
|
37
|
-
});
|
38
|
-
return gulp.parallel(buildWixScss, buildScss);
|
39
|
-
}
|
package/dist/gulp/templates.d.ts
DELETED
package/dist/gulp/templates.js
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import exec from 'gulp-exec';
|
3
|
-
import { blue, orange, red } from '../index.js';
|
4
|
-
export function previewTemplates(options) {
|
5
|
-
const folders = ['typescript', ...options.modulesSourcePaths];
|
6
|
-
const taskOpt = {
|
7
|
-
continueOnError: true,
|
8
|
-
};
|
9
|
-
// Create tasks for each folder
|
10
|
-
const tasks = folders.map((folder) => {
|
11
|
-
const taskName = `render_templates-${folder}`; // Create a unique name for each task
|
12
|
-
const task = () => gulp.src([
|
13
|
-
`${folder}/backend/templates/**/*.tsx`,
|
14
|
-
`${folder}/backend/templates/data/*.json`,
|
15
|
-
`!${folder}/backend/templates/render.ts`,
|
16
|
-
])
|
17
|
-
.pipe(exec((file) => `npx tsx --tsconfig ./local.tsconfig.json ${file.path}`, taskOpt))
|
18
|
-
.on('error', function (e) {
|
19
|
-
console.log("💩" + red.underline.bold(` => Render of Template for ${orange(folder)} failed!`));
|
20
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
21
|
-
this.emit('end');
|
22
|
-
})
|
23
|
-
.on('end', function () {
|
24
|
-
console.log("🐶" + blue.underline(` => Render of Template for ${orange(folder)} succeeded!`));
|
25
|
-
});
|
26
|
-
// Register the task with Gulp
|
27
|
-
Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
|
28
|
-
return task;
|
29
|
-
});
|
30
|
-
// Run all tasks in parallel
|
31
|
-
return gulp.parallel(...tasks);
|
32
|
-
}
|
package/dist/gulp/test.d.ts
DELETED
package/dist/gulp/test.js
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
import gulp from 'gulp';
|
2
|
-
import { blue, orange, red } from '../index.js';
|
3
|
-
import gulpJest from 'gulp-jest';
|
4
|
-
const jest = gulpJest.default;
|
5
|
-
const taskOpt = {
|
6
|
-
continueOnError: true,
|
7
|
-
};
|
8
|
-
export function buildPages(options) {
|
9
|
-
const { outputDir } = options;
|
10
|
-
return () => {
|
11
|
-
return gulp.src('typescript/pages/*.ts')
|
12
|
-
.pipe(swc(swcOptions))
|
13
|
-
.on('error', function (e) {
|
14
|
-
console.log("💩" + red.underline.bold(` => Build of Pages files failed!`));
|
15
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
16
|
-
this.emit('end');
|
17
|
-
})
|
18
|
-
.pipe(gulp.dest(path.join(outputDir, 'pages')))
|
19
|
-
.on('error', function (e) {
|
20
|
-
console.log("💩" + red.underline.bold(' => Build of Pages TS files failed!'));
|
21
|
-
console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
|
22
|
-
this.emit('end');
|
23
|
-
})
|
24
|
-
.on('end', function () { console.log("🐶" + blue.underline(' => Build of Pages TS files succeeded!')); });
|
25
|
-
};
|
26
|
-
}
|
package/dist/gulp/types.d.ts
DELETED