2017-06-28 22:37:33 +03:00
|
|
|
import baseConfig from "./rollup.base.config.js";
|
|
|
|
import resolve from "rollup-plugin-node-resolve";
|
|
|
|
import commonjs from "rollup-plugin-commonjs";
|
|
|
|
import globals from "rollup-plugin-node-globals";
|
|
|
|
import json from "rollup-plugin-json";
|
2017-01-11 21:22:12 +03:00
|
|
|
|
2017-05-31 23:37:35 +03:00
|
|
|
const filepath = process.env.filepath;
|
2017-06-28 22:37:33 +03:00
|
|
|
const filename = filepath.replace(/.+\//, "");
|
|
|
|
const basename = filename.replace(/\..+/, "");
|
2017-05-31 23:37:35 +03:00
|
|
|
|
2017-06-08 01:20:48 +03:00
|
|
|
export default Object.assign(baseConfig, {
|
2017-11-28 01:27:25 +03:00
|
|
|
entry: "node_modules/prettier/" + filepath,
|
2017-07-02 03:14:24 +03:00
|
|
|
dest: "website/static/lib/" + filename,
|
2017-06-28 22:37:33 +03:00
|
|
|
format: "iife",
|
2017-06-08 01:20:48 +03:00
|
|
|
plugins: [json(), resolve({ preferBuiltins: true }), commonjs(), globals()],
|
2017-01-11 21:22:12 +03:00
|
|
|
useStrict: false,
|
2017-06-28 22:37:33 +03:00
|
|
|
moduleName: basename.replace(/.+-/, ""),
|
|
|
|
external: ["assert", "fs", "module"]
|
2017-06-08 01:20:48 +03:00
|
|
|
});
|