forked from opening-hours/opening_hours.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
34 lines (32 loc) · 835 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
import {readFileSync} from 'fs';
import common from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import yaml from 'rollup-plugin-yaml';
var banner = readFileSync('./banner.js', 'utf-8');
var dependencies = process.env.DEPS === 'YES';
export default {
banner: banner,
input: './index',
name: 'opening_hours',
plugins: dependencies ? [
nodeResolve(),
common(),
yaml(),
] : [
yaml(),
],
external: dependencies ? [] : [
'i18next-client',
'moment',
'suncalc'
],
globals: dependencies ? {} : {
'i18next-client': 'i18n',
'moment': 'moment',
'suncalc': 'SunCalc'
},
output: {
format: 'umd',
file: dependencies ? 'opening_hours+deps.js' : 'opening_hours.js'
}
};