forked from GerHobbelt/jison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config-cli.js
56 lines (51 loc) · 1.32 KB
/
rollup.config-cli.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
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
export default {
input: 'lib/cli.js',
output: [
{
file: 'dist/cli-cjs.js',
format: 'cjs'
},
{
file: 'dist/cli-es6.js',
format: 'es'
},
{
file: 'dist/cli-umd.js',
name: 'jison-cli',
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',
'assert',
'fs',
'path',
'process',
]
};