From 2813d29432e9a5e40296cf4ab7de02f90366be7d Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Thu, 16 Nov 2017 01:41:40 +0100 Subject: [PATCH] added additional test code --- types/rollup/rollup-tests.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/types/rollup/rollup-tests.ts b/types/rollup/rollup-tests.ts index 43ef6aa2bf..ddbd099e16 100644 --- a/types/rollup/rollup-tests.ts +++ b/types/rollup/rollup-tests.ts @@ -1,15 +1,25 @@ -import { rollup, Bundle } from 'rollup' +import { rollup, Bundle, Plugin } from 'rollup' let cache: Bundle | undefined +let plugin: Plugin async function main() { const bundle = await rollup({ input: 'main.js', + external: ['external-module'], + plugins: [plugin], cache, }) + const bundle2 = await rollup({ + input: 'main.js', + external: id => /^rxjs/.test(id), + plugins: plugin + }) + const result = bundle.generate({ format: 'cjs', + indent: false, }) cache = bundle @@ -17,6 +27,15 @@ async function main() { await bundle.write({ format: 'cjs', dest: 'bundle.js', + globals: { + jquery: '$', + lodash: '_', + }, + banner: '/* Banner */', + footer: '/* Footer */', + intro: 'var ENV = "production";', + outro: 'var VERSION = "1.0.0";', + indent: ' ', }) }