@raisenow/tamaro-cli 1.1.2 → 1.1.4
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/.eslintrc.cjs +1 -0
- package/.nvmrc +1 -1
- package/dist/{chunk-64RBHHXZ.js → chunk-NKTGEMJE.js} +2 -2
- package/dist/cli.js +66 -60
- package/dist/webpack.config.js +11 -7
- package/package.json +63 -65
- package/src/cli.ts +3 -0
- package/src/commands/build.ts +6 -1
- package/src/commands/dev.ts +6 -1
- package/src/lib/logging.ts +1 -1
- package/src/webpack.config.ts +10 -6
package/.eslintrc.cjs
CHANGED
|
@@ -54,6 +54,7 @@ module.exports = {
|
|
|
54
54
|
// '@typescript-eslint/explicit-function-return-type': 0,
|
|
55
55
|
'@typescript-eslint/consistent-type-definitions': 0,
|
|
56
56
|
// '@typescript-eslint/no-dynamic-delete': 0,
|
|
57
|
+
'@typescript-eslint/restrict-template-expressions': 0,
|
|
57
58
|
|
|
58
59
|
'@typescript-eslint/ban-ts-comment': [2, {'ts-expect-error': false}],
|
|
59
60
|
'@typescript-eslint/no-unused-vars': [1, {varsIgnorePattern: '^_'}],
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20.12.2
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/tsup@
|
|
1
|
+
// node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import { fileURLToPath } from "url";
|
|
3
3
|
import path from "path";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -10,7 +10,7 @@ import chalk from "chalk";
|
|
|
10
10
|
import columnify from "columnify";
|
|
11
11
|
import stripIndent from "strip-indent";
|
|
12
12
|
var logTitle = (title) => {
|
|
13
|
-
console.log(
|
|
13
|
+
console.log(chalk.bold(title));
|
|
14
14
|
};
|
|
15
15
|
var logError = (message) => {
|
|
16
16
|
if (message) {
|
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveBin,
|
|
23
23
|
resolveOwn,
|
|
24
24
|
runCommandSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-NKTGEMJE.js";
|
|
26
26
|
|
|
27
27
|
// src/cli.ts
|
|
28
28
|
import { createCommand } from "commander";
|
|
@@ -208,7 +208,7 @@ var assertOptionsValid = (options) => {
|
|
|
208
208
|
assertEnvValid(env);
|
|
209
209
|
};
|
|
210
210
|
var prepareFlags2 = (flags, options) => {
|
|
211
|
-
const { localCore, analyze, https } = options;
|
|
211
|
+
const { localCore, analyze, https, nolint } = options;
|
|
212
212
|
if (localCore) {
|
|
213
213
|
flags.push("--env localCore");
|
|
214
214
|
}
|
|
@@ -218,6 +218,9 @@ var prepareFlags2 = (flags, options) => {
|
|
|
218
218
|
if (https) {
|
|
219
219
|
flags.push("--env https");
|
|
220
220
|
}
|
|
221
|
+
if (nolint) {
|
|
222
|
+
flags.push("--env nolint");
|
|
223
|
+
}
|
|
221
224
|
return flags;
|
|
222
225
|
};
|
|
223
226
|
|
|
@@ -417,7 +420,7 @@ var assertOptionsValid3 = (options) => {
|
|
|
417
420
|
assertEnvValid(env);
|
|
418
421
|
};
|
|
419
422
|
var prepareFlags3 = async (flags, options) => {
|
|
420
|
-
const { localCore, port: defaultPort, https } = options;
|
|
423
|
+
const { localCore, port: defaultPort, https, nolint } = options;
|
|
421
424
|
const port = await getPortPromise({ port: Number(defaultPort) });
|
|
422
425
|
if (localCore) {
|
|
423
426
|
flags.push("--env localCore");
|
|
@@ -426,6 +429,9 @@ var prepareFlags3 = async (flags, options) => {
|
|
|
426
429
|
if (https) {
|
|
427
430
|
flags.push("--env https");
|
|
428
431
|
}
|
|
432
|
+
if (nolint) {
|
|
433
|
+
flags.push("--env nolint");
|
|
434
|
+
}
|
|
429
435
|
return flags;
|
|
430
436
|
};
|
|
431
437
|
|
|
@@ -532,7 +538,7 @@ var prepareFlags4 = async (flags, options) => {
|
|
|
532
538
|
// package.json
|
|
533
539
|
var package_default = {
|
|
534
540
|
name: "@raisenow/tamaro-cli",
|
|
535
|
-
version: "1.1.
|
|
541
|
+
version: "1.1.4",
|
|
536
542
|
author: {
|
|
537
543
|
name: "RaiseNow",
|
|
538
544
|
email: "development@raisenow.com"
|
|
@@ -550,89 +556,89 @@ var package_default = {
|
|
|
550
556
|
},
|
|
551
557
|
bin: "dist/cli.js",
|
|
552
558
|
engines: {
|
|
553
|
-
node: ">=
|
|
559
|
+
node: ">=20",
|
|
554
560
|
npm: ">=10"
|
|
555
561
|
},
|
|
562
|
+
packageManager: "pnpm@9.0.5",
|
|
556
563
|
dependencies: {
|
|
557
|
-
"@babel/cli": "^7.
|
|
558
|
-
"@babel/core": "^7.
|
|
559
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
564
|
+
"@babel/cli": "^7.24.1",
|
|
565
|
+
"@babel/core": "^7.24.4",
|
|
566
|
+
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
560
567
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
561
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
562
|
-
"@babel/preset-env": "^7.
|
|
563
|
-
"@babel/preset-react": "^7.
|
|
564
|
-
"@babel/preset-typescript": "^7.
|
|
565
|
-
"@babel/runtime-corejs3": "^7.
|
|
568
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
569
|
+
"@babel/preset-env": "^7.24.4",
|
|
570
|
+
"@babel/preset-react": "^7.24.1",
|
|
571
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
572
|
+
"@babel/runtime-corejs3": "^7.24.4",
|
|
566
573
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
567
|
-
"@statoscope/webpack-plugin": "^5.
|
|
568
|
-
"@types/columnify": "^1.5.
|
|
569
|
-
"@types/lodash": "^4.
|
|
570
|
-
"@types/node": "^
|
|
571
|
-
"@types/node-notifier": "^8.0.
|
|
572
|
-
"@types/prompts": "^2.4.
|
|
573
|
-
"@types/resolve-bin": "^0.4.
|
|
574
|
-
"@types/webpack-config-utils": "^2.3.
|
|
575
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
576
|
-
"@typescript-eslint/parser": "^
|
|
577
|
-
autoprefixer: "^10.4.
|
|
574
|
+
"@statoscope/webpack-plugin": "^5.28.2",
|
|
575
|
+
"@types/columnify": "^1.5.4",
|
|
576
|
+
"@types/lodash": "^4.17.0",
|
|
577
|
+
"@types/node": "^20.12.7",
|
|
578
|
+
"@types/node-notifier": "^8.0.5",
|
|
579
|
+
"@types/prompts": "^2.4.9",
|
|
580
|
+
"@types/resolve-bin": "^0.4.3",
|
|
581
|
+
"@types/webpack-config-utils": "^2.3.4",
|
|
582
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
583
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
584
|
+
autoprefixer: "^10.4.19",
|
|
578
585
|
"babel-loader": "^9.1.3",
|
|
579
586
|
"babel-plugin-istanbul": "^6.1.1",
|
|
580
587
|
"babel-plugin-lodash": "^3.3.4",
|
|
581
588
|
chalk: "^5.3.0",
|
|
582
589
|
"clean-webpack-plugin": "^4.0.0",
|
|
583
590
|
columnify: "^1.6.0",
|
|
584
|
-
commander: "^
|
|
585
|
-
"copy-webpack-plugin": "^
|
|
586
|
-
"core-js": "^3.
|
|
587
|
-
"css-loader": "^
|
|
588
|
-
"css-minimizer-webpack-plugin": "^
|
|
589
|
-
dotenv: "^16.
|
|
590
|
-
"dotenv-expand": "^
|
|
591
|
+
commander: "^12.0.0",
|
|
592
|
+
"copy-webpack-plugin": "^12.0.2",
|
|
593
|
+
"core-js": "^3.37.0",
|
|
594
|
+
"css-loader": "^7.1.1",
|
|
595
|
+
"css-minimizer-webpack-plugin": "^6.0.0",
|
|
596
|
+
dotenv: "^16.4.5",
|
|
597
|
+
"dotenv-expand": "^11.0.6",
|
|
591
598
|
"escape-string-regexp": "^5.0.0",
|
|
592
|
-
eslint: "^8.
|
|
593
|
-
"eslint-config-prettier": "^9.
|
|
594
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
599
|
+
eslint: "^8.57.0",
|
|
600
|
+
"eslint-config-prettier": "^9.1.0",
|
|
601
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
595
602
|
"eslint-plugin-deprecation": "^2.0.0",
|
|
596
|
-
"eslint-plugin-import": "^2.
|
|
603
|
+
"eslint-plugin-import": "^2.29.1",
|
|
597
604
|
"eslint-plugin-markdownlint": "^0.5.0",
|
|
598
605
|
"eslint-plugin-promise": "^6.1.1",
|
|
599
|
-
"eslint-plugin-unused-imports": "^3.
|
|
600
|
-
"eslint-plugin-yml": "^1.
|
|
601
|
-
"eslint-webpack-plugin": "^4.0
|
|
606
|
+
"eslint-plugin-unused-imports": "^3.1.0",
|
|
607
|
+
"eslint-plugin-yml": "^1.14.0",
|
|
608
|
+
"eslint-webpack-plugin": "^4.1.0",
|
|
602
609
|
execa: "^8.0.1",
|
|
603
610
|
"file-loader": "^6.2.0",
|
|
604
|
-
"fork-ts-checker-webpack-plugin": "^
|
|
605
|
-
glob: "^10.3.
|
|
606
|
-
"html-loader": "^
|
|
607
|
-
"html-webpack-plugin": "^5.
|
|
611
|
+
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
612
|
+
glob: "^10.3.12",
|
|
613
|
+
"html-loader": "^5.0.0",
|
|
614
|
+
"html-webpack-plugin": "^5.6.0",
|
|
608
615
|
"json-loader": "^0.5.7",
|
|
609
616
|
lodash: "^4.17.21",
|
|
610
|
-
"mini-css-extract-plugin": "^2.
|
|
617
|
+
"mini-css-extract-plugin": "^2.9.0",
|
|
611
618
|
"node-notifier": "^10.0.1",
|
|
612
619
|
portfinder: "^1.0.32",
|
|
613
|
-
postcss: "^8.4.
|
|
614
|
-
"postcss-custom-properties": "^13.3.
|
|
615
|
-
"postcss-loader": "^
|
|
616
|
-
prettier: "^3.
|
|
620
|
+
postcss: "^8.4.38",
|
|
621
|
+
"postcss-custom-properties": "^13.3.8",
|
|
622
|
+
"postcss-loader": "^8.1.1",
|
|
623
|
+
prettier: "^3.2.5",
|
|
617
624
|
prompts: "^2.4.2",
|
|
618
625
|
"react-refresh": "^0.14.0",
|
|
619
626
|
"resolve-url-loader": "^5.0.0",
|
|
620
|
-
sass: "^1.
|
|
621
|
-
"sass-loader": "^
|
|
622
|
-
"source-map-loader": "^
|
|
627
|
+
sass: "^1.75.0",
|
|
628
|
+
"sass-loader": "^14.2.1",
|
|
629
|
+
"source-map-loader": "^5.0.0",
|
|
623
630
|
"strip-indent": "^4.0.0",
|
|
624
|
-
"style-loader": "^
|
|
631
|
+
"style-loader": "^4.0.0",
|
|
625
632
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
626
|
-
tsup: "^
|
|
627
|
-
typescript: "^5.
|
|
633
|
+
tsup: "^8.0.2",
|
|
634
|
+
typescript: "^5.4.5",
|
|
628
635
|
"url-loader": "^4.1.1",
|
|
629
|
-
webpack: "^5.
|
|
636
|
+
webpack: "^5.91.0",
|
|
630
637
|
"webpack-cli": "^5.1.4",
|
|
631
638
|
"webpack-config-utils": "^2.3.1",
|
|
632
|
-
"webpack-dev-server": "^
|
|
633
|
-
"yaml-loader": "^0.8.
|
|
634
|
-
}
|
|
635
|
-
packageManager: "pnpm@8.7.5"
|
|
639
|
+
"webpack-dev-server": "^5.0.4",
|
|
640
|
+
"yaml-loader": "^0.8.1"
|
|
641
|
+
}
|
|
636
642
|
};
|
|
637
643
|
|
|
638
644
|
// src/cli.ts
|
|
@@ -653,7 +659,7 @@ cli.command("dev").description(
|
|
|
653
659
|
"--https",
|
|
654
660
|
"Let local web server serve Tamaro with SSL encryption",
|
|
655
661
|
false
|
|
656
|
-
).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").action(async (options) => {
|
|
662
|
+
).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").option("--nolint", "Disable ESLint", false).action(async (options) => {
|
|
657
663
|
await dev(options);
|
|
658
664
|
});
|
|
659
665
|
cli.command("build").description(
|
|
@@ -674,7 +680,7 @@ cli.command("build").description(
|
|
|
674
680
|
"--tag <tag>",
|
|
675
681
|
"Tag which should be used for the deployment of the bundle",
|
|
676
682
|
DEFAULT_TAG
|
|
677
|
-
).action(async (options) => {
|
|
683
|
+
).option("--nolint", "Disable ESLint", false).action(async (options) => {
|
|
678
684
|
await build(options);
|
|
679
685
|
if (options.serve) {
|
|
680
686
|
await serve(options);
|
package/dist/webpack.config.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
logTitle,
|
|
11
11
|
moduleFileExtensions,
|
|
12
12
|
resolveApp
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NKTGEMJE.js";
|
|
14
14
|
|
|
15
15
|
// src/webpack.config.ts
|
|
16
16
|
import { existsSync } from "fs";
|
|
@@ -75,6 +75,7 @@ var getWebpackConfig = (env) => {
|
|
|
75
75
|
const appEnvFiles = globSync(paths.appEnv);
|
|
76
76
|
const envVars = getEnvVars(appEnvFiles, ifMin, ifCore, ifLocalCore, ifHttps);
|
|
77
77
|
const { ifHmr } = getIfUtils({ hmr: process.env.HMR_ENABLED === "true" }, ["hmr"]);
|
|
78
|
+
const { ifNolint } = getIfUtils(env, ["nolint"]);
|
|
78
79
|
const useTailwind = ifCore() && paths.appTailwindConfig && existsSync(paths.appTailwindConfig);
|
|
79
80
|
logTitle("Paths:");
|
|
80
81
|
logDataTable(getRelativePaths(paths));
|
|
@@ -321,12 +322,15 @@ var getWebpackConfig = (env) => {
|
|
|
321
322
|
},
|
|
322
323
|
plugins: removeEmpty([
|
|
323
324
|
new webpack.ProgressPlugin(),
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
325
|
+
ifNolint(
|
|
326
|
+
false,
|
|
327
|
+
new ESLintPlugin({
|
|
328
|
+
extensions: moduleFileExtensions,
|
|
329
|
+
eslintPath: require2.resolve("eslint"),
|
|
330
|
+
cwd: paths.app,
|
|
331
|
+
resolvePluginsRelativeTo: paths.app
|
|
332
|
+
})
|
|
333
|
+
),
|
|
330
334
|
ifMin(
|
|
331
335
|
new CleanWebpackPlugin({
|
|
332
336
|
// verbose: true,
|
package/package.json
CHANGED
|
@@ -1,104 +1,102 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raisenow/tamaro-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "RaiseNow",
|
|
6
6
|
"email": "development@raisenow.com"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"prepare": "pnpm build",
|
|
11
|
-
"tscheck": "tsc --noEmit",
|
|
12
|
-
"build": "tsup src/cli.ts src/webpack.config.ts --clean --shims --format esm",
|
|
13
|
-
"build:watch": "pnpm build --watch --ignore-watch .history --ignore-watch .idea",
|
|
14
|
-
"readme": "pnpx http-server . --cors -o /readme.html",
|
|
15
|
-
"lint": "eslint .",
|
|
16
|
-
"lint:fix": "eslint --fix .",
|
|
17
|
-
"format": "prettier --write ."
|
|
18
|
-
},
|
|
19
9
|
"bin": "dist/cli.js",
|
|
20
10
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
11
|
+
"node": ">=20",
|
|
22
12
|
"npm": ">=10"
|
|
23
13
|
},
|
|
24
14
|
"dependencies": {
|
|
25
|
-
"@babel/cli": "^7.
|
|
26
|
-
"@babel/core": "^7.
|
|
27
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
15
|
+
"@babel/cli": "^7.24.1",
|
|
16
|
+
"@babel/core": "^7.24.4",
|
|
17
|
+
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
28
18
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
29
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
30
|
-
"@babel/preset-env": "^7.
|
|
31
|
-
"@babel/preset-react": "^7.
|
|
32
|
-
"@babel/preset-typescript": "^7.
|
|
33
|
-
"@babel/runtime-corejs3": "^7.
|
|
19
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
20
|
+
"@babel/preset-env": "^7.24.4",
|
|
21
|
+
"@babel/preset-react": "^7.24.1",
|
|
22
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
23
|
+
"@babel/runtime-corejs3": "^7.24.4",
|
|
34
24
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
35
|
-
"@statoscope/webpack-plugin": "^5.
|
|
36
|
-
"@types/columnify": "^1.5.
|
|
37
|
-
"@types/lodash": "^4.
|
|
38
|
-
"@types/node": "^
|
|
39
|
-
"@types/node-notifier": "^8.0.
|
|
40
|
-
"@types/prompts": "^2.4.
|
|
41
|
-
"@types/resolve-bin": "^0.4.
|
|
42
|
-
"@types/webpack-config-utils": "^2.3.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
44
|
-
"@typescript-eslint/parser": "^
|
|
45
|
-
"autoprefixer": "^10.4.
|
|
25
|
+
"@statoscope/webpack-plugin": "^5.28.2",
|
|
26
|
+
"@types/columnify": "^1.5.4",
|
|
27
|
+
"@types/lodash": "^4.17.0",
|
|
28
|
+
"@types/node": "^20.12.7",
|
|
29
|
+
"@types/node-notifier": "^8.0.5",
|
|
30
|
+
"@types/prompts": "^2.4.9",
|
|
31
|
+
"@types/resolve-bin": "^0.4.3",
|
|
32
|
+
"@types/webpack-config-utils": "^2.3.4",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
34
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
35
|
+
"autoprefixer": "^10.4.19",
|
|
46
36
|
"babel-loader": "^9.1.3",
|
|
47
37
|
"babel-plugin-istanbul": "^6.1.1",
|
|
48
38
|
"babel-plugin-lodash": "^3.3.4",
|
|
49
39
|
"chalk": "^5.3.0",
|
|
50
40
|
"clean-webpack-plugin": "^4.0.0",
|
|
51
41
|
"columnify": "^1.6.0",
|
|
52
|
-
"commander": "^
|
|
53
|
-
"copy-webpack-plugin": "^
|
|
54
|
-
"core-js": "^3.
|
|
55
|
-
"css-loader": "^
|
|
56
|
-
"css-minimizer-webpack-plugin": "^
|
|
57
|
-
"dotenv": "^16.
|
|
58
|
-
"dotenv-expand": "^
|
|
42
|
+
"commander": "^12.0.0",
|
|
43
|
+
"copy-webpack-plugin": "^12.0.2",
|
|
44
|
+
"core-js": "^3.37.0",
|
|
45
|
+
"css-loader": "^7.1.1",
|
|
46
|
+
"css-minimizer-webpack-plugin": "^6.0.0",
|
|
47
|
+
"dotenv": "^16.4.5",
|
|
48
|
+
"dotenv-expand": "^11.0.6",
|
|
59
49
|
"escape-string-regexp": "^5.0.0",
|
|
60
|
-
"eslint": "^8.
|
|
61
|
-
"eslint-config-prettier": "^9.
|
|
62
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
50
|
+
"eslint": "^8.57.0",
|
|
51
|
+
"eslint-config-prettier": "^9.1.0",
|
|
52
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
63
53
|
"eslint-plugin-deprecation": "^2.0.0",
|
|
64
|
-
"eslint-plugin-import": "^2.
|
|
54
|
+
"eslint-plugin-import": "^2.29.1",
|
|
65
55
|
"eslint-plugin-markdownlint": "^0.5.0",
|
|
66
56
|
"eslint-plugin-promise": "^6.1.1",
|
|
67
|
-
"eslint-plugin-unused-imports": "^3.
|
|
68
|
-
"eslint-plugin-yml": "^1.
|
|
69
|
-
"eslint-webpack-plugin": "^4.0
|
|
57
|
+
"eslint-plugin-unused-imports": "^3.1.0",
|
|
58
|
+
"eslint-plugin-yml": "^1.14.0",
|
|
59
|
+
"eslint-webpack-plugin": "^4.1.0",
|
|
70
60
|
"execa": "^8.0.1",
|
|
71
61
|
"file-loader": "^6.2.0",
|
|
72
|
-
"fork-ts-checker-webpack-plugin": "^
|
|
73
|
-
"glob": "^10.3.
|
|
74
|
-
"html-loader": "^
|
|
75
|
-
"html-webpack-plugin": "^5.
|
|
62
|
+
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
63
|
+
"glob": "^10.3.12",
|
|
64
|
+
"html-loader": "^5.0.0",
|
|
65
|
+
"html-webpack-plugin": "^5.6.0",
|
|
76
66
|
"json-loader": "^0.5.7",
|
|
77
67
|
"lodash": "^4.17.21",
|
|
78
|
-
"mini-css-extract-plugin": "^2.
|
|
68
|
+
"mini-css-extract-plugin": "^2.9.0",
|
|
79
69
|
"node-notifier": "^10.0.1",
|
|
80
70
|
"portfinder": "^1.0.32",
|
|
81
|
-
"postcss": "^8.4.
|
|
82
|
-
"postcss-custom-properties": "^13.3.
|
|
83
|
-
"postcss-loader": "^
|
|
84
|
-
"prettier": "^3.
|
|
71
|
+
"postcss": "^8.4.38",
|
|
72
|
+
"postcss-custom-properties": "^13.3.8",
|
|
73
|
+
"postcss-loader": "^8.1.1",
|
|
74
|
+
"prettier": "^3.2.5",
|
|
85
75
|
"prompts": "^2.4.2",
|
|
86
76
|
"react-refresh": "^0.14.0",
|
|
87
77
|
"resolve-url-loader": "^5.0.0",
|
|
88
|
-
"sass": "^1.
|
|
89
|
-
"sass-loader": "^
|
|
90
|
-
"source-map-loader": "^
|
|
78
|
+
"sass": "^1.75.0",
|
|
79
|
+
"sass-loader": "^14.2.1",
|
|
80
|
+
"source-map-loader": "^5.0.0",
|
|
91
81
|
"strip-indent": "^4.0.0",
|
|
92
|
-
"style-loader": "^
|
|
82
|
+
"style-loader": "^4.0.0",
|
|
93
83
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
94
|
-
"tsup": "^
|
|
95
|
-
"typescript": "^5.
|
|
84
|
+
"tsup": "^8.0.2",
|
|
85
|
+
"typescript": "^5.4.5",
|
|
96
86
|
"url-loader": "^4.1.1",
|
|
97
|
-
"webpack": "^5.
|
|
87
|
+
"webpack": "^5.91.0",
|
|
98
88
|
"webpack-cli": "^5.1.4",
|
|
99
89
|
"webpack-config-utils": "^2.3.1",
|
|
100
|
-
"webpack-dev-server": "^
|
|
101
|
-
"yaml-loader": "^0.8.
|
|
90
|
+
"webpack-dev-server": "^5.0.4",
|
|
91
|
+
"yaml-loader": "^0.8.1"
|
|
102
92
|
},
|
|
103
|
-
"
|
|
104
|
-
|
|
93
|
+
"scripts": {
|
|
94
|
+
"tscheck": "tsc --noEmit",
|
|
95
|
+
"build": "tsup src/cli.ts src/webpack.config.ts --clean --shims --format esm",
|
|
96
|
+
"build:watch": "pnpm build --watch --ignore-watch .history --ignore-watch .idea",
|
|
97
|
+
"readme": "pnpx http-server . --cors -o /readme.html",
|
|
98
|
+
"lint": "eslint .",
|
|
99
|
+
"lint:fix": "eslint --fix .",
|
|
100
|
+
"format": "prettier --write ."
|
|
101
|
+
}
|
|
102
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -51,6 +51,7 @@ cli
|
|
|
51
51
|
)
|
|
52
52
|
.option('--port <port>', 'Web server port', `${DEFAULT_PORT}`)
|
|
53
53
|
.option('--env <env>', 'Environment (dev, stage, prod)')
|
|
54
|
+
.option('--nolint', 'Disable ESLint', false)
|
|
54
55
|
.action(async (options: DevOptions) => {
|
|
55
56
|
await dev(options)
|
|
56
57
|
})
|
|
@@ -85,6 +86,7 @@ cli
|
|
|
85
86
|
'Tag which should be used for the deployment of the bundle',
|
|
86
87
|
DEFAULT_TAG,
|
|
87
88
|
)
|
|
89
|
+
.option('--nolint', 'Disable ESLint', false)
|
|
88
90
|
.action(async (options: BuildOptions & ServeOptions & DeployOptions) => {
|
|
89
91
|
await build(options)
|
|
90
92
|
|
|
@@ -148,6 +150,7 @@ cli
|
|
|
148
150
|
})
|
|
149
151
|
|
|
150
152
|
///////////////////////////////////////////////////////////////////////////////
|
|
153
|
+
|
|
151
154
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
152
155
|
;(async () => {
|
|
153
156
|
try {
|
package/src/commands/build.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type BuildOptions = {
|
|
|
23
23
|
serve: boolean
|
|
24
24
|
deploy: boolean
|
|
25
25
|
env?: string
|
|
26
|
+
nolint: boolean
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
///////////////////////////////////////////////////////////////////////////////
|
|
@@ -102,7 +103,7 @@ const assertOptionsValid = (options: BuildOptions & DeployOptions) => {
|
|
|
102
103
|
///////////////////////////////////////////////////////////////////////////////
|
|
103
104
|
|
|
104
105
|
const prepareFlags = (flags: string[], options: BuildOptions): string[] => {
|
|
105
|
-
const {localCore, analyze, https} = options
|
|
106
|
+
const {localCore, analyze, https, nolint} = options
|
|
106
107
|
|
|
107
108
|
if (localCore) {
|
|
108
109
|
flags.push('--env localCore')
|
|
@@ -116,5 +117,9 @@ const prepareFlags = (flags: string[], options: BuildOptions): string[] => {
|
|
|
116
117
|
flags.push('--env https')
|
|
117
118
|
}
|
|
118
119
|
|
|
120
|
+
if (nolint) {
|
|
121
|
+
flags.push('--env nolint')
|
|
122
|
+
}
|
|
123
|
+
|
|
119
124
|
return flags
|
|
120
125
|
}
|
package/src/commands/dev.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type DevOptions = {
|
|
|
12
12
|
https: boolean
|
|
13
13
|
port: string
|
|
14
14
|
env?: string
|
|
15
|
+
nolint: boolean
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
///////////////////////////////////////////////////////////////////////////////
|
|
@@ -68,7 +69,7 @@ const prepareFlags = async (
|
|
|
68
69
|
flags: string[],
|
|
69
70
|
options: DevOptions,
|
|
70
71
|
): Promise<string[]> => {
|
|
71
|
-
const {localCore, port: defaultPort, https} = options
|
|
72
|
+
const {localCore, port: defaultPort, https, nolint} = options
|
|
72
73
|
const port = await getPortPromise({port: Number(defaultPort)})
|
|
73
74
|
|
|
74
75
|
if (localCore) {
|
|
@@ -81,5 +82,9 @@ const prepareFlags = async (
|
|
|
81
82
|
flags.push('--env https')
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
if (nolint) {
|
|
86
|
+
flags.push('--env nolint')
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
return flags
|
|
85
90
|
}
|
package/src/lib/logging.ts
CHANGED
|
@@ -6,7 +6,7 @@ import stripIndent from 'strip-indent'
|
|
|
6
6
|
|
|
7
7
|
export const logTitle = (title: string) => {
|
|
8
8
|
// eslint-disable-next-line no-console
|
|
9
|
-
console.log(
|
|
9
|
+
console.log(chalk.bold(title))
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
///////////////////////////////////////////////////////////////////////////////
|
package/src/webpack.config.ts
CHANGED
|
@@ -50,6 +50,7 @@ const getWebpackConfig = (env: any): Configuration => {
|
|
|
50
50
|
const appEnvFiles = globSync(paths.appEnv)
|
|
51
51
|
const envVars = getEnvVars(appEnvFiles, ifMin, ifCore, ifLocalCore, ifHttps)
|
|
52
52
|
const {ifHmr} = getIfUtils({hmr: process.env.HMR_ENABLED === 'true'}, ['hmr'])
|
|
53
|
+
const {ifNolint} = getIfUtils(env, ['nolint'])
|
|
53
54
|
const useTailwind =
|
|
54
55
|
ifCore() && paths.appTailwindConfig && existsSync(paths.appTailwindConfig)
|
|
55
56
|
|
|
@@ -315,12 +316,15 @@ const getWebpackConfig = (env: any): Configuration => {
|
|
|
315
316
|
|
|
316
317
|
plugins: removeEmpty([
|
|
317
318
|
new webpack.ProgressPlugin(),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
ifNolint(
|
|
320
|
+
false,
|
|
321
|
+
new ESLintPlugin({
|
|
322
|
+
extensions: moduleFileExtensions,
|
|
323
|
+
eslintPath: require.resolve('eslint'),
|
|
324
|
+
cwd: paths.app,
|
|
325
|
+
resolvePluginsRelativeTo: paths.app,
|
|
326
|
+
}),
|
|
327
|
+
),
|
|
324
328
|
ifMin(
|
|
325
329
|
new CleanWebpackPlugin({
|
|
326
330
|
// verbose: true,
|