split up babel core into multiple modules

This commit is contained in:
Sebastian McKenzie 2015-08-11 17:40:59 +01:00
parent a179f9a48b
commit 3ef9bffcc2
2384 changed files with 257 additions and 179 deletions

View File

@ -1,2 +1,2 @@
packages/babel/src/transformation/templates packages/babel-core/src/transformation/templates
scripts scripts

View File

@ -50,7 +50,7 @@ If you wish to build a copy of Babel for distribution then run:
$ make build-dist $ make build-dist
``` ```
and access the files from `packages/babel/dist`. and access the files from `packages/babel-core/dist`.
#### Running tests #### Running tests

View File

@ -8,7 +8,7 @@ build: clean
./scripts/build.sh ./scripts/build.sh
build-dist: build build-dist: build
cd packages/babel; \ cd packages/babel-core; \
scripts/build-dist.sh scripts/build-dist.sh
cd packages/babel-runtime; \ cd packages/babel-runtime; \
node scripts/build-dist.js node scripts/build-dist.js
@ -21,7 +21,7 @@ lint:
clean: test-clean clean: test-clean
rm -rf coverage rm -rf coverage
rm -rf packages/*/lib packages/babel/templates.json rm -rf packages/*/lib packages/babel-core/templates.json
test-clean: test-clean:
rm -rf packages/*/test/tmp rm -rf packages/*/test/tmp

View File

@ -0,0 +1,17 @@
{
"name": "babel-code-frame",
"version": "5.8.22",
"description": "",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "babel/babel",
"main": "lib/index.js",
"dependencies": {
"chalk": "^1.1.0",
"esutils": "^2.0.2",
"js-tokens": "^1.0.1",
"line-numbers": "^0.2.0",
"repeating": "^1.1.3"
}
}

View File

@ -27,6 +27,12 @@
"test": "make test" "test": "make test"
}, },
"dependencies": { "dependencies": {
"babel-code-frame": "^5.8.22",
"babel-types": "^5.8.22",
"babel-util": "^5.8.22",
"babel-traverse": "^5.8.22",
"babel-generator": "^5.8.22",
"babel-messages": "^5.8.22",
"babel-plugin-constant-folding": "^1.0.1", "babel-plugin-constant-folding": "^1.0.1",
"babel-plugin-dead-code-elimination": "^1.0.2", "babel-plugin-dead-code-elimination": "^1.0.2",
"babel-plugin-eval": "^1.0.1", "babel-plugin-eval": "^1.0.1",
@ -75,4 +81,4 @@
"trim-right": "^1.0.0", "trim-right": "^1.0.0",
"try-resolve": "^1.0.0" "try-resolve": "^1.0.0"
} }
} }

View File

