forked from GerHobbelt/jison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
62 lines (57 loc) · 1.49 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
export default {
input: 'lib/jison.js',
output: [
{
file: 'dist/jison-cjs.js',
format: 'cjs'
},
{
file: 'dist/jison-es6.js',
format: 'es'
},
{
file: 'dist/jison-umd.js',
name: 'jison',
format: 'umd'
}
],
plugins: [
resolve({
// use "module" field for ES6 module if possible
module: true, // Default: true
// use "main" field or index.js, even if it's not an ES6 module
// (needs to be converted from CommonJS to ES6
// – see https://github.com/rollup/rollup-plugin-commonjs
main: true, // Default: true
// not all files you want to resolve are .js files
extensions: [ '.js' ], // Default: ['.js']
// whether to prefer built-in modules (e.g. `fs`, `path`) or
// local ones with the same names
preferBuiltins: true, // Default: true
// If true, inspect resolved files to check that they are
// ES2015 modules
modulesOnly: true, // Default: false
})
],
external: [
'@gerhobbelt/ast-util',
'@gerhobbelt/json5',
'@gerhobbelt/nomnom',
'@gerhobbelt/prettier-miscellaneous',
'@gerhobbelt/recast',
'@gerhobbelt/xregexp',
'jison-helpers-lib',
'@gerhobbelt/lex-parser',
'@gerhobbelt/jison-lex',
'@gerhobbelt/ebnf-parser',
'@gerhobbelt/jison2json',
'@gerhobbelt/json2jison',
'jison-gho',
'assert',
'fs',
'path',
'process',
]
};