Skip to content
This repository has been archived by the owner on Nov 24, 2021. 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 Dec 3, 2018
2 parents 490b399 + 50dfd52 commit d467d6e
Show file tree
Hide file tree
Showing 21 changed files with 1,957 additions and 697 deletions.
48 changes: 31 additions & 17 deletions .config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,43 @@ import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import VuePlugin from 'rollup-plugin-vue';
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',
'process.env.NODE_ENV': JSON.stringify('production')
}),
VuePlugin: VuePlugin({
defaultLang: {
script: 'ts'
},
template: {
isProduction: true
}
}),
typescript: typescript(),
babel: babel({
exclude: 'node_modules/**',
}),
nodeResolve: nodeResolve(),
json: json({
include: 'package.json',
compact: true
})
};

export const baseConfig = {
input: 'src/common/index.ts',
plugins: [
replace({
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable',
'process.env.NODE_ENV': JSON.stringify('production')
}),
VuePlugin({
defaultLang: {
script: 'ts'
},
template: {
isProduction: true
}
}),
typescript(),
babel({
exclude: 'node_modules/**',
}),
nodeResolve()
plugins.json,
plugins.replace,
plugins.VuePlugin,
plugins.typescript,
plugins.babel,
plugins.nodeResolve
],
external: [
(envHotType === 'ce' ? 'handsontable' : 'handsontable-pro'),
Expand Down
19 changes: 6 additions & 13 deletions .config/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import replace from 'rollup-plugin-replace';
import VuePlugin from 'rollup-plugin-vue';
import typescript from 'rollup-plugin-typescript2';
import commonjs from 'rollup-plugin-commonjs';
import { plugins } from './base';

const env = process.env.NODE_ENV;
const envHotType = process.env.HOT_TYPE;
Expand All @@ -16,17 +17,9 @@ export const esConfig = {
exports: 'named'
},
plugins: [
replace({
'hot-alias': envHotType === 'pro' ? 'handsontable-pro' : 'handsontable',
}),
VuePlugin({
defaultLang: {
script: 'ts'
},
template: {
isProduction: true
}
}),
plugins.json,
plugins.replace,
plugins.VuePlugin,
commonjs({
include: [
'node_modules/**'
Expand All @@ -39,6 +32,6 @@ export const esConfig = {
}
}
}),
nodeResolve(),
],
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 @@ -38,4 +38,4 @@ const minConfig = {

addLicenseBanner(minConfig);

export {minConfig};
export { minConfig };
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(The MIT License)

Copyright (c) 2012-2014 Marcin Warpechowski
Copyright (c) 2015 Handsoncode sp. z o.o. <[email protected]>
Copyright (c) Handsoncode sp. z o.o. <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
30 changes: 5 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ Assuming that you have installed the wrapper with npm, now you just need to incl
**Vue Component**
```vue
<template>
<div id="hot-preview">
<HotTable :settings="settings"></HotTable>
</div>
<hot-table :settings="settings"></hot-table>
</template>
<script>
import { HotTable } from '@handsontable/vue';
import Vue from 'vue';
export default {
data: function() {
Expand All @@ -74,28 +71,18 @@ Assuming that you have installed the wrapper with npm, now you just need to incl
</script>
<style src="../node_modules/handsontable/dist/handsontable.full.css"></style>
<style>
#test-hot {
width: 600px;
height: 400px;
overflow: hidden;
}
</style>
```

### Handsontable Pro:

**Vue Component**
```vue
<template>
<div id="hot-preview">
<HotTable :settings="settings"></HotTable>
</div>
<hot-table :settings="settings"></hot-table>
</template>
<script>
import { HotTable } from '@handsontable-pro/vue';
import Vue from 'vue';
export default {
data: function() {
Expand All @@ -119,19 +106,12 @@ Assuming that you have installed the wrapper with npm, now you just need to incl
</script>
<style src="../node_modules/handsontable-pro/dist/handsontable.full.css"></style>
<style>
#test-hot {
width: 600px;
height: 400px;
overflow: hidden;
}
</style>
```

<br/>

## Documentation
Visit [docs.handsontable.com](//docs.handsontable.com/vue) to get more Handsontable for Vue examples and guides.
Visit [handsontable.com/docs](//handsontable.com/docs/vue) to get more Handsontable for Vue examples and guides.

<br/>

Expand Down Expand Up @@ -177,8 +157,8 @@ Some of the most popular features include:
<br/>

## Resources
- [Guides](//docs.handsontable.com/vue)
- [API Reference](//docs.handsontable.com/Core.html)
- [Guides](//handsontable.com/docs/vue)
- [API Reference](//handsontable.com/docs/Core.html)
- [Release notes](//github.com/handsontable/vue-handsontable-official/releases)
- [Roadmap](//trello.com/b/PztR4hpj)
- [Twitter](//twitter.com/handsontable)
Expand Down
Loading

0 comments on commit d467d6e

Please sign in to comment.