lucy-cli 1.2.4 → 2.0.0-alpha.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 (173) hide show
  1. package/README.md +4 -3
  2. package/dist/args.d.ts +7 -0
  3. package/dist/args.js +23 -0
  4. package/dist/commands.d.ts +3 -0
  5. package/dist/commands.js +18 -0
  6. package/dist/config.d.ts +20 -0
  7. package/dist/config.js +39 -0
  8. package/dist/error.d.ts +17 -0
  9. package/dist/error.js +5 -0
  10. package/dist/helpers.d.ts +1 -32
  11. package/dist/helpers.js +6 -261
  12. package/dist/index.d.ts +2 -52
  13. package/dist/index.js +25 -282
  14. package/dist/init.d.ts +4 -8
  15. package/dist/init.js +245 -160
  16. package/dist/params.d.ts +7 -0
  17. package/dist/params.js +23 -0
  18. package/dist/policy.d.ts +3 -0
  19. package/dist/policy.js +5 -0
  20. package/dist/prepare.d.ts +0 -8
  21. package/dist/prepare.js +20 -19
  22. package/dist/runtime.d.ts +5 -0
  23. package/dist/runtime.js +11 -0
  24. package/dist/schemas/index.d.ts +2 -0
  25. package/dist/schemas/index.js +2 -0
  26. package/dist/schemas/types.js +1 -0
  27. package/dist/states.d.ts +10 -0
  28. package/dist/states.js +7 -0
  29. package/files/expo/.env +1 -0
  30. package/files/expo/.nvmrc +1 -0
  31. package/files/expo/.prettierignore +23 -0
  32. package/files/expo/.prettierrc.json +16 -0
  33. package/files/expo/.yarnrc +1 -0
  34. package/files/expo/.yarnrc.yml +3 -0
  35. package/files/expo/app/(tabs)/_layout.tsx +45 -0
  36. package/files/expo/app/_layout.tsx +45 -0
  37. package/files/expo/babel.config.js +9 -0
  38. package/files/expo/constants/Colors.ts +27 -0
  39. package/files/expo/constants/theme.ts +18 -0
  40. package/files/expo/eas.json +26 -0
  41. package/files/expo/eslint.config.js +185 -0
  42. package/files/expo/global.css +47 -0
  43. package/files/expo/hooks/useColorScheme.ts +11 -0
  44. package/files/expo/hooks/useColorScheme.web.ts +21 -0
  45. package/files/expo/hooks/useColorSchemeRN.ts +1 -0
  46. package/files/expo/hooks/useThemeColor.ts +21 -0
  47. package/files/expo/lib/data.ts +45 -0
  48. package/files/expo/lib/utils/index.ts +6 -0
  49. package/files/expo/lib/utils/polyfills.ts +29 -0
  50. package/files/expo/lib/wix/client.ts +14 -0
  51. package/files/expo/lib/wix/index.ts +1 -0
  52. package/files/expo/lucy.json +8 -0
  53. package/files/expo/readme.md +45 -0
  54. package/files/expo/tailwind.config.js +198 -0
  55. package/files/expo/tsconfig.json +40 -0
  56. package/files/expo/types/nativewind-env.d.ts +1 -0
  57. package/files/expo/types/reset.d.ts +1 -0
  58. package/files/velo/typescript/styles/global.scss +0 -0
  59. package/package.json +14 -11
  60. package/src/args.ts +36 -0
  61. package/src/commands.ts +21 -0
  62. package/src/config.ts +61 -0
  63. package/src/error.ts +4 -0
  64. package/src/helpers.ts +7 -305
  65. package/src/index.ts +29 -362
  66. package/src/init.ts +345 -177
  67. package/src/policy.ts +6 -0
  68. package/src/prepare.ts +19 -19
  69. package/src/runtime.ts +20 -0
  70. package/src/schemas/index.ts +3 -0
  71. package/src/schemas/types.ts +0 -0
  72. package/src/states.ts +15 -0
  73. package/{src/Gulpfile.ts → src copy/Gulpfile.ts } +3 -1
  74. package/{src/gulp/backend.ts → src copy/gulp/backend.ts } +3 -12
  75. package/{src/gulp/checks.ts → src copy/gulp/checks.ts } +2 -6
  76. package/{src/gulp/copy.ts → src copy/gulp/copy.ts } +1 -6
  77. package/src copy/gulp/helpers.ts +26 -0
  78. package/{src/gulp/public.ts → src copy/gulp/public.ts } +1 -6
  79. package/{src/gulp/styles.ts → src copy/gulp/styles.ts } +2 -7
  80. package/{src/gulp/templates.ts → src copy/gulp/templates.ts } +1 -6
  81. package/src copy/helpers.ts +307 -0
  82. package/src copy/index.ts +379 -0
  83. package/src copy/init.ts +183 -0
  84. package/src copy/models.ts +35 -0
  85. package/src copy/prepare.ts +24 -0
  86. package/src copy/schemas/index.ts +0 -0
  87. package/src copy/schemas/types.ts +0 -0
  88. package/src copy/settings.json +67 -0
  89. package/src copy/types.d.ts +8 -0
  90. package/dist/Gulpfile.d.ts +0 -33
  91. package/dist/Gulpfile.js +0 -114
  92. package/dist/cli.d.ts +0 -2
  93. package/dist/cli.js +0 -44
  94. package/dist/dev.d.ts +0 -2
  95. package/dist/dev.js +0 -14
  96. package/dist/gulp/backend copy.d.ts +0 -4
  97. package/dist/gulp/backend copy.js +0 -50
  98. package/dist/gulp/backend.d.ts +0 -3
  99. package/dist/gulp/backend.js +0 -101
  100. package/dist/gulp/checks.d.ts +0 -3
  101. package/dist/gulp/checks.js +0 -209
  102. package/dist/gulp/clean copy.d.ts +0 -2
  103. package/dist/gulp/clean copy.js +0 -19
  104. package/dist/gulp/clean.d.ts +0 -3
  105. package/dist/gulp/clean.js +0 -28
  106. package/dist/gulp/copy.d.ts +0 -2
  107. package/dist/gulp/copy.js +0 -38
  108. package/dist/gulp/docs.d.ts +0 -2
  109. package/dist/gulp/docs.js +0 -27
  110. package/dist/gulp/helpers.d.ts +0 -1
  111. package/dist/gulp/helpers.js +0 -7
  112. package/dist/gulp/pages copy.d.ts +0 -3
  113. package/dist/gulp/pages copy.js +0 -22
  114. package/dist/gulp/pages.d.ts +0 -2
  115. package/dist/gulp/pages.js +0 -36
  116. package/dist/gulp/pipeline.d.ts +0 -1
  117. package/dist/gulp/pipeline.js +0 -28
  118. package/dist/gulp/public.d.ts +0 -2
  119. package/dist/gulp/public.js +0 -54
  120. package/dist/gulp/styles.d.ts +0 -2
  121. package/dist/gulp/styles.js +0 -44
  122. package/dist/gulp/templates.d.ts +0 -2
  123. package/dist/gulp/templates.js +0 -37
  124. package/dist/gulp/test.d.ts +0 -2
  125. package/dist/gulp/test.js +0 -26
  126. package/dist/gulp/types.d.ts +0 -4
  127. package/dist/gulp/types.js +0 -288
  128. package/dist/gulp/watchers.d.ts +0 -9
  129. package/dist/gulp/watchers.js +0 -58
  130. package/dist/init copy.d.ts +0 -8
  131. package/dist/init copy.js +0 -167
  132. package/dist/install.d.ts +0 -2
  133. package/dist/install.js +0 -53
  134. package/dist/settings.json +0 -67
  135. package/dist/start_gulp.d.ts +0 -2
  136. package/dist/start_gulp.js +0 -14
  137. package/dist/sync.d.ts +0 -2
  138. package/dist/sync.js +0 -87
  139. package/src/gulp/helpers.ts +0 -9
  140. /package/{files/.gitmodules → dist/schemas/types.d.ts} +0 -0
  141. /package/files/{typescript/__mocks__/.gitkeep → velo/.gitmodules} +0 -0
  142. /package/files/{.madgerc → velo/.madgerc} +0 -0
  143. /package/files/{.nvmrc → velo/.nvmrc} +0 -0
  144. /package/files/{.stylelintrc.js → velo/.stylelintrc.js} +0 -0
  145. /package/files/{.yarnrc.yml → velo/.yarnrc.yml} +0 -0
  146. /package/files/{currents.config.js → velo/currents.config.js} +0 -0
  147. /package/files/{cypress → velo/cypress}/e2e/base/base.cy.ts +0 -0
  148. /package/files/{cypress → velo/cypress}/fixtures/example.json +0 -0
  149. /package/files/{cypress → velo/cypress}/support/commands.ts +0 -0
  150. /package/files/{cypress → velo/cypress}/support/e2e.ts +0 -0
  151. /package/files/{cypress → velo/cypress}/tsconfig.json +0 -0
  152. /package/files/{cypress.config.mjs → velo/cypress.config.mjs} +0 -0
  153. /package/files/{eslint.config.mjs → velo/eslint.config.mjs} +0 -0
  154. /package/files/{local.tsconfig.json → velo/local.tsconfig.json} +0 -0
  155. /package/files/{typedoc.json → velo/typedoc.json} +0 -0
  156. /package/files/{typescript/pages → velo/typescript/__mocks__}/.gitkeep +0 -0
  157. /package/files/{typescript → velo/typescript}/backend/data.ts +0 -0
  158. /package/files/{typescript → velo/typescript}/backend/events.ts +0 -0
  159. /package/files/{typescript → velo/typescript}/backend/http-functions.ts +0 -0
  160. /package/files/{typescript → velo/typescript}/backend/lib/http-functions/sync.ts +0 -0
  161. /package/files/{typescript → velo/typescript}/backend/permissions.json +0 -0
  162. /package/files/{typescript/public → velo/typescript/pages}/.gitkeep +0 -0
  163. /package/files/{typescript/styles → velo/typescript/public}/.gitkeep +0 -0
  164. /package/files/{typescript → velo/typescript}/public/scss/app.scss +0 -0
  165. /package/files/{typescript/styles/global.scss → velo/typescript/styles/.gitkeep} +0 -0
  166. /package/files/{typescript → velo/typescript}/tsconfig.json +0 -0
  167. /package/files/{vitest.config.ts → velo/vitest.config.ts} +0 -0
  168. /package/{src → src copy}/gulp/clean.ts +0 -0
  169. /package/{src → src copy}/gulp/pages.ts +0 -0
  170. /package/{src → src copy}/gulp/pipeline.ts +0 -0
  171. /package/{src → src copy}/gulp/types.ts +0 -0
  172. /package/{src → src copy}/gulp/watchers.ts +0 -0
  173. /package/{src → src copy}/sync.ts +0 -0
