From 42c2ead5e334b4500d69e3dc31711d12ad484671 Mon Sep 17 00:00:00 2001 From: Jan Kuri Date: Tue, 7 Mar 2017 14:50:13 +0100 Subject: [PATCH] chore: do not ignore rollup config --- .gitignore | 3 ++- rollup.config.js | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 rollup.config.js diff --git a/.gitignore b/.gitignore index 415ede0c..a1b1f850 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ /typings !gulpfile.js -/.idea \ No newline at end of file +/.idea +!rollup.config.js diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 00000000..c61b4d35 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,26 @@ +import path from 'path'; +import { readFileSync } from 'fs'; +import node from 'rollup-plugin-node-resolve'; +import buble from 'rollup-plugin-buble'; + +let pkg = JSON.parse(readFileSync(path.resolve(__dirname, 'package.json'))); + +export default { + entry: 'ngx-uploader.js', + dest: 'bundle/ngx-uploader.umd.js', + format: 'umd', + moduleName: 'ngx-uploader', + context: 'this', + plugins: [ node(), buble() ], + external: Object.keys(pkg.devDependencies), + globals: { + '@angular/core': 'vendor._angular_core', + '@angular/common': 'vendor._angular_common', + '@angular/platform-browser': 'vendor._angular_platformBrowser', + '@angular/platform-browser-dynamic': 'vendor._angular_platformBrowserDynamic', + '@angular/router': 'vendor._angular_router', + '@angular/http': 'vendor._angular_http', + '@angular/forms': 'vendor._angular_forms', + 'rxjs': 'vendor.rxjs' + } +}