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

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jansiegel committed Oct 10, 2018
2 parents cc1f7ca + e9a77e1 commit fef46af
Show file tree
Hide file tree
Showing 19 changed files with 1,672 additions and 1,902 deletions.
30 changes: 21 additions & 9 deletions .config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,37 @@ import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import typescript from 'rollup-plugin-typescript2';
import json from 'rollup-plugin-json';

const envHotType = process.env.HOT_TYPE;

export const plugins = {
replace: replace({
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable'
}),
typescript: typescript(),
babel: babel({
exclude: ['node_modules/**', '**.json'],
}),
nodeResolve: nodeResolve(),
json: json({
include: 'package.json',
compact: true
})
};

export const baseConfig = {
input: 'src/common/index.tsx',
plugins: [
replace({
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable',
}),
typescript(),
babel({
exclude: 'node_modules/**',
}),
nodeResolve(),
plugins.json,
plugins.replace,
plugins.typescript,
plugins.babel,
plugins.nodeResolve,
],
external: [
'react',
'react-dom',
(envHotType === 'ce' ? 'handsontable' : 'handsontable-pro')
],
};

15 changes: 5 additions & 10 deletions .config/es.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import typescript from 'rollup-plugin-typescript2';
import { plugins } from './base';

const env = process.env.NODE_ENV;
const envHotType = process.env.HOT_TYPE;
Expand All @@ -14,19 +12,16 @@ export const esConfig = {
file: `./es/${envHotType}/${filename}`
},
plugins: [
replace({
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable',
}),
plugins.json,
plugins.replace,
typescript({
tsconfigOverride: {
compilerOptions: {
declaration: true
}
}
}),
babel({
exclude: 'node_modules/**',
}),
nodeResolve(),
plugins.babel,
plugins.nodeResolve,
],
};
14 changes: 7 additions & 7 deletions .config/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export function createConfig() {
};
const newConfig = newConfigs[env];

for ( let key in newConfig ) {
for (let key in newConfig) {
if (newConfig.hasOwnProperty(key)) {
if (Array.isArray(config[key]) && Array.isArray(newConfig[key])) {
if (Array.isArray(config[key]) && Array.isArray(newConfig[key])) {
config[key] = newConfig[key];

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

} else {
config[key] = newConfig[key];
}
} else {
config[key] = newConfig[key];
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion .config/minified.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ const minConfig = {

addLicenseBanner(minConfig);

export {minConfig};
export { minConfig };
13 changes: 0 additions & 13 deletions .release.json

This file was deleted.

Loading

0 comments on commit fef46af

Please sign in to comment.