@ -13,11 +13,11 @@ export { default as options } from "../transformation/file/options/config";
export { default as Plugin } from "../transformation/plugin"; export { default as Plugin } from "../transformation/plugin";
export { default as Transformer } from "../transformation/transformer"; export { default as Transformer } from "../transformation/transformer";
export { default as Pipeline } from "../transformation/pipeline"; export { default as Pipeline } from "../transformation/pipeline";
export { default as traverse } from "../traversal"; export { default as traverse } from "babel-traverse";
export { default as buildExternalHelpers } from "../tools/build-external-helpers"; export { default as buildExternalHelpers } from "../tools/build-external-helpers";
export { version } from "../../package"; export { version } from "../../package";
import * as t from "../types"; import * as t from "babel-types";
export { t as types }; export { t as types };
/** /**

View File

@ -1,4 +1,4 @@
import * as t from "../types"; import * as t from "babel-types";
/** /**
* Normalize an AST. * Normalize an AST.

View File

@ -1,9 +1,9 @@
import generator from "../generation"; import generator from "babel-generator";
import * as messages from "../messages"; import * as messages from "babel-messages";
import * as util from "../util"; import * as util from "../util";
import File from "../transformation/file"; import File from "../transformation/file";
import each from "lodash/collection/each"; import each from "lodash/collection/each";
import * as t from "../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -3,22 +3,21 @@ import moduleFormatters from "../modules";
import OptionManager from "./options/option-manager"; import OptionManager from "./options/option-manager";
import PluginManager from "./plugin-manager"; import PluginManager from "./plugin-manager";
import shebangRegex from "shebang-regex"; import shebangRegex from "shebang-regex";
import NodePath from "../../traversal/path"; import { NodePath, Hub } from "babel-traverse";
import isFunction from "lodash/lang/isFunction"; import isFunction from "lodash/lang/isFunction";
import sourceMap from "source-map"; import sourceMap from "source-map";
import generate from "../../generation"; import generate from "babel-generator";
import codeFrame from "../../helpers/code-frame"; import codeFrame from "babel-code-frame";
import defaults from "lodash/object/defaults"; import defaults from "lodash/object/defaults";
import includes from "lodash/collection/includes"; import includes from "lodash/collection/includes";
import traverse from "../../traversal"; import traverse from "babel-traverse";
import resolve from "try-resolve"; import resolve from "try-resolve";
import Logger from "./logger"; import Logger from "./logger";
import Plugin from "../plugin"; import Plugin from "../plugin";
import parse from "../../helpers/parse"; import parse from "../../helpers/parse";
import Hub from "../../traversal/hub";
import * as util from "../../util"; import * as util from "../../util";
import path from "path"; import path from "path";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,9 +1,9 @@
import Transformer from "../transformer"; import Transformer from "../transformer";
import Plugin from "../plugin"; import Plugin from "../plugin";
import * as types from "../../types"; import * as types from "babel-types";
import * as messages from "../../messages"; import * as messages from "babel-messages";
import resolve from "try-resolve"; import resolve from "try-resolve";
import traverse from "../../traversal"; import traverse from "babel-traverse";
import parse from "../../helpers/parse"; import parse from "../../helpers/parse";
/** /**

View File

@ -1,5 +1,5 @@
import explode from "./explode-assignable-expression"; import explode from "./explode-assignable-expression";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,5 +1,5 @@
import explode from "./explode-assignable-expression"; import explode from "./explode-assignable-expression";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -4,10 +4,10 @@
// jsx // jsx
import isString from "lodash/lang/isString"; import isString from "lodash/lang/isString";
import * as messages from "../../messages"; import * as messages from "babel-messages";
import esutils from "esutils"; import esutils from "esutils";
import * as react from "./react"; import { react } from "babel-types";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,6 +1,6 @@
import each from "lodash/collection/each"; import each from "lodash/collection/each";
import has from "lodash/object/has"; import has from "lodash/object/has";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,6 +1,6 @@
import getFunctionArity from "./get-function-arity"; import getFunctionArity from "./get-function-arity";
import * as util from "../../util"; import * as util from "../../util";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,5 +1,5 @@
import pull from "lodash/array/pull"; import pull from "lodash/array/pull";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,6 +1,6 @@
import type NodePath from "../../traversal/path"; import type NodePath from "../../traversal/path";
import * as messages from "../../messages"; import * as messages from "babel-messages";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,9 +1,9 @@
import * as metadataVisitor from "./lib/metadata"; import * as metadataVisitor from "./lib/metadata";
import * as messages from "../../messages"; import * as messages from "babel-messages";
import Remaps from "./lib/remaps"; import Remaps from "./lib/remaps";
import object from "../../helpers/object"; import object from "../../helpers/object";
import * as util from "../../util"; import * as util from "../../util";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -3,7 +3,7 @@ import CommonFormatter from "./common";
import includes from "lodash/collection/includes"; import includes from "lodash/collection/includes";
import values from "lodash/object/values"; import values from "lodash/object/values";
import * as util from "../../util"; import * as util from "../../util";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,6 +1,6 @@
import DefaultFormatter from "./_default"; import DefaultFormatter from "./_default";
import * as util from "../../util"; import * as util from "../../util";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,5 +1,5 @@
import DefaultFormatter from "./_default"; import DefaultFormatter from "./_default";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,5 +1,5 @@
import extend from "lodash/object/extend"; import extend from "lodash/object/extend";
import * as t from "../../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,4 +1,4 @@
import * as t from "../../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -3,7 +3,7 @@ import AMDFormatter from "./amd";
import * as util from "../../util"; import * as util from "../../util";
import last from "lodash/array/last"; import last from "lodash/array/last";
import map from "lodash/collection/map"; import map from "lodash/collection/map";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -3,7 +3,7 @@ import AMDFormatter from "./amd";
import values from "lodash/object/values"; import values from "lodash/object/values";
import path from "path"; import path from "path";
import * as util from "../../util"; import * as util from "../../util";
import * as t from "../../types"; import * as t from "babel-types";
/** /**
* [Please add a description.] * [Please add a description.]

View File

@ -1,5 +1,5 @@
import type Transformer from "./transformer"; import type Transformer from "./transformer";
import traverse from "../traversal"; import traverse from "babel-traverse";
import type File from "./file"; import type File from "./file";
/** /**

View File

@ -1,10 +1,10 @@
import PluginPass from "./plugin-pass"; import PluginPass from "./plugin-pass";
import * as messages from "../messages"; import * as messages from "babel-messages";
import traverse from "../traversal"; import traverse from "babel-traverse";
import assign from "lodash/object/assign"; import assign from "lodash/object/assign";
import clone from "lodash/lang/clone"; import clone from "lodash/lang/clone";
import File from "./file"; import File from "./file";
import * as t from "../types"; import * as t from "babel-types";
const VALID_PLUGIN_PROPERTIES = [ const VALID_PLUGIN_PROPERTIES = [
"visitor", "metadata", "visitor", "metadata",

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