arui-scripts 12.3.0 → 12.4.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/CHANGELOG.md +2 -3
- package/README.md +1 -0
- package/build/commands/docker-build/index.js +10 -8
- package/build/configs/app-configs/available-package-settings.d.ts +1 -1
- package/build/configs/app-configs/available-package-settings.js +1 -0
- package/build/configs/app-configs/get-defaults.js +1 -0
- package/build/configs/app-configs/types.d.ts +1 -0
- package/build/tsconfig-local.tsbuildinfo +6 -6
- package/package.json +1 -1
- package/release.config.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
# [12.
|
|
1
|
+
# [12.4.0](https://git.moscow.alfaintra.net/ef/arui-scripts/compare/v12.3.0...v12.4.0) (2022-05-25)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
* add
|
|
7
|
-
* allow using config files instead of package config ([5063d23](https://git.moscow.alfaintra.net/ef/arui-scripts/commit/5063d23abc1a13b503c73b0906d68aaa57840a74))
|
|
6
|
+
* add removeDevDependenciesDuringDockerBuild setting ([51f016f](https://git.moscow.alfaintra.net/ef/arui-scripts/commit/51f016f3aad3e2e5e489659d0b26e6005cacdafe))
|
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ npm install arui-scripts --save-dev
|
|
|
74
74
|
- `useTscLoader` - использовать ts-loader вместо babel-loader для обработки ts файлов. У babel-loader есть [ряд ограничений](https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/). По умолчанию `false`.
|
|
75
75
|
- `componentsTheme` - путь к css файлу с темой для [core-components](https://alfa-laboratory.github.io/core-components). Используется для настройки [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties#importfrom).
|
|
76
76
|
- `keepCssVars` - отключает `postcss-custom-properties`, css переменные будут оставаться в бандле.
|
|
77
|
+
- `removeDevDependenciesDuringDockerBuild` - отключает удаление devDependencies из node_modules при сборке докер образа. Используется когда вам не нужно удалять devDependencies, т.к. в своём Dockerfile вы не переносите node_modules в докер-контейнер
|
|
77
78
|
|
|
78
79
|
В целях отладки все эти настройки можно переопределить не изменяя package.json
|
|
79
80
|
Просто передайте необходимые настройки в environment переменной ARUI_SCRIPTS_CONFIG
|
|
@@ -70,15 +70,17 @@ const imageFullName = `${dockerRegistry ? `${dockerRegistry}/` : ''}${imageName}
|
|
|
70
70
|
// run build script
|
|
71
71
|
yield exec_1.default('npm run build');
|
|
72
72
|
console.timeEnd('Build application time');
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
if (app_configs_1.default.removeDevDependenciesDuringDockerBuild) {
|
|
74
|
+
console.time('Remove dev dependencies time');
|
|
75
|
+
// if yarn is available prune dev dependencies with yarn, otherwise use npm
|
|
76
|
+
if (app_configs_1.default.useYarn && shelljs_1.default.which('yarn')) {
|
|
77
|
+
yield exec_1.default('yarn install --production --ignore-optional --frozen-lockfile --ignore-scripts --prefer-offline');
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
yield exec_1.default('npm prune --production');
|
|
81
|
+
}
|
|
82
|
+
console.timeEnd('Remove dev dependencies time');
|
|
77
83
|
}
|
|
78
|
-
else {
|
|
79
|
-
yield exec_1.default('npm prune --production');
|
|
80
|
-
}
|
|
81
|
-
console.timeEnd('Remove dev dependencies time');
|
|
82
84
|
console.time('Build docker image time');
|
|
83
85
|
yield exec_1.default(`docker build -f "./${tempDirName}/Dockerfile" \\
|
|
84
86
|
--build-arg START_SH_LOCATION="./${tempDirName}/start.sh" \\
|
|
@@ -2,7 +2,7 @@ import { AppConfigs } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Эти ключи из конфига будут обновляться из package.json при их наличии
|
|
4
4
|
*/
|
|
5
|
-
export declare const availablePackageSettings: readonly ["dockerRegistry", "baseDockerImage", "serverEntry", "buildPath", "assetsPath", "additionalBuildPath", "nginxRootPath", "runFromNonRootUser", "archiveName", "serverOutput", "clientPolyfillsEntry", "clientEntry", "keepPropTypes", "useTscLoader", "useServerHMR", "clientServerPort", "serverPort", "debug", "statsOutputFilename", "componentsTheme", "keepCssVars"];
|
|
5
|
+
export declare const availablePackageSettings: readonly ["dockerRegistry", "baseDockerImage", "serverEntry", "buildPath", "assetsPath", "additionalBuildPath", "nginxRootPath", "runFromNonRootUser", "archiveName", "serverOutput", "clientPolyfillsEntry", "clientEntry", "keepPropTypes", "useTscLoader", "useServerHMR", "clientServerPort", "serverPort", "debug", "statsOutputFilename", "componentsTheme", "keepCssVars", "removeDevDependenciesDuringDockerBuild"];
|
|
6
6
|
declare type ArrayElementType<ArrayType extends ReadonlyArray<unknown>> = ArrayType[number];
|
|
7
7
|
export declare type PackageSettings = Partial<Pick<AppConfigs, ArrayElementType<typeof availablePackageSettings>>>;
|
|
8
8
|
export {};
|
|
@@ -55,6 +55,7 @@ function getDefaults() {
|
|
|
55
55
|
debug: false,
|
|
56
56
|
overridesPath: overridesPath ? [overridesPath] : [],
|
|
57
57
|
statsOutputFilename: 'stats.json',
|
|
58
|
+
removeDevDependenciesDuringDockerBuild: true,
|
|
58
59
|
componentsTheme: undefined,
|
|
59
60
|
keepCssVars: false,
|
|
60
61
|
// Эти пути зависят от других настроек, которые могут быть переопределены пользователем
|
|
@@ -602,8 +602,8 @@
|
|
|
602
602
|
"affectsGlobalScope": true
|
|
603
603
|
},
|
|
604
604
|
"../src/configs/app-configs/types.ts": {
|
|
605
|
-
"version": "
|
|
606
|
-
"signature": "
|
|
605
|
+
"version": "26d68b5ad7a9a6e47346984c915611d452f560764aaec153e014bc8f6588221c",
|
|
606
|
+
"signature": "d515261b42d96bab440c2b496fdbef1e4caf0fbdb16f32d3984d80fb37266d2d",
|
|
607
607
|
"affectsGlobalScope": false
|
|
608
608
|
},
|
|
609
609
|
"../src/configs/util/try-resolve.ts": {
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
"affectsGlobalScope": false
|
|
613
613
|
},
|
|
614
614
|
"../src/configs/app-configs/get-defaults.ts": {
|
|
615
|
-
"version": "
|
|
615
|
+
"version": "d3ac931c5bc4b57982ec4bf4505f63921b676fea862fa27f865d41afd01b4419",
|
|
616
616
|
"signature": "32ce4848d302065a0608781a400430ff0f4fb5757a501c614f3ab8aaad45afd0",
|
|
617
617
|
"affectsGlobalScope": false
|
|
618
618
|
},
|
|
@@ -692,8 +692,8 @@
|
|
|
692
692
|
"affectsGlobalScope": false
|
|
693
693
|
},
|
|
694
694
|
"../src/configs/app-configs/available-package-settings.ts": {
|
|
695
|
-
"version": "
|
|
696
|
-
"signature": "
|
|
695
|
+
"version": "d8870fed947c21ef7cd799f019e27b205e47d3d2eb6bbd1699a511abea07e156",
|
|
696
|
+
"signature": "670a083c7ad4c5ddc8f95b5c48f5e099d7fd11e3b4b7846b0a3b7078fba86813",
|
|
697
697
|
"affectsGlobalScope": false
|
|
698
698
|
},
|
|
699
699
|
"../src/configs/app-configs/update-with-env.ts": {
|
|
@@ -1247,7 +1247,7 @@
|
|
|
1247
1247
|
"affectsGlobalScope": false
|
|
1248
1248
|
},
|
|
1249
1249
|
"../src/commands/docker-build/index.ts": {
|
|
1250
|
-
"version": "
|
|
1250
|
+
"version": "1b5c4842fdd8a6f8c3da38afa0b4eab277f567bd0161cb5cc01f707fc2f7e2a3",
|
|
1251
1251
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
1252
1252
|
"affectsGlobalScope": false
|
|
1253
1253
|
},
|
package/package.json
CHANGED