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/2.0.0-beta1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jansiegel committed Mar 30, 2018
2 parents 8b7ec89 + 1420ce0 commit 40abf2c
Show file tree
Hide file tree
Showing 50 changed files with 10,527 additions and 173,933 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": [
["es2015"]
["env"]
]
}
50 changes: 50 additions & 0 deletions .config/base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'use strict';

const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const packageBody = require('./../package.json');
const fs = require('fs');
const webpack = require('webpack');

let licenseBody = fs.readFileSync(path.resolve(__dirname, '../LICENSE'), 'utf8');
licenseBody += '\nVersion: ' + packageBody.version + ' (built at ' + new Date().toString() + ')';

module.exports.create = function create(hotType) {
return {
devtool: 'source-map',
output: {
path: path.resolve(__dirname, './../dist/' + hotType + '/'),
filename: '[name].js',
library: 'HotTable',
libraryTarget: 'umd',
libraryExport: 'default'
},
module: {
loaders: [
{
test: /(\.js)$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['env'],
}
},
{
test: /(\.vue)$/,
exclude: /(node_modules|bower_components)/,
loader: 'vue-loader',
query: {
presets: ['vue-style-loader'],

}
}
]
},
plugins: [
new UglifyJsPlugin({
include: /\.min\.js$/
}),
new webpack.BannerPlugin(licenseBody),
],
};
};
24 changes: 24 additions & 0 deletions .config/ce.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

const baseConfig = require('./base');

module.exports.create = function create(hotType) {
const config = baseConfig.create(hotType);

config.entry = {
'vue-handsontable-ce': './src/common/HotTable.vue',
'vue-handsontable-ce.min': './src/common/HotTable.vue',
};

config.externals = {
'hot-alias': {
root: 'Handsontable',
commonjs2: 'handsontable',
commonjs: 'handsontable',
amd: 'handsontable',
umd: 'handsontable'
}
};

return [config];
};
24 changes: 24 additions & 0 deletions .config/pro.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

const baseConfig = require('./base');

module.exports.create = function create(hotType) {
const config = baseConfig.create(hotType);

config.entry = {
'vue-handsontable-pro': './src/common/HotTable.vue',
'vue-handsontable-pro.min': './src/common/HotTable.vue',
};

config.externals = {
'hot-alias': {
root: 'Handsontable',
commonjs2: 'handsontable-pro',
commonjs: 'handsontable-pro',
amd: 'handsontable-pro',
umd: 'handsontable-pro'
}
};

return [config];
};
53 changes: 53 additions & 0 deletions .config/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict';

const path = require('path');

module.exports.create = function create(hotType) {
const getConfig = function() {
return {
devtool: 'source-map',
output: {
path: path.resolve(__dirname, './../test/dist/'),
filename: '[name].js',
},
module: {
loaders: [
{
test: /(\.js)$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['env'],
}
},
]
},
externals: {
'hot-alias': {
root: 'Handsontable',
commonjs2: 'handsontable',
commonjs: 'handsontable',
amd: 'handsontable',
umd: 'handsontable'
},
},
};
};

const configHelpers = getConfig();
configHelpers.entry = {
'helpers': './src/common/helpers.js',
};
configHelpers.output.library = 'Helpers';
configHelpers.output.libraryTarget = 'umd';

const configSettingsMapper = getConfig();
configSettingsMapper.entry = {
'settingsMapper': './src/common/settingsMapper.js',
};
configSettingsMapper.output.library = 'SettingsMapper';
configSettingsMapper.output.libraryTarget = 'umd';
configSettingsMapper.output.libraryExport = 'default';

return [configHelpers, configSettingsMapper];
};
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store
.idea/
node_modules/
demo/node_modules/
test/dist/
npm-debug.log
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
.idea

node_modules/
demo/
docs/
test/dist/

