-
Notifications
You must be signed in to change notification settings - Fork 31
/
rollup.config.js
37 lines (36 loc) · 878 Bytes
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import typescript from '@rollup/plugin-typescript';
import copy from 'rollup-plugin-copy';
import { terser } from 'rollup-plugin-terser';
export default {
input: 'src/youtube.external.subtitle.ts',
output: [
{
file: 'dist/youtube.external.subtitle.js',
format: 'umd',
name: 'YoutubeExternalSubtitle'
},
{
file: 'dist/youtube.external.subtitle.min.js',
format: 'umd',
name: 'YoutubeExternalSubtitle',
plugins: [
terser({
output: {
comments: false
}
})
]
}
],
plugins: [
typescript(),
copy({
targets: [
{ src: 'dist/*', dest: 'docs/static/vendor/youtube.external.subtitle' },
{ src: './LICENSE.md', dest: 'docs/_includes' },
{ src: './README.md', dest: 'docs/_includes' }
],
hook: 'writeBundle'
})
]
};