@@ -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
- }
@@ -1,3 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile';
2
- export declare function cleanWix(): () => any;
3
- export declare function cleanSrc(options: TaskOptions): () => any;
@@ -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
- }
@@ -1,2 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile';
2
- export declare function copyFiles(options: TaskOptions): import("undertaker").TaskFunction;
package/dist/gulp/copy.js DELETED
@@ -1,38 +0,0 @@
1
- import gulp from 'gulp';
2
- import { blue, orange, red } from '../index.js';
3
- export function copyFiles(options) {
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/**`,
22
- ])
23
- .pipe(gulp.dest(outputDir))
24
- .on('error', function (e) {
25
- console.log("💩" + red.underline.bold(` => Copy of files for ${orange(folder)} failed!`));
26
- console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
27
- this.emit('end');
28
- })
29
- .on('end', function () {
30
- console.log("🐶" + blue.underline(` => Copy of files for ${orange(folder)} succeeded!`));
31
- });
32
- // Register the task with Gulp
33
- Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
34
- return task;
35
- });
36
- // Run all tasks in parallel
37
- return gulp.parallel(...tasks);
38
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="node" />
2
- export declare function generateDocs(): NodeJS.ReadWriteStream;
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
- }
@@ -1 +0,0 @@
1
- export declare function getModulesSync(): Record<string, string> | undefined;
@@ -1,7 +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
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="node" />
2
- import { TaksOptions } from '../Gulpfile';
3
- export declare function buildPages(options: TaksOptions): () => NodeJS.ReadWriteStream;
@@ -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
- }
@@ -1,2 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile';
2
- export declare function buildPages(options: TaskOptions): () => any;
@@ -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
- }
@@ -1 +0,0 @@
1
- export declare function setProdConfig(): () => any;
@@ -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
- }
@@ -1,2 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile';
2
- export declare function buildPublic(options: TaskOptions): import("undertaker").TaskFunction;
@@ -1,54 +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'];
20
- if (options.modulesSync) {
21
- for (const module of Object.keys(options.modulesSync)) {
22
- folders.push(module);
23
- }
24
- }
25
- const { outputDir } = options;
26
- // Create tasks for each folder
27
- const tasks = folders.map((folder) => {
28
- const taskName = `build_Public-${folder}`; // Create a unique name for each task
29
- const task = () => gulp.src([
30
- `${folder}/public/**/*.ts`,
31
- `${folder}/public/**/*.tsx`,
32
- ])
33
- .pipe(swc(swcOptions))
34
- .on('error', function (e) {
35
- console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
36
- console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
37
- this.emit('end');
38
- })
39
- .pipe(gulp.dest(path.join(outputDir, 'public')))
40
- .on('error', function (e) {
41
- console.log("💩" + red.underline.bold(` => Build of Public files for ${orange(folder)} failed!`));
42
- console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
43
- this.emit('end');
44
- })
45
- .on('end', function () {
46
- console.log("🐶" + blue.underline(` => Build of Public files for ${orange(folder)} succeeded!`));
47
- });
48
- // Register the task with Gulp
49
- Object.defineProperty(task, 'name', { value: taskName }); // Set a unique name for debugging
50
- return task;
51
- });
52
- // Run all tasks in parallel
53
- return gulp.parallel(...tasks);
54
- }
@@ -1,2 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile';
2
- export declare function compileScss(options: TaskOptions): import("undertaker").TaskFunction;
@@ -1,44 +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
- // if (options.modulesSync){
6
- // for (const module of Object.keys(options.modulesSync)) {
7
- // folders.push(module);
8
- // }
9
- // }
10
- const { sass, outputDir } = options;
11
- const buildWixScss = () => gulp.src(['typescript/styles/global.scss'])
12
- .pipe(sass().on('error', sass.logError))
13
- .on('error', function (e) {
14
- console.log("💩" + red.underline.bold(` => Build of SCSS files for ${orange('global.scs')} failed!`));
15
- console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
16
- this.emit('end');
17
- })
18
- .pipe(gulp.dest(`${outputDir}/styles`))
19
- .on('error', function (e) {
20
- console.log("💩" + red.underline.bold(` => Compiling of scss files for ${orange('global.scs')} 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(` => Compiling of scss files for ${orange('global.scs')} succeeded!`));
26
- });
27
- const buildScss = () => gulp.src(['typescript/public/scss/app.scss'])
28
- .pipe(sass().on('error', sass.logError))
29
- .on('error', function (e) {
30
- console.log("💩" + red.underline.bold(` => Build of SCSS files for ${orange('app.scss')} failed!`));
31
- console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
32
- this.emit('end');
33
- })
34
- .pipe(gulp.dest(`${outputDir}/public/css`))
35
- .on('error', function (e) {
36
- console.log("💩" + red.underline.bold(` => Compiling of scss files for ${orange('app.scss')} 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(` => Compiling of scss files for ${orange('app.scss')} succeeded!`));
42
- });
43
- return gulp.parallel(buildWixScss, buildScss);
44
- }
@@ -1,2 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile';
2
- export declare function previewTemplates(options: TaskOptions): import("undertaker").TaskFunction;
@@ -1,37 +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'];
6
- if (options.modulesSync) {
7
- for (const module of Object.keys(options.modulesSync)) {
8
- folders.push(module);
9
- }
10
- }
11
- const taskOpt = {
12
- continueOnError: true,
13
- };
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`,
21
- ])
22
- .pipe(exec((file) => `npx tsx --tsconfig ./local.tsconfig.json ${file.path}`, taskOpt))
23
- .on('error', function (e) {
24
- console.log("💩" + red.underline.bold(` => Render of Template for ${orange(folder)} failed!`));
25
- console.log("💩" + red.underline.bold(` => Error: ${orange(e.message)}`));
26
- this.emit('end');
27
- })
28
- .on('end', function () {
29
- console.log("🐶" + blue.underline(` => Render of Template 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);
37
- }
@@ -1,2 +0,0 @@
1
- import { TaskOptions } from '../Gulpfile.js';
2
- export declare function buildPages(options: TaskOptions): () => any;
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
- }
@@ -1,4 +0,0 @@
1
- import gulp from 'gulp';
2
- import { TaskOptions } from '../Gulpfile';
3
- export declare function updateWixTypes(options: TaskOptions): () => any;
4
- export declare function addTypes(options: TaskOptions, done: gulp.TaskFunctionCallback): NodeJS.ReadWriteStream;