split up babel core into multiple modules
This commit is contained in:
parent
a179f9a48b
commit
3ef9bffcc2
@ -1,2 +1,2 @@
|
||||
packages/babel/src/transformation/templates
|
||||
packages/babel-core/src/transformation/templates
|
||||
scripts
|
||||
|
||||
@ -50,7 +50,7 @@ If you wish to build a copy of Babel for distribution then run:
|
||||
$ make build-dist
|
||||
```
|
||||
|
||||
and access the files from `packages/babel/dist`.
|
||||
and access the files from `packages/babel-core/dist`.
|
||||
|
||||
#### Running tests
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@ -8,7 +8,7 @@ build: clean
|
||||
./scripts/build.sh
|
||||
|
||||
build-dist: build
|
||||
cd packages/babel; \
|
||||
cd packages/babel-core; \
|
||||
scripts/build-dist.sh
|
||||
cd packages/babel-runtime; \
|
||||
node scripts/build-dist.js
|
||||
@ -21,7 +21,7 @@ lint:
|
||||
|
||||
clean: test-clean
|
||||
rm -rf coverage
|
||||
rm -rf packages/*/lib packages/babel/templates.json
|
||||
rm -rf packages/*/lib packages/babel-core/templates.json
|
||||
|
||||
test-clean:
|
||||
rm -rf packages/*/test/tmp
|
||||
|
||||
17
packages/babel-code-frame/package.json
Normal file
17
packages/babel-code-frame/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
@ -27,6 +27,12 @@
|
||||
"test": "make test"
|
||||
},
|
||||
"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-dead-code-elimination": "^1.0.2",
|
||||
"babel-plugin-eval": "^1.0.1",
|
||||
@ -13,11 +13,11 @@ export { default as options } from "../transformation/file/options/config";
|
||||
export { default as Plugin } from "../transformation/plugin";
|
||||
export { default as Transformer } from "../transformation/transformer";
|
||||
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 { version } from "../../package";
|
||||
|
||||
import * as t from "../types";
|
||||
import * as t from "babel-types";
|
||||
export { t as types };
|
||||
|
||||
/**
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* Normalize an AST.
|
||||
@ -1,9 +1,9 @@
|
||||
import generator from "../generation";
|
||||
import * as messages from "../messages";
|
||||
import generator from "babel-generator";
|
||||
import * as messages from "babel-messages";
|
||||
import * as util from "../util";
|
||||
import File from "../transformation/file";
|
||||
import each from "lodash/collection/each";
|
||||
import * as t from "../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -3,22 +3,21 @@ import moduleFormatters from "../modules";
|
||||
import OptionManager from "./options/option-manager";
|
||||
import PluginManager from "./plugin-manager";
|
||||
import shebangRegex from "shebang-regex";
|
||||
import NodePath from "../../traversal/path";
|
||||
import { NodePath, Hub } from "babel-traverse";
|
||||
import isFunction from "lodash/lang/isFunction";
|
||||
import sourceMap from "source-map";
|
||||
import generate from "../../generation";
|
||||
import codeFrame from "../../helpers/code-frame";
|
||||
import generate from "babel-generator";
|
||||
import codeFrame from "babel-code-frame";
|
||||
import defaults from "lodash/object/defaults";
|
||||
import includes from "lodash/collection/includes";
|
||||
import traverse from "../../traversal";
|
||||
import traverse from "babel-traverse";
|
||||
import resolve from "try-resolve";
|
||||
import Logger from "./logger";
|
||||
import Plugin from "../plugin";
|
||||
import parse from "../../helpers/parse";
|
||||
import Hub from "../../traversal/hub";
|
||||
import * as util from "../../util";
|
||||
import path from "path";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,9 +1,9 @@
|
||||
import Transformer from "../transformer";
|
||||
import Plugin from "../plugin";
|
||||
import * as types from "../../types";
|
||||
import * as messages from "../../messages";
|
||||
import * as types from "babel-types";
|
||||
import * as messages from "babel-messages";
|
||||
import resolve from "try-resolve";
|
||||
import traverse from "../../traversal";
|
||||
import traverse from "babel-traverse";
|
||||
import parse from "../../helpers/parse";
|
||||
|
||||
/**
|
||||
@ -1,5 +1,5 @@
|
||||
import explode from "./explode-assignable-expression";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,5 +1,5 @@
|
||||
import explode from "./explode-assignable-expression";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -4,10 +4,10 @@
|
||||
// jsx
|
||||
|
||||
import isString from "lodash/lang/isString";
|
||||
import * as messages from "../../messages";
|
||||
import * as messages from "babel-messages";
|
||||
import esutils from "esutils";
|
||||
import * as react from "./react";
|
||||
import * as t from "../../types";
|
||||
import { react } from "babel-types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,6 +1,6 @@
|
||||
import each from "lodash/collection/each";
|
||||
import has from "lodash/object/has";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,6 +1,6 @@
|
||||
import getFunctionArity from "./get-function-arity";
|
||||
import * as util from "../../util";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,5 +1,5 @@
|
||||
import pull from "lodash/array/pull";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,6 +1,6 @@
|
||||
import type NodePath from "../../traversal/path";
|
||||
import * as messages from "../../messages";
|
||||
import * as t from "../../types";
|
||||
import * as messages from "babel-messages";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,9 +1,9 @@
|
||||
import * as metadataVisitor from "./lib/metadata";
|
||||
import * as messages from "../../messages";
|
||||
import * as messages from "babel-messages";
|
||||
import Remaps from "./lib/remaps";
|
||||
import object from "../../helpers/object";
|
||||
import * as util from "../../util";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -3,7 +3,7 @@ import CommonFormatter from "./common";
|
||||
import includes from "lodash/collection/includes";
|
||||
import values from "lodash/object/values";
|
||||
import * as util from "../../util";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,6 +1,6 @@
|
||||
import DefaultFormatter from "./_default";
|
||||
import * as util from "../../util";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,5 +1,5 @@
|
||||
import DefaultFormatter from "./_default";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,5 +1,5 @@
|
||||
import extend from "lodash/object/extend";
|
||||
import * as t from "../../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,4 +1,4 @@
|
||||
import * as t from "../../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -3,7 +3,7 @@ import AMDFormatter from "./amd";
|
||||
import * as util from "../../util";
|
||||
import last from "lodash/array/last";
|
||||
import map from "lodash/collection/map";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -3,7 +3,7 @@ import AMDFormatter from "./amd";
|
||||
import values from "lodash/object/values";
|
||||
import path from "path";
|
||||
import * as util from "../../util";
|
||||
import * as t from "../../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
@ -1,5 +1,5 @@
|
||||
import type Transformer from "./transformer";
|
||||
import traverse from "../traversal";
|
||||
import traverse from "babel-traverse";
|
||||
import type File from "./file";
|
||||
|
||||
/**
|
||||
@ -1,10 +1,10 @@
|
||||
import PluginPass from "./plugin-pass";
|
||||
import * as messages from "../messages";
|
||||
import traverse from "../traversal";
|
||||
import * as messages from "babel-messages";
|
||||
import traverse from "babel-traverse";
|
||||
import assign from "lodash/object/assign";
|
||||
import clone from "lodash/lang/clone";
|
||||
import File from "./file";
|
||||
import * as t from "../types";
|
||||
import * as t from "babel-types";
|
||||
|
||||
const VALID_PLUGIN_PROPERTIES = [
|
||||
"visitor", "metadata",
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user