mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
added additional test code
This commit is contained in:
@@ -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: ' ',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user