@vitus-labs/tools-rollup 0.41.0 → 0.42.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/bin/run-build.js +1 -1
- package/{typings → global}/index.d.ts +0 -0
- package/lib/config/baseConfig.js +2 -0
- package/lib/config/baseConfig.js.map +1 -1
- package/lib/config/index.js +9 -5
- package/lib/config/index.js.map +1 -1
- package/lib/declarations/index.js +3 -0
- package/lib/declarations/index.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/rollup/config.js +130 -0
- package/lib/rollup/config.js.map +1 -0
- package/lib/rollup/createBuildPipeline.js +138 -0
- package/lib/rollup/createBuildPipeline.js.map +1 -0
- package/lib/rollup/index.js +11 -0
- package/lib/rollup/index.js.map +1 -0
- package/lib/scripts/build.js +119 -59
- package/lib/scripts/build.js.map +1 -1
- package/lib/types/config/baseConfig.d.ts +1 -0
- package/lib/types/config/index.d.ts +4 -3
- package/lib/types/declarations/index.d.ts +17 -0
- package/lib/types/{config/rollup.d.ts → rollup/config.d.ts} +9 -7
- package/lib/types/rollup/createBuildPipeline.d.ts +2 -0
- package/lib/types/rollup/index.d.ts +3 -0
- package/package.json +9 -5
- package/src/config/{baseConfig.js → baseConfig.ts} +2 -1
- package/src/config/index.ts +10 -0
- package/src/index.ts +3 -0
- package/src/{config/rollup.js → rollup/config.ts} +43 -48
- package/src/{scripts/utils.js → rollup/createBuildPipeline.ts} +21 -18
- package/src/rollup/index.ts +4 -0
- package/src/scripts/{build.js → build.ts} +21 -33
- package/tsconfig.json +25 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/lib/config/rollup.js +0 -129
- package/lib/config/rollup.js.map +0 -1
- package/lib/scripts/utils.js +0 -138
- package/lib/scripts/utils.js.map +0 -1
- package/lib/types/scripts/utils.d.ts +0 -2
- package/lib/types/utils.d.ts +0 -5
- package/lib/utils.js +0 -106
- package/lib/utils.js.map +0 -1
- package/src/config/index.js +0 -4
- package/src/index.js +0 -3
- package/src/utils.js +0 -129
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
declare global {
|
|
3
|
+
const __BROWSER__: true;
|
|
4
|
+
const __WEB__: true;
|
|
5
|
+
const __NATIVE__: true;
|
|
6
|
+
const __NODE__: true;
|
|
7
|
+
const __CLIENT__: true;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
__BROWSER__: true;
|
|
12
|
+
__WEB__: true;
|
|
13
|
+
__NATIVE__: true;
|
|
14
|
+
__NODE__: true;
|
|
15
|
+
__CLIENT__: true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
declare const rollupConfig: ({ file, format, env, types, platform }: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
env: any;
|
|
5
|
-
types: any;
|
|
6
|
-
platform: any;
|
|
7
|
-
}) => {
|
|
1
|
+
declare const rollupConfig: ({ file, format, env, types, platform, }: Record<string, any>) => {
|
|
2
|
+
makeAbsoluteExternalsRelative: boolean;
|
|
3
|
+
preserveEntrySignatures: string;
|
|
8
4
|
input: any;
|
|
9
5
|
output: {
|
|
10
6
|
file: any;
|
|
@@ -13,6 +9,12 @@ declare const rollupConfig: ({ file, format, env, types, platform }: {
|
|
|
13
9
|
sourcemap: boolean;
|
|
14
10
|
exports: string | undefined;
|
|
15
11
|
name: any;
|
|
12
|
+
esModule: boolean;
|
|
13
|
+
generatedCode: {
|
|
14
|
+
reservedNamesAsProps: boolean;
|
|
15
|
+
};
|
|
16
|
+
interop: string;
|
|
17
|
+
systemNullSetters: boolean;
|
|
16
18
|
};
|
|
17
19
|
external: any;
|
|
18
20
|
plugins: import("rollup").Plugin[];
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/tools-rollup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.com>",
|
|
6
6
|
"maintainers": [
|
|
7
7
|
"Vit Bokisch <vit@bokisch.com>"
|
|
8
8
|
],
|
|
9
|
-
"main": "
|
|
10
|
-
"types": "typings/index.d.ts",
|
|
9
|
+
"main": "lib/index.js",
|
|
10
|
+
"types": "lib/typings/index.d.ts",
|
|
11
11
|
"bin": {
|
|
12
12
|
"vl_build": "bin/run-build.js",
|
|
13
13
|
"vl_build-watch": "bin/run-watch.js"
|
|
@@ -15,16 +15,20 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">= 14"
|
|
17
17
|
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepublish": "yarn build",
|
|
20
|
+
"build": "tsc"
|
|
21
|
+
},
|
|
18
22
|
"publishConfig": {
|
|
19
23
|
"access": "public"
|
|
20
24
|
},
|
|
21
25
|
"dependencies": {
|
|
22
26
|
"@microsoft/api-extractor": "^7.33.7",
|
|
23
|
-
"@rollup/plugin-babel": "^6.0.3",
|
|
24
27
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
25
28
|
"@rollup/plugin-replace": "^5.0.2",
|
|
26
29
|
"@rollup/plugin-terser": "^0.3.0",
|
|
27
30
|
"@types/node": "^18.11.18",
|
|
31
|
+
"@vitus-labs/tools-core": "0.42.0",
|
|
28
32
|
"chalk": "^4.1.2",
|
|
29
33
|
"find-up": "^5.0.0",
|
|
30
34
|
"lodash.merge": "^4.6.2",
|
|
@@ -38,5 +42,5 @@
|
|
|
38
42
|
"tslib": "^2.4.1",
|
|
39
43
|
"ttypescript": "^1.5.15"
|
|
40
44
|
},
|
|
41
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e271a9b9bd8bb25150fdff84ac86b4f30fad55a9"
|
|
42
46
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { loadVLToolsConfig, PKG } from '@vitus-labs/tools-core'
|
|
2
|
+
import baseConfig from './baseConfig'
|
|
3
|
+
|
|
4
|
+
const CONFIG_KEY = 'rollup'
|
|
5
|
+
|
|
6
|
+
const CONFIG = loadVLToolsConfig(CONFIG_KEY).merge(baseConfig).config
|
|
7
|
+
|
|
8
|
+
const PLATFORMS = ['browser', 'node', 'web', 'native']
|
|
9
|
+
|
|
10
|
+
export { CONFIG, PKG, PLATFORMS }
|
package/src/index.ts
ADDED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const { PKG, loadConfig, swapGlobals } = require('../utils')
|
|
13
|
-
|
|
14
|
-
const CONFIG = loadConfig(baseConfig)
|
|
1
|
+
import { swapGlobals } from '@vitus-labs/tools-core'
|
|
2
|
+
import typescript from 'rollup-plugin-typescript2'
|
|
3
|
+
import ttypescript from 'ttypescript'
|
|
4
|
+
import pathsTransformer from 'ts-transform-paths'
|
|
5
|
+
import { apiExtractor } from 'rollup-plugin-api-extractor'
|
|
6
|
+
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
|
7
|
+
import filesize from 'rollup-plugin-filesize'
|
|
8
|
+
import { visualizer } from 'rollup-plugin-visualizer'
|
|
9
|
+
import replace from '@rollup/plugin-replace'
|
|
10
|
+
import terser from '@rollup/plugin-terser'
|
|
11
|
+
import { CONFIG, PKG, PLATFORMS } from '../config'
|
|
15
12
|
|
|
16
13
|
const defineExtensions = (platform) => {
|
|
17
|
-
const platformExtensions = []
|
|
14
|
+
const platformExtensions: string[] = []
|
|
18
15
|
|
|
19
|
-
if (
|
|
16
|
+
if (PLATFORMS.includes(platform)) {
|
|
20
17
|
CONFIG.extensions.forEach((item) => {
|
|
21
18
|
platformExtensions.push(`.${platform}${item}`)
|
|
22
19
|
})
|
|
@@ -27,38 +24,30 @@ const defineExtensions = (platform) => {
|
|
|
27
24
|
|
|
28
25
|
const loadPlugins = ({ env, platform, types, file }) => {
|
|
29
26
|
const extensions = defineExtensions(platform)
|
|
27
|
+
const plugins = [nodeResolve({ extensions, browser: platform === 'browser' })]
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// babelHelpers: 'bundled',
|
|
36
|
-
// }
|
|
37
|
-
|
|
38
|
-
const tsConfig = {
|
|
39
|
-
typescript: ttypescript,
|
|
40
|
-
transformers: [(service) => pathsTransformer(service)],
|
|
41
|
-
exclude: CONFIG.exclude,
|
|
42
|
-
useTsconfigDeclarationDir: true,
|
|
43
|
-
clean: true,
|
|
44
|
-
tsconfigDefaults: {
|
|
29
|
+
if (CONFIG.typescript) {
|
|
30
|
+
const tsConfig: Record<string, any> = {
|
|
31
|
+
typescript: ttypescript,
|
|
32
|
+
transformers: [(service) => pathsTransformer(service)],
|
|
45
33
|
exclude: CONFIG.exclude,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
useTsconfigDeclarationDir: true,
|
|
35
|
+
clean: true,
|
|
36
|
+
tsconfigDefaults: {
|
|
37
|
+
exclude: CONFIG.exclude,
|
|
38
|
+
include: CONFIG.include,
|
|
39
|
+
compilerOptions: {
|
|
40
|
+
types: ['@vitus-labs/tools-rollup'],
|
|
41
|
+
},
|
|
49
42
|
},
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (types) {
|
|
54
|
-
tsConfig.tsconfigDefaults.compilerOptions.declarationMap = types
|
|
55
|
-
tsConfig.tsconfigDefaults.compilerOptions.declaration = types
|
|
56
|
-
tsConfig.tsconfigDefaults.compilerOptions.declarationDir = CONFIG.typesDir
|
|
57
|
-
}
|
|
43
|
+
}
|
|
58
44
|
|
|
59
|
-
|
|
45
|
+
if (types) {
|
|
46
|
+
tsConfig.tsconfigDefaults.compilerOptions.declarationMap = types
|
|
47
|
+
tsConfig.tsconfigDefaults.compilerOptions.declaration = types
|
|
48
|
+
tsConfig.tsconfigDefaults.compilerOptions.declarationDir = CONFIG.typesDir
|
|
49
|
+
}
|
|
60
50
|
|
|
61
|
-
if (CONFIG.typescript) {
|
|
62
51
|
plugins.push(typescript(tsConfig))
|
|
63
52
|
|
|
64
53
|
if (types) {
|
|
@@ -66,10 +55,11 @@ const loadPlugins = ({ env, platform, types, file }) => {
|
|
|
66
55
|
apiExtractor({
|
|
67
56
|
cleanUpRollup: true,
|
|
68
57
|
configuration: {
|
|
69
|
-
mainEntryPointFilePath:
|
|
58
|
+
mainEntryPointFilePath: `<projectFolder>/${CONFIG.typesDir}/index.d.ts`,
|
|
70
59
|
projectFolder: process.cwd(),
|
|
71
60
|
compiler: {
|
|
72
61
|
tsconfigFilePath: '<projectFolder>/tsconfig.json',
|
|
62
|
+
skipLibCheck: true,
|
|
73
63
|
},
|
|
74
64
|
dtsRollup: {
|
|
75
65
|
enabled: true,
|
|
@@ -100,9 +90,8 @@ const loadPlugins = ({ env, platform, types, file }) => {
|
|
|
100
90
|
plugins.push(replace({ preventAssignment: true, values: replaceOptions }))
|
|
101
91
|
}
|
|
102
92
|
|
|
103
|
-
// plugins.push(babel(babelConfig))
|
|
104
|
-
|
|
105
93
|
// generate visualised graphs in dist folder
|
|
94
|
+
|
|
106
95
|
if (CONFIG.visualise) {
|
|
107
96
|
const filePath = file.split('/')
|
|
108
97
|
const fileName = filePath.pop()
|
|
@@ -130,7 +119,13 @@ const loadPlugins = ({ env, platform, types, file }) => {
|
|
|
130
119
|
return plugins
|
|
131
120
|
}
|
|
132
121
|
|
|
133
|
-
const rollupConfig = ({
|
|
122
|
+
const rollupConfig = ({
|
|
123
|
+
file,
|
|
124
|
+
format,
|
|
125
|
+
env,
|
|
126
|
+
types,
|
|
127
|
+
platform,
|
|
128
|
+
}: Record<string, any>) => {
|
|
134
129
|
const plugins = loadPlugins({ file, env, types, platform })
|
|
135
130
|
|
|
136
131
|
const buildOutput = {
|
|
@@ -158,4 +153,4 @@ const rollupConfig = ({ file, format, env, types, platform }) => {
|
|
|
158
153
|
return buildOutput
|
|
159
154
|
}
|
|
160
155
|
|
|
161
|
-
|
|
156
|
+
export default rollupConfig
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { PKG, CONFIG } from '../config'
|
|
2
2
|
|
|
3
|
+
const isESMModule = PKG.type === 'module'
|
|
4
|
+
const { esModulesOnly } = CONFIG
|
|
3
5
|
const shouldBuildNative = PKG['react-native'] !== PKG.module
|
|
4
6
|
const shouldGenerateTypes = !!(PKG.types || PKG.typings)
|
|
5
7
|
|
|
6
8
|
const hasDifferentBrowserBuild = (type) => {
|
|
7
9
|
if (!PKG.browser) return false
|
|
8
10
|
|
|
9
|
-
return Object.entries(PKG.browser).some(([key, value]) => {
|
|
11
|
+
return Object.entries(PKG.browser).some(([key, value]: [string, string]) => {
|
|
10
12
|
const source = key.substring(2)
|
|
11
13
|
const output = value.substring(2)
|
|
12
14
|
|
|
@@ -16,7 +18,7 @@ const hasDifferentBrowserBuild = (type) => {
|
|
|
16
18
|
|
|
17
19
|
const BASE_VARIANTS = {
|
|
18
20
|
main: {
|
|
19
|
-
format: 'cjs',
|
|
21
|
+
format: esModulesOnly ? 'es' : 'cjs',
|
|
20
22
|
env: 'development',
|
|
21
23
|
platform: 'universal',
|
|
22
24
|
},
|
|
@@ -35,40 +37,40 @@ const BASE_VARIANTS = {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const getExportsOptions = () => {
|
|
38
|
-
const exportsOptions = PKG
|
|
40
|
+
const exportsOptions = PKG.exports
|
|
39
41
|
|
|
40
42
|
if (!exportsOptions) return []
|
|
41
43
|
|
|
42
44
|
if (typeof exportsOptions === 'string') {
|
|
43
45
|
return [
|
|
44
46
|
{
|
|
45
|
-
file: PKG
|
|
46
|
-
...BASE_VARIANTS
|
|
47
|
+
file: PKG.exports,
|
|
48
|
+
...BASE_VARIANTS.module,
|
|
47
49
|
},
|
|
48
50
|
]
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
if (typeof exportsOptions === 'object') {
|
|
52
|
-
const result = []
|
|
54
|
+
const result: Record<string, any>[] = []
|
|
53
55
|
|
|
54
56
|
if (exportsOptions.import) {
|
|
55
57
|
result.push({
|
|
56
58
|
file: exportsOptions.import,
|
|
57
|
-
...BASE_VARIANTS
|
|
59
|
+
...BASE_VARIANTS.module,
|
|
58
60
|
})
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
if (exportsOptions.require) {
|
|
62
64
|
result.push({
|
|
63
65
|
file: exportsOptions.require,
|
|
64
|
-
...BASE_VARIANTS
|
|
66
|
+
...BASE_VARIANTS.main,
|
|
65
67
|
})
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
if (exportsOptions.node) {
|
|
69
71
|
result.push({
|
|
70
72
|
file: exportsOptions.node,
|
|
71
|
-
...BASE_VARIANTS
|
|
73
|
+
...BASE_VARIANTS.module,
|
|
72
74
|
platform: 'node',
|
|
73
75
|
})
|
|
74
76
|
}
|
|
@@ -76,7 +78,7 @@ const getExportsOptions = () => {
|
|
|
76
78
|
if (exportsOptions.default) {
|
|
77
79
|
result.push({
|
|
78
80
|
file: exportsOptions.default,
|
|
79
|
-
...BASE_VARIANTS
|
|
81
|
+
...BASE_VARIANTS.module,
|
|
80
82
|
})
|
|
81
83
|
}
|
|
82
84
|
|
|
@@ -87,10 +89,9 @@ const getExportsOptions = () => {
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
const createBasicBuildVariants = () => {
|
|
90
|
-
|
|
91
|
-
let result = []
|
|
92
|
+
let result: Record<string, any>[] = []
|
|
92
93
|
|
|
93
|
-
if (
|
|
94
|
+
if (isESMModule) result = [...getExportsOptions()]
|
|
94
95
|
|
|
95
96
|
Object.keys(BASE_VARIANTS).forEach((key) => {
|
|
96
97
|
const PKGOutDir = PKG[key]
|
|
@@ -108,7 +109,9 @@ const createBasicBuildVariants = () => {
|
|
|
108
109
|
if (shouldBuildNative) {
|
|
109
110
|
add()
|
|
110
111
|
}
|
|
111
|
-
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (hasBrowserBuild) {
|
|
112
115
|
// if has a different browser build, set default platform to node
|
|
113
116
|
// as there is going to be created a separate browser build as well
|
|
114
117
|
add({ platform: 'node' })
|
|
@@ -122,10 +125,10 @@ const createBasicBuildVariants = () => {
|
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
const createBrowserBuildVariants = () => {
|
|
125
|
-
const result = []
|
|
128
|
+
const result: Record<string, any>[] = []
|
|
126
129
|
if (!PKG.browser) return result
|
|
127
130
|
|
|
128
|
-
Object.entries(PKG.browser).forEach(([key, value]) => {
|
|
131
|
+
Object.entries(PKG.browser).forEach(([key, value]: [string, string]) => {
|
|
129
132
|
const source = key.substring(2) // strip './' from the beginning of path
|
|
130
133
|
const output = value.substring(2) // strip './' from the beginning of path
|
|
131
134
|
|
|
@@ -155,4 +158,4 @@ const createBuildPipeline = () => {
|
|
|
155
158
|
return result
|
|
156
159
|
}
|
|
157
160
|
|
|
158
|
-
|
|
161
|
+
export default createBuildPipeline
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const createBuildPipeline = require('./utils')
|
|
2
|
+
import chalk from 'chalk'
|
|
3
|
+
import rimraf from 'rimraf'
|
|
4
|
+
import rollup from 'rollup'
|
|
5
|
+
import { CONFIG } from '../config'
|
|
6
|
+
import { config as rollupConfig, createBuildPipeline } from '../rollup'
|
|
8
7
|
|
|
9
8
|
const { log } = console
|
|
10
|
-
const CONFIG = loadConfig(baseConfig)
|
|
11
9
|
const allBuilds = createBuildPipeline()
|
|
12
|
-
// const allBuilds = allBuildOptions.map((item) => rollupConfig(item)).flat()
|
|
13
10
|
const allBuildsCount = allBuilds.length
|
|
14
11
|
|
|
12
|
+
const MODULE_TYPES = {
|
|
13
|
+
cjs: 'CommonJS',
|
|
14
|
+
es: 'ES Module',
|
|
15
|
+
umd: 'UMD module',
|
|
16
|
+
}
|
|
17
|
+
|
|
15
18
|
// --------------------------------------------------------
|
|
16
19
|
// BUILD rollup
|
|
17
20
|
// --------------------------------------------------------
|
|
@@ -29,32 +32,17 @@ const createBuilds = async () => {
|
|
|
29
32
|
|
|
30
33
|
// serialize builds
|
|
31
34
|
allBuilds.forEach((item, i) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
// it might be an array for such a cases like typescript optimization file
|
|
35
|
-
// which we want to do in one iteration only
|
|
36
|
-
if (Array.isArray(buildOptions)) {
|
|
37
|
-
const [buildConfig, typescriptConfig] = buildOptions
|
|
38
|
-
|
|
39
|
-
const { output, ...input } = buildConfig
|
|
40
|
-
const { output: tsOutput, ...tsInput } = typescriptConfig
|
|
35
|
+
const { output, ...input } = rollupConfig(item)
|
|
36
|
+
const type = output.format
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
p = p.then(() =>
|
|
48
|
-
build({ inputOptions: tsInput, outputOptions: tsOutput })
|
|
38
|
+
p = p.then(() => {
|
|
39
|
+
log(
|
|
40
|
+
chalk.green(`🚧 Creating a build ${i + 1}/${allBuildsCount}`),
|
|
41
|
+
chalk.gray(`(format: ${MODULE_TYPES[type]})`)
|
|
49
42
|
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
p = p.then(() => {
|
|
54
|
-
log(chalk.green(`🚧 Creating a build ${i + 1}/${allBuildsCount}`))
|
|
55
|
-
return build({ inputOptions: input, outputOptions: output })
|
|
56
|
-
})
|
|
57
|
-
}
|
|
43
|
+
|
|
44
|
+
return build({ inputOptions: input, outputOptions: output })
|
|
45
|
+
})
|
|
58
46
|
})
|
|
59
47
|
|
|
60
48
|
p.catch((e) => {
|
|
@@ -103,4 +91,4 @@ const runBuild = async () => {
|
|
|
103
91
|
})
|
|
104
92
|
}
|
|
105
93
|
|
|
106
|
-
|
|
94
|
+
export default runBuild
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vitus-labs/tools-typescript/lib",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "es5",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"outDir": "lib",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"baseUrl": ".",
|
|
9
|
+
"declarationDir": "./lib/types",
|
|
10
|
+
"paths": {
|
|
11
|
+
"~/*": [
|
|
12
|
+
"src/*"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
"include": [
|
|
17
|
+
"typings",
|
|
18
|
+
"src",
|
|
19
|
+
],
|
|
20
|
+
"exclude": [
|
|
21
|
+
"node_modules",
|
|
22
|
+
"__stories__",
|
|
23
|
+
"lib"
|
|
24
|
+
]
|
|
25
|
+
}
|