switch to gulp for build process
This commit is contained in:
parent
bcfe582fef
commit
232439460f
25
Gulpfile.js
Normal file
25
Gulpfile.js
Normal file
@ -0,0 +1,25 @@
|
||||
var cached = require("gulp-cached");
|
||||
var rename = require("gulp-rename");
|
||||
var babel = require("gulp-babel");
|
||||
var watch = require("gulp-watch");
|
||||
var gulp = require("gulp");
|
||||
|
||||
var scripts = "./packages/*/src/**/*.js";
|
||||
|
||||
gulp.task("default", ["build"]);
|
||||
|
||||
gulp.task("build", function () {
|
||||
return gulp.src(scripts)
|
||||
.pipe(cached("babel"))
|
||||
.pipe(babel())
|
||||
.pipe(rename(function (path) {
|
||||
path.dirname = path.dirname.replace(/^([^\\]+)\/src/, "$1/lib");
|
||||
}))
|
||||
.pipe(gulp.dest("packages"));
|
||||
});
|
||||
|
||||
gulp.task("watch", ["build"], function (callback) {
|
||||
watch(scripts, function () {
|
||||
gulp.start("build");
|
||||
});
|
||||
});
|
||||
6
Makefile
6
Makefile
@ -5,7 +5,7 @@ export NODE_ENV = test
|
||||
.PHONY: clean test test-cov test-clean test-travis test-browser publish build bootstrap publish-core publish-runtime build-website build-core watch-core build-core-test clean-core prepublish
|
||||
|
||||
build: clean
|
||||
./scripts/build.sh
|
||||
gulp build
|
||||
|
||||
build-dist: build
|
||||
cd packages/babel-browser; \
|
||||
@ -16,7 +16,7 @@ build-dist: build
|
||||
node scripts/build-dist.js
|
||||
|
||||
watch: clean
|
||||
scripts/build.sh --watch
|
||||
gulp watch
|
||||
|
||||
lint:
|
||||
node node_modules/.bin/eslint packages/*/src
|
||||
@ -35,7 +35,7 @@ test: lint
|
||||
|
||||
test-cov: clean
|
||||
BABEL_ENV=test; \
|
||||
make build
|
||||
gulp build
|
||||
./scripts/test-cov.sh
|
||||
|
||||
test-travis: bootstrap lint build test
|
||||
|
||||
0
doc/ast/flow.md
Normal file
0
doc/ast/flow.md
Normal file
0
doc/ast/jsx.md
Normal file
0
doc/ast/jsx.md
Normal file
@ -13,6 +13,11 @@
|
||||
"es5-shim": "^4.1.7",
|
||||
"eslint": "^1.1.0",
|
||||
"fs-readdir-recursive": "^0.1.2",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-babel": "^5.3.0",
|
||||
"gulp-cached": "^1.1.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-watch": "^4.3.5",
|
||||
"istanbul": "^0.3.5",
|
||||
"lodash": "^3.10.0",
|
||||
"matcha": "^0.6.0",
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
for f in packages/*; do
|
||||
if [ -d "$f/src" ]; then
|
||||
node node_modules/babel/bin/babel "$f/src" --out-dir "$f/lib" --copy-files $1 &
|
||||
fi
|
||||
done
|
||||
|
||||
wait
|
||||
Loading…
x
Reference in New Issue
Block a user