8 changes: 2 additions & 6 deletions .release.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
"skip_git_push": true,
"release_message": true,
"remote": "origin",
"pre_commit_commands": [
"npm run make-docs"
],
"pre_commit_commands": [],
"post_commit_commands": [],
"post_complete_commands": [],
"files_to_commit": [
"./docs/*"
]
"files_to_commit": []
}
82 changes: 23 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,39 @@
# vue-handsontable-official [![Build Status](https://travis-ci.org/handsontable/vue-handsontable-official.png?branch=master)](https://travis-ci.org/handsontable/vue-handsontable-official)
A Vue.js wrapper for the the [Handsontable](https://github.com/handsontable/handsontable) spreadsheet component.
# @handsontable/vue + @handsontable-pro/vue [![Build Status](https://travis-ci.org/handsontable/vue-handsontable-official.png?branch=master)](https://travis-ci.org/handsontable/vue-handsontable-official)
Vue.js wrappers for the [Handsontable](https://github.com/handsontable/handsontable) and [Handsontable Pro](https://github.com/handsontable/handsontable-pro) spreadsheet components.

## Table of contents
1. [Installation](#installation)
2. [Basic usage](#basic-usage)
3. [Examples](#examples)
4. [License](#license)
5. [Contact](#contact)
6. [Other wrappers](#other-wrappers)
1. [Installation and basic usage](#installation)
2. [Examples](#examples)
3. [License](#license)
4. [Contact](#contact)
5. [Other wrappers](#other-wrappers)

## Installation

For detailed installation instructions, please take a look at our wiki under ["Installation guide"](https://github.com/handsontable/vue-handsontable-official/wiki/Installation-guide).

## Basic usage
`vue-handsontable-official` creates a `<HotTable>` component. You can use it just like any other Vue component. For example:

Depending on whether you're using [Handsontable](https://github.com/handsontable/handsontable) or [Handsontable Pro](https://github.com/handsontable/handsontable-pro), you'll need to install:
```
<template>
<div id="hot-preview">
<HotTable :root="root" :settings="hotSettings"></HotTable>
</div>
</template>
<script>
import HotTable from 'vue-handsontable-official';
import Vue from 'vue';
export default {
data: function() {
return {
root: 'test-hot',
hotSettings: {
data: [['sample', 'data']],
colHeaders: true
}
};
},
components: {
HotTable
}
}
</script>
<style>
#test-hot {
width: 600px;
height: 400px;
overflow: hidden;
}
</style>
npm install @handsontable/vue
```

Note, that you can pass options to Handsontable either as:
* individual component properties
```jsx
<HotTable root="hot-example" :data="hotData" :rowHeaders="true"/>
or
```
* an object passed to a single `settings` property
```jsx
<HotTable root="hot-example" :settings="settingsObject" />
npm install @handsontable-pro/vue
```
**Important:** The wrapper does not contain `Handsontable`/`Handsontable Pro`, so you'll need to install it separately, using:
```
npm install handsontable
```
or
```
npm install handsontable-pro
```

The `root` property declares the `id` of the root element for the table. It is optional - if it isn't provided, the table will get a randomly generated `id`.
For detailed installation instructions, please take a look at our wiki under ["Installation guide"](https://github.com/handsontable/vue-handsontable-official/wiki/Installation-guide).

## Examples
Please see the [/demo](https://github.com/handsontable/vue-handsontable-official/tree/master/demo) directory for a sample app using `vue-handsontable-official`.

You can check out a live version of this example at [handsontable.github.io/vue-handsontable-official/demo](https://handsontable.github.io/vue-handsontable-official/demo).
- https://codepen.io/js-ziggle/pen/pLaaVj - A simple `@handsontable/vue` implementation.

## License
`vue-handsontable-official` is released under the [MIT license](https://github.com/handsontable/vue-handsontable-official/blob/master/LICENSE).
`@handsontable/vue` and `@handsontable-pro/vue` are released under the [MIT license](https://github.com/handsontable/vue-handsontable-official/blob/master/LICENSE).
Copyrights belong to Handsoncode sp. z o.o.

## Contact
Expand All @@ -81,4 +44,5 @@ Handsontable comes with more wrappers and directives for popular frameworks:

- [hot-table](https://github.com/handsontable/hot-table) (Polymer - WebComponents)
- [ngHandsontable](https://github.com/handsontable/ngHandsontable) (Angular 1)
- [angular-handsontable](https://github.com/handsontable/angular-handsontable) (Angular)
- [react-handsontable](https://github.com/handsontable/react-handsontable) (React)
5 changes: 0 additions & 5 deletions demo/.babelrc

This file was deleted.

Loading

0 comments on commit 40abf2c

Please sign in to comment.