Skip to content

Commit ce96914

Browse files
committed
added missing file
1 parent a6e700c commit ce96914

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
lib/
2+
/lib/
33
*.log

tools/lib/build.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import "colors";
2+
import path from "path";
3+
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

Comments
 (0)