diff --git a/README.md b/README.md index 4f52c6aca..da719471e 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ The further configuration steps depend on which build tool, bundler or module lo * [Configuring SystemJS](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-systemjs.md#configuration) * [Configuring Angular CLI](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-angular-cli.md#configuration) * [Configuring Webpack](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-webpack.md#configuration) +* [Configuring Rollup](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-rollup.md#configuration) ### Create a new Angular 2 Application ### @@ -110,6 +111,7 @@ Depending on your requirements you can choose one of the following ways to start * [Start with SystemJS](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-systemjs.md) * [Start with Angular CLI](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-angular-cli.md) * [Start with Webpack](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-webpack.md) +* [Start with Rollup](https://github.com/DevExpress/devextreme-angular/blob/master/docs/using-rollup.md) ### Running the Local Examples ### diff --git a/docs/using-rollup.md b/docs/using-rollup.md new file mode 100644 index 000000000..79b976e63 --- /dev/null +++ b/docs/using-rollup.md @@ -0,0 +1,38 @@ +# Using the DevExtreme Angular 2 Integration with Rollup + +## Create a new Application ## + +You can use [some starter](https://github.com/search?utf8=%E2%9C%93&q=angular+rollup+starter&type=Repositories&ref=searchresults) to bootstrap a new project based on Rollup. + +## Add DevExtreme ## + +Follow the [installation](https://github.com/DevExpress/devextreme-angular#installation) section in our Readme. + +## Configure Rollup for DevExtreme ## + +There is [a limitation](https://github.com/DevExpress/devextreme-angular/issues/283) in bundling with Rollup. +Make sure that you use [long paths](https://github.com/DevExpress/devextreme-angular/#bundlers-without-tree-shaking-support) for DevExtreme Angular modules. + +Ensure that the following plugins are included: + +```js +var nodeResolve = require('rollup-plugin-node-resolve'); +var commonjs = require('rollup-plugin-commonjs'); +var builtins = require('rollup-plugin-node-builtins'); +var globals = require('rollup-plugin-node-globals'); + +{ + .... + plugins: [ + nodeResolve({ jsnext: true, main: true, browser: true, preferBuiltins: true }), + commonjs(), + builtins(), + globals() + ] + ... +} +``` + +## Import DevExtreme Stylesheets ## + +Import the required [DevExtreme css files](https://js.devexpress.com/Documentation/Guide/Themes/Predefined_Themes/).