Files
test-repo/scripts/build/rollup.docs.config.js
T
Christopher Chedeau d55640087e Fix building docs (#1838)
The hackiness continues! I'm now bundling an existing bundle again in order for it to get exported as a global variable :p There's likely a better solution, but it kind of works.

Because I have to regenerate the docs, I just tagged it as 1.4.0-beta and added typescript and postcss in there.
2017-05-31 13:37:35 -07:00

25 lines
646 B
JavaScript

import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import json from 'rollup-plugin-json';
const filepath = process.env.filepath;
const filename = filepath.replace(/.+\//, '');
const basename = filename.replace(/\..+/, '');
export default {
entry: 'dist/' + filepath,
dest: 'docs/' + filename,
format: 'iife',
plugins: [
json(),
resolve(),
commonjs(),
globals(),
],
useStrict: false,
moduleName: basename.replace(/.+-/, ''),
external: ['assert', 'fs', 'module']
};