We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6e700c commit ce96914Copy full SHA for ce96914
.gitignore
@@ -1,3 +1,3 @@
1
node_modules
2
-lib/
+/lib/
3
*.log
tools/lib/build.js
@@ -0,0 +1,16 @@
+import "colors";
+import path from "path";
+import fsp from "fs-promise";
4
+import { exec, spawn } from "child-process-promise";
5
+
6
+const repoRoot = path.resolve(__dirname, "../../");
7
+const lib = path.join(repoRoot, "lib");
8
+const src = path.join(repoRoot, "src");
9
10
+export default function BuildCommonJs() {
11
+ console.log("Building: ".cyan + "npm module".green);
12
13
+ return exec(`rm -rf ${lib}`)
14
+ .then(() => exec(`./node_modules/.bin/babel --optional es7.objectRestSpread ${src} --out-dir ${lib}`))
15
+ .then(() => console.log("Built: ".cyan + "npm module".green));
16
+}
0 commit comments