-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.ts
41 lines (38 loc) · 1.1 KB
/
build.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { resolve } from 'path';
import { buildTypescriptLib } from '@alqmc/build-ts';
import type { DefineLibConfig } from '@alqmc/build-ts';
import { enterPath, outputPath, rootPath } from './utils/path';
const buildGacmConfig: DefineLibConfig = {
baseOptions: {
input: resolve(enterPath, 'gacm.ts'),
outPutPath: outputPath,
enterPath,
pkgPath: resolve(enterPath, 'package.json'),
tsConfigPath: resolve(rootPath, 'tsconfig.json'),
preserveModules: false,
extraOptions: {
banner: '#!/usr/bin/env node'
}
},
buildProduct: ['lib'],
pureOutput: true
};
const buildGnrmConfig: DefineLibConfig = {
baseOptions: {
input: resolve(enterPath, 'gnrm.ts'),
outPutPath: outputPath,
enterPath,
pkgPath: resolve(enterPath, 'package.json'),
tsConfigPath: resolve(rootPath, 'tsconfig.json'),
preserveModules: false,
extraOptions: {
banner: '#!/usr/bin/env node'
}
},
buildProduct: ['lib'],
pureOutput: true
};
export const buildBundle = async () => {
await buildTypescriptLib(buildGacmConfig);
await buildTypescriptLib(buildGnrmConfig);
};