* normalize npmignores

* fixup eslint ignore, etc

* lint

* remove unused

* rm from gitignore

* use strict
This commit is contained in:
Henry Zhu 2017-03-25 21:46:16 -04:00 committed by GitHub
parent cff1c8db39
commit 7a1ccf076c
122 changed files with 249 additions and 309 deletions

View File

@ -1,12 +1,9 @@
/lib /lib
scripts
packages/babel-core/src/transformation/templates
packages/babel-runtime packages/babel-runtime
!packages/babel-runtime/scripts
!packages/babel-runtime/core-js.js
packages/*/node_modules packages/*/node_modules
packages/*/lib packages/*/lib
packages/*/dist packages/*/dist
packages/*/test/fixtures packages/*/test/fixtures
packages/*/test/tmp packages/*/test/tmp
vendor
_babel.github.io
Gulpfile.js

5
.gitignore vendored
View File

@ -1,11 +1,8 @@
.DS_Store .DS_Store
node_modules node_modules
test/tmp
*.log *.log
*.cache *.cache
/.eslintcache /.eslintcache
/templates.json
/tests.json
/browser.js /browser.js
/browser-polyfill.js /browser-polyfill.js
/runtime.js /runtime.js
@ -24,7 +21,5 @@ dist
!/packages/babel-runtime/helpers/es6/toArray.js !/packages/babel-runtime/helpers/es6/toArray.js
/packages/babel-register/test/.babel /packages/babel-register/test/.babel
/packages/*/lib /packages/*/lib
_babel.github.io
/tests/.browser-build.js
.nyc_output .nyc_output
/babel.sublime-workspace /babel.sublime-workspace

View File

@ -1,16 +1,18 @@
var plumber = require("gulp-plumber"); "use strict";
var through = require("through2");
var chalk = require("chalk");
var newer = require("gulp-newer");
var babel = require("gulp-babel");
var watch = require("gulp-watch");
var gutil = require("gulp-util");
var gulp = require("gulp");
var path = require("path");
var scripts = "./packages/*/src/**/*.js"; const plumber = require("gulp-plumber");
const through = require("through2");
const chalk = require("chalk");
const newer = require("gulp-newer");
const babel = require("gulp-babel");
const watch = require("gulp-watch");
const gutil = require("gulp-util");
const gulp = require("gulp");
const path = require("path");
var srcEx, libFragment; const scripts = "./packages/*/src/**/*.js";
let srcEx, libFragment;
if (path.win32 === path) { if (path.win32 === path) {
srcEx = /(packages\\[^\\]+)\\src\\/; srcEx = /(packages\\[^\\]+)\\src\\/;
@ -20,8 +22,8 @@ if (path.win32 === path) {
libFragment = "$1/lib/"; libFragment = "$1/lib/";
} }
var mapToDest = function (path) { return path.replace(srcEx, libFragment); }; const mapToDest = function (path) { return path.replace(srcEx, libFragment); };
var dest = "packages"; const dest = "packages";
gulp.task("default", ["build"]); gulp.task("default", ["build"]);
@ -30,9 +32,9 @@ gulp.task("build", function () {
.pipe(plumber({ .pipe(plumber({
errorHandler: function (err) { errorHandler: function (err) {
gutil.log(err.stack); gutil.log(err.stack);
} },
})) }))
.pipe(newer({map: mapToDest})) .pipe(newer({ map: mapToDest }))
.pipe(through.obj(function (file, enc, callback) { .pipe(through.obj(function (file, enc, callback) {
gutil.log("Compiling", "'" + chalk.cyan(file.path) + "'..."); gutil.log("Compiling", "'" + chalk.cyan(file.path) + "'...");
callback(null, file); callback(null, file);
@ -48,13 +50,12 @@ gulp.task("build", function () {
// TODO: remove this section // TODO: remove this section
// temporarily just copying the old code since watch isn't working // temporarily just copying the old code since watch isn't working
var dest = "packages";
gulp.task("build-watch", function () { gulp.task("build-watch", function () {
return gulp.src(scripts) return gulp.src(scripts)
.pipe(plumber({ .pipe(plumber({
errorHandler: function (err) { errorHandler: function (err) {
gutil.log(err.stack); gutil.log(err.stack);
} },
})) }))
.pipe(through.obj(function (file, enc, callback) { .pipe(through.obj(function (file, enc, callback) {
file._path = file.path; file._path = file.path;
@ -70,8 +71,8 @@ gulp.task("build-watch", function () {
.pipe(gulp.dest(dest)); .pipe(gulp.dest(dest));
}); });
gulp.task("watch", ["build-watch"], function (callback) { gulp.task("watch", ["build-watch"], function () {
watch(scripts, {debounceDelay: 200}, function () { watch(scripts, { debounceDelay: 200 }, function () {
gulp.start("build-watch"); gulp.start("build-watch");
}); });
}); });

View File

@ -19,13 +19,13 @@ watch: clean
./node_modules/.bin/gulp watch ./node_modules/.bin/gulp watch
lint: lint:
./node_modules/.bin/eslint packages/ --format=codeframe ./node_modules/.bin/eslint scripts packages Gulpfile.js --format=codeframe
flow: flow:
./node_modules/.bin/flow check ./node_modules/.bin/flow check
fix: fix:
./node_modules/.bin/eslint packages/ --format=codeframe --fix ./node_modules/.bin/eslint scripts packages Gulpfile.js --format=codeframe --fix
clean: test-clean clean: test-clean
rm -rf packages/babel-polyfill/browser* rm -rf packages/babel-polyfill/browser*

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +0,0 @@
#!/bin/sh
set -e
npm link babel-core

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,13 +1,3 @@
src
test
*.log *.log
*.cache
.*
/lib/transformation/templates
/test
/dist
/tests.json
/CHANGELOG.md
/.package.json
/packages
/scripts
/src
_babel.github.io

View File

@ -21,10 +21,6 @@
"babel-core", "babel-core",
"compiler" "compiler"
], ],
"scripts": {
"bench": "make bench",
"test": "make test"
},
"dependencies": { "dependencies": {
"babel-code-frame": "7.0.0-alpha.3", "babel-code-frame": "7.0.0-alpha.3",
"babel-generator": "7.0.0-alpha.3", "babel-generator": "7.0.0-alpha.3",

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,2 @@
node_modules node_modules
*.log
src src

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,3 +1,3 @@
node_modules
*.log
src src
test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
node_modules
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,4 +1,3 @@
node_modules
*.log
src src
test test
*.log

View File

@ -1,3 +1,3 @@
src src
test test
node_modules *.log

Some files were not shown because too many files have changed in this diff Show More