Do not mangle names on minification for Node prod build - property names are used for search in bake

This commit is contained in:
d98762625 2018-10-05 18:24:06 +01:00
parent 25e0585742
commit 48f3a3b18f
4 changed files with 2316 additions and 2076 deletions

View file

@ -7,9 +7,7 @@
* @license Apache-2.0
*/
import { operations } from "./index";
import chef from "./index";
import { decapitalise } from "./apiUtils";
import repl from "repl";
import "babel-polyfill";
@ -28,10 +26,9 @@ const replServer = repl.start({
prompt: "chef > ",
});
operations.forEach((op) => {
replServer.context[decapitalise(op.opName)] = op;
Object.keys(chef).forEach((key) => {
if (key !== "operations") {
replServer.context[key] = chef[key];
}
});
replServer.context.help = chef.help;
replServer.context.bake = chef.bake;
replServer.context.Dish = chef.Dish;