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 json from "rollup-plugin-json";
|
|
|
|
import replace from "rollup-plugin-replace";
|
2017-11-22 14:27:40 +03:00
|
|
|
import * as path from "path";
|
2017-05-29 07:49:41 +03:00
|
|
|
|
2017-06-08 01:20:48 +03:00
|
|
|
export default Object.assign(baseConfig, {
|
2017-06-28 22:37:33 +03:00
|
|
|
entry: "bin/prettier.js",
|
2018-01-10 17:13:09 +03:00
|
|
|
dest: "dist/bin-prettier.js",
|
2017-06-28 22:37:33 +03:00
|
|
|
format: "cjs",
|
|
|
|
banner: "#!/usr/bin/env node",
|
2017-05-29 07:49:41 +03:00
|
|
|
plugins: [
|
2018-01-05 13:09:51 +03:00
|
|
|
replace({
|
|
|
|
"#!/usr/bin/env node": "",
|
|
|
|
// See comment in jest.config.js
|
|
|
|
"require('graceful-fs')": "require('fs')"
|
|
|
|
}),
|
2017-05-29 07:49:41 +03:00
|
|
|
json(),
|
2018-01-05 13:09:51 +03:00
|
|
|
resolve({
|
|
|
|
preferBuiltins: true,
|
|
|
|
extensions: [".js", ".json"]
|
|
|
|
}),
|
2017-06-28 22:37:33 +03:00
|
|
|
commonjs()
|
2017-05-29 07:49:41 +03:00
|
|
|
],
|
2017-11-22 14:27:40 +03:00
|
|
|
external: [
|
|
|
|
"fs",
|
|
|
|
"readline",
|
|
|
|
"path",
|
|
|
|
"module",
|
|
|
|
"assert",
|
|
|
|
"util",
|
|
|
|
"events",
|
2017-12-26 04:23:50 +03:00
|
|
|
path.resolve("src/common/third-party.js")
|
2017-11-22 14:27:40 +03:00
|
|
|
],
|
|
|
|
paths: {
|
2018-01-10 17:13:09 +03:00
|
|
|
[path.resolve("src/common/third-party.js")]: "./third-party"
|
2017-11-22 14:27:40 +03:00
|
|
|
}
|
2017-06-08 01:20:48 +03:00
|
|
|
});
|