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/3.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jansiegel committed Oct 28, 2019
2 parents 1501b70 + a8b43fd commit 78848f8
Show file tree
Hide file tree
Showing 28 changed files with 4,328 additions and 7,912 deletions.
10 changes: 9 additions & 1 deletion .config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import typescript from 'rollup-plugin-typescript2';
import json from 'rollup-plugin-json';
import commonjs from 'rollup-plugin-commonjs';

export const plugins = {
typescript: typescript(),
babel: babel({
babelrc: false,
exclude: ['node_modules/**', '**.json'],
exclude: ['/node_modules/', '**.json'],
extensions: ['.js', '.ts', '.tsx', '.jsx'],
presets: [
'@babel/env'
Expand All @@ -17,6 +18,12 @@ export const plugins = {
json: json({
include: 'package.json',
compact: true
}),
commonjs: commonjs({
include: [
'node_modules/**',
'src/lib/**'
]
})
};

Expand All @@ -25,6 +32,7 @@ export const baseConfig = {
plugins: [
plugins.json,
plugins.replace,
plugins.commonjs,
plugins.typescript,
plugins.babel,
plugins.nodeResolve,
Expand Down
9 changes: 5 additions & 4 deletions .config/commonjs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { baseConfig } from './base';
import commonjs from 'rollup-plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
import { baseConfig, plugins } from './base';

const env = process.env.NODE_ENV;
const filename = 'react-handsontable.js';
Expand All @@ -8,7 +8,8 @@ export const cjsConfig = {
output: {
format: env,
indent: false,
file: `./commonjs/${filename}`
file: `./commonjs/${filename}`,
exports: 'named'
},
plugins: baseConfig.plugins.concat([commonjs()])
plugins: baseConfig.plugins,
};
6 changes: 4 additions & 2 deletions .config/es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import typescript from 'rollup-plugin-typescript2';
import { baseConfig } from './base';
import { plugins } from './base';

const env = process.env.NODE_ENV;
Expand All @@ -13,15 +14,16 @@ export const esConfig = {
plugins: [
plugins.json,
plugins.replace,
plugins.commonjs,
typescript({
tsconfigOverride: {
compilerOptions: {
declaration: true
}
},
useTsconfigDeclarationDir: true
useTsconfigDeclarationDir: true,
}),
plugins.babel,
plugins.nodeResolve,
],
]
};
9 changes: 7 additions & 2 deletions .config/minified.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ const minConfig = {
name: 'Handsontable.react',
indent: false,
sourcemap: true,
file: `./dist/${minFilename}`
exports: 'named',
file: `./dist/${minFilename}`,
globals: {
react: 'React',
'react-dom': 'ReactDOM',
handsontable: 'Handsontable'
}
},
plugins: baseConfig.plugins.concat([
uglify({
Expand All @@ -21,7 +27,6 @@ const minConfig = {
pure_getters: true,
unsafe: true,
unsafe_comps: true,
warnings: false
}
})
])
Expand Down
12 changes: 10 additions & 2 deletions .config/umd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { addLicenseBanner } from './helpers/licenseBanner';
import { baseConfig } from './base';

const env = process.env.NODE_ENV;
const filename = 'react-handsontable.js';
Expand All @@ -9,8 +10,15 @@ const umdConfig = {
name: 'Handsontable.react',
indent: false,
sourcemap: true,
file: `./dist/${filename}`
}
exports: 'named',
file: `./dist/${filename}`,
globals: {
react: 'React',
'react-dom': 'ReactDOM',
handsontable: 'Handsontable'
}
},
plugins: baseConfig.plugins
};

addLicenseBanner(umdConfig);
Expand Down
Loading

0 comments on commit 78848f8

Please sign in to comment.