-
Notifications
You must be signed in to change notification settings - Fork 55
/
rollup.config.js
38 lines (35 loc) · 960 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
38
// See: https://hackernoon.com/how-to-create-library-in-angular-2-and-publish-to-npm-from-scratch-f2b1272d6266
'use strict';
const commonjs = require('rollup-plugin-commonjs');
const ROLLUP_GLOBALS = require('./rollup.globals');
const fs = require('fs-extra');
const resolve = require('rollup-plugin-node-resolve');
const rollup = require('rollup');
export const LIB_NAME = 'patternfly-ng';
export const PATH_SRC = 'dist/';
export const PATH_DIST = 'dist/bundles/';
export const config = {
external: Object.keys(ROLLUP_GLOBALS),
input: PATH_SRC + 'index.js',
output: {
name: LIB_NAME,
sourcemap: true
},
plugins: [
resolve({
main: true,
module: true
}),
commonjs({
include: [ 'node_modules/**' ]
})
],
onwarn: warning => {
const skip_codes = [
'THIS_IS_UNDEFINED',
'MISSING_GLOBAL_NAME'
];
if (skip_codes.indexOf(warning.code) != -1) return;
console.error(warning);
}
};