Skip to content
This repository was archived by the owner on Mar 14, 2022. It is now read-only.

Commit fef46af

Browse files
committed
Merge branch 'release/2.0.0'
2 parents cc1f7ca + e9a77e1 commit fef46af

19 files changed

Lines changed: 1672 additions & 1902 deletions

.config/base.js

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,37 @@ import nodeResolve from 'rollup-plugin-node-resolve';
22
import babel from 'rollup-plugin-babel';
33
import replace from 'rollup-plugin-replace';
44
import typescript from 'rollup-plugin-typescript2';
5+
import json from 'rollup-plugin-json';
56

67
const envHotType = process.env.HOT_TYPE;
78

9+
export const plugins = {
10+
replace: replace({
11+
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable'
12+
}),
13+
typescript: typescript(),
14+
babel: babel({
15+
exclude: ['node_modules/**', '**.json'],
16+
}),
17+
nodeResolve: nodeResolve(),
18+
json: json({
19+
include: 'package.json',
20+
compact: true
21+
})
22+
};
23+
824
export const baseConfig = {
925
input: 'src/common/index.tsx',
1026
plugins: [
11-
replace({
12-
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable',
13-
}),
14-
typescript(),
15-
babel({
16-
exclude: 'node_modules/**',
17-
}),
18-
nodeResolve(),
27+
plugins.json,
28+
plugins.replace,
29+
plugins.typescript,
30+
plugins.babel,
31+
plugins.nodeResolve,
1932
],
2033
external: [
2134
'react',
2235
'react-dom',
2336
(envHotType === 'ce' ? 'handsontable' : 'handsontable-pro')
2437
],
2538
};
26-

.config/es.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import nodeResolve from 'rollup-plugin-node-resolve';
2-
import babel from 'rollup-plugin-babel';
3-
import replace from 'rollup-plugin-replace';
41
import typescript from 'rollup-plugin-typescript2';
2+
import { plugins } from './base';
53

64
const env = process.env.NODE_ENV;
75
const envHotType = process.env.HOT_TYPE;
@@ -14,19 +12,16 @@ export const esConfig = {
1412
file: `./es/${envHotType}/${filename}`
1513
},
1614
plugins: [
17-
replace({
18-
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable',
19-
}),
15+
plugins.json,
16+
plugins.replace,
2017
typescript({
2118
tsconfigOverride: {
2219
compilerOptions: {
2320
declaration: true
2421
}
2522
}
2623
}),
27-
babel({
28-
exclude: 'node_modules/**',
29-
}),
30-
nodeResolve(),
24+
plugins.babel,
25+
plugins.nodeResolve,
3126
],
3227
};

.config/factory.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ export function createConfig() {
1515
};
1616
const newConfig = newConfigs[env];
1717

18-
for ( let key in newConfig ) {
18+
for (let key in newConfig) {
1919
if (newConfig.hasOwnProperty(key)) {
20-
if (Array.isArray(config[key]) && Array.isArray(newConfig[key])) {
20+
if (Array.isArray(config[key]) && Array.isArray(newConfig[key])) {
2121
config[key] = newConfig[key];
2222

23-
} else if (typeof config[key] === 'object' && typeof newConfig[key] === 'object') {
24-
Object.assign(config[key], newConfig[key]);
23+
} else if (typeof config[key] === 'object' && typeof newConfig[key] === 'object') {
24+
Object.assign(config[key], newConfig[key]);
2525

26-
} else {
27-
config[key] = newConfig[key];
28-
}
26+
} else {
27+
config[key] = newConfig[key];
28+
}
2929
}
3030
}
3131

.config/minified.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ const minConfig = {
3131

3232
addLicenseBanner(minConfig);
3333

34-
export {minConfig};
34+
export { minConfig };

.release.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)