2018-11-02 10:48:20 -04:00
|
|
|
import compiler from '@ampproject/rollup-plugin-closure-compiler';
|
2018-08-20 12:58:56 -04:00
|
|
|
|
|
|
|
const plugins = [
|
2018-11-02 10:48:20 -04:00
|
|
|
compiler({
|
2018-08-20 12:58:56 -04:00
|
|
|
assumeFunctionWrapper: true,
|
2018-10-10 12:57:11 -04:00
|
|
|
compilationLevel: 'WHITESPACE_ONLY', //'ADVANCED',
|
2018-08-20 12:58:56 -04:00
|
|
|
createSourceMap: true,
|
|
|
|
env: 'BROWSER',
|
2018-09-20 10:41:28 -04:00
|
|
|
languageIn: 'ECMASCRIPT_2018',
|
2018-10-10 12:57:11 -04:00
|
|
|
languageOut: 'ES3'
|
2018-08-20 12:58:56 -04:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-08-20 16:24:33 -04:00
|
|
|
const defaultOutput = {
|
|
|
|
format: 'iife',
|
|
|
|
sourcemap: true,
|
|
|
|
}
|
|
|
|
|
2018-08-20 12:58:56 -04:00
|
|
|
export default [{
|
|
|
|
input: './js/src/index.js',
|
|
|
|
output: {
|
2018-08-20 16:24:33 -04:00
|
|
|
...defaultOutput,
|
2018-08-20 12:58:56 -04:00
|
|
|
file: './js/scripts.min.js',
|
|
|
|
sourcemapFile: './js/scripts.min.js.map',
|
|
|
|
},
|
|
|
|
plugins,
|
|
|
|
}, {
|
|
|
|
input: './js/src/index-authed.js',
|
|
|
|
output: {
|
2018-08-20 16:24:33 -04:00
|
|
|
...defaultOutput,
|
2018-08-20 12:58:56 -04:00
|
|
|
file: './js/scripts-authed.min.js',
|
|
|
|
sourcemapFile: './js/scripts-authed.min.js.map',
|
|
|
|
},
|
|
|
|
plugins,
|
|
|
|
}, {
|
|
|
|
input: './js/src/base/sort_tables.js',
|
|
|
|
output: {
|
2018-08-20 16:24:33 -04:00
|
|
|
...defaultOutput,
|
2018-08-20 12:58:56 -04:00
|
|
|
file: './js/tables.min.js',
|
|
|
|
sourcemapFile: './js/tables.min.js.map',
|
|
|
|
},
|
|
|
|
plugins,
|
|
|
|
}];
|
|
|
|
|