@gravity-ui/app-builder 0.28.1-beta.2 → 0.28.1-beta.6
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/README.md
CHANGED
|
@@ -81,7 +81,6 @@ export default defineConfig(
|
|
|
81
81
|
},
|
|
82
82
|
server: {
|
|
83
83
|
// server settings
|
|
84
|
-
tsconfigFileName: 'custom-tsconfig.json',
|
|
85
84
|
},
|
|
86
85
|
};
|
|
87
86
|
},
|
|
@@ -144,8 +143,6 @@ All server settings are used only in dev mode:
|
|
|
144
143
|
- `watchThrottle` (`number`) — use to add an extra throttle, or delay restarting.
|
|
145
144
|
- `inspect/inspectBrk` (`number | true`) — listen for a debugging client on specified port.
|
|
146
145
|
If specified `true`, try to listen on `9229`.
|
|
147
|
-
- `tsconfig` (`string`) — name of the tsconfig file for server build.
|
|
148
|
-
Default: `tsconfig.json`.
|
|
149
146
|
|
|
150
147
|
### Client
|
|
151
148
|
|
|
@@ -11,7 +11,6 @@ const utils_1 = require("../../../common/utils");
|
|
|
11
11
|
function buildServer(config) {
|
|
12
12
|
(0, utils_1.createRunFolder)();
|
|
13
13
|
return new Promise((resolve, reject) => {
|
|
14
|
-
const tsconfigFileName = config.server.tsconfigFileName || 'tsconfig.json';
|
|
15
14
|
const build = new controllable_script_1.ControllableScript(`
|
|
16
15
|
let ts;
|
|
17
16
|
try {
|
|
@@ -26,11 +25,7 @@ function buildServer(config) {
|
|
|
26
25
|
const {compile} = require(${JSON.stringify(require.resolve('../../../common/typescript/compile'))});
|
|
27
26
|
|
|
28
27
|
const logger = new Logger('server', ${config.verbose});
|
|
29
|
-
compile(ts, {
|
|
30
|
-
logger,
|
|
31
|
-
projectPath: ${JSON.stringify(paths_1.default.appServer)},
|
|
32
|
-
configFileName: ${JSON.stringify(tsconfigFileName)}
|
|
33
|
-
});
|
|
28
|
+
compile(ts, {logger, projectPath: ${JSON.stringify(paths_1.default.appServer)}});
|
|
34
29
|
`, null);
|
|
35
30
|
build.start().then(() => {
|
|
36
31
|
build.onExit((code) => {
|
|
@@ -36,7 +36,6 @@ async function watchServerCompilation(config) {
|
|
|
36
36
|
const serverPath = path.resolve(paths_1.default.appDist, 'server');
|
|
37
37
|
rimraf_1.rimraf.sync(serverPath);
|
|
38
38
|
(0, utils_1.createRunFolder)();
|
|
39
|
-
const tsconfigFileName = config.server.tsconfigFileName || 'tsconfig.json';
|
|
40
39
|
const build = new controllable_script_1.ControllableScript(`
|
|
41
40
|
let ts;
|
|
42
41
|
try {
|
|
@@ -59,8 +58,7 @@ async function watchServerCompilation(config) {
|
|
|
59
58
|
onAfterFilesEmitted: () => {
|
|
60
59
|
process.send({type: 'Emitted'});
|
|
61
60
|
},
|
|
62
|
-
enableSourceMap: true
|
|
63
|
-
tsconfigFileName: ${JSON.stringify(tsconfigFileName)}
|
|
61
|
+
enableSourceMap: true
|
|
64
62
|
}
|
|
65
63
|
);
|
|
66
64
|
`, null);
|
|
@@ -266,11 +266,6 @@ export interface ServerConfig {
|
|
|
266
266
|
watchThrottle?: number;
|
|
267
267
|
inspect?: number | true;
|
|
268
268
|
inspectBrk?: number | true;
|
|
269
|
-
/**
|
|
270
|
-
* Name of the tsconfig file for server build
|
|
271
|
-
* Default: 'tsconfig.json'
|
|
272
|
-
*/
|
|
273
|
-
tsconfigFileName?: string;
|
|
274
269
|
}
|
|
275
270
|
export interface ServiceConfig {
|
|
276
271
|
target?: 'client' | 'server';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type Typescript from 'typescript';
|
|
2
2
|
import type { Logger } from '../logger';
|
|
3
|
-
export declare function watch(ts: typeof Typescript, projectPath: string, { logger, onAfterFilesEmitted, enableSourceMap,
|
|
3
|
+
export declare function watch(ts: typeof Typescript, projectPath: string, { logger, onAfterFilesEmitted, enableSourceMap, }: {
|
|
4
4
|
logger: Logger;
|
|
5
5
|
onAfterFilesEmitted?: () => void;
|
|
6
6
|
enableSourceMap?: boolean;
|
|
7
|
-
tsconfigFileName: string;
|
|
8
7
|
}): void;
|
|
@@ -4,10 +4,10 @@ exports.watch = watch;
|
|
|
4
4
|
const transformers_1 = require("./transformers");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
6
|
const diagnostic_1 = require("./diagnostic");
|
|
7
|
-
function watch(ts, projectPath, { logger, onAfterFilesEmitted, enableSourceMap,
|
|
7
|
+
function watch(ts, projectPath, { logger, onAfterFilesEmitted, enableSourceMap, }) {
|
|
8
8
|
logger.message('Start compilation in watch mode');
|
|
9
9
|
logger.message(`Typescript v${ts.version}`);
|
|
10
|
-
const configPath = (0, utils_1.getTsProjectConfigPath)(ts, projectPath
|
|
10
|
+
const configPath = (0, utils_1.getTsProjectConfigPath)(ts, projectPath);
|
|
11
11
|
const createProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram;
|
|
12
12
|
const host = ts.createWatchCompilerHost(configPath, {
|
|
13
13
|
noEmit: false,
|
package/package.json
CHANGED