self-host #443
This commit is contained in:
parent
a2843a5cb8
commit
339bd2b6d9
3
.babelrc
3
.babelrc
@ -1,5 +1,6 @@
|
||||
{
|
||||
"experimental": true,
|
||||
"playground": true,
|
||||
"loose": true
|
||||
"loose": true,
|
||||
"blacklist": ["es6.tailCall"]
|
||||
}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ dist
|
||||
.package.json
|
||||
packages/babel-runtime/*.js
|
||||
packages/babel-runtime/regenerator/*.js
|
||||
lib
|
||||
|
||||
2
.jscsrc
2
.jscsrc
@ -1,5 +1,5 @@
|
||||
{
|
||||
"excludeFiles": ["lib/babel/transformation/templates"],
|
||||
"excludeFiles": ["src/babel/transformation/templates"],
|
||||
"disallowSpacesInNamedFunctionExpression": {
|
||||
"beforeOpeningRoundBrace": true
|
||||
},
|
||||
|
||||
@ -1 +1 @@
|
||||
lib/babel/transformation/templates
|
||||
src/babel/transformation/templates
|
||||
|
||||
@ -13,3 +13,4 @@ CHANGELOG.md
|
||||
coverage
|
||||
vendor
|
||||
packages
|
||||
src
|
||||
|
||||
9
Makefile
9
Makefile
@ -12,13 +12,14 @@ export NODE_ENV = test
|
||||
.PHONY: clean test test-cov test-clean lint test-travis test-simple test-all test-browser publish build bootstrap publish-core publish-runtime build-core watch-core
|
||||
|
||||
build-core:
|
||||
#node $(BABEL_CMD) src --out-dir lib
|
||||
node $(BABEL_CMD) src --out-dir lib --copy-files
|
||||
|
||||
watch-core:
|
||||
#node $(BABEL_CMD) src --out-dir lib --watch
|
||||
node $(BABEL_CMD) src --out-dir lib --watch --copy-files
|
||||
|
||||
build:
|
||||
mkdir -p dist
|
||||
make build-core
|
||||
|
||||
node tools/cache-templates
|
||||
|
||||
@ -37,8 +38,8 @@ clean:
|
||||
rm -rf coverage templates.json test/tmp dist
|
||||
|
||||
lint:
|
||||
$(JSHINT_CMD) --reporter node_modules/jshint-stylish/stylish.js lib bin
|
||||
$(JSCS_CMD) lib bin
|
||||
$(JSHINT_CMD) --reporter node_modules/jshint-stylish/stylish.js src bin
|
||||
$(JSCS_CMD) src bin
|
||||
|
||||
test-clean:
|
||||
rm -rf test/tmp
|
||||
|
||||
@ -64,7 +64,7 @@ module.exports = function (commander, filenames, opts) {
|
||||
_.each(["add", "change"], function (type) {
|
||||
watcher.on(type, function (filename) {
|
||||
var relative = path.relative(dirname, filename) || filename;
|
||||
write(filename, relative);
|
||||
if (util.canCompile(filename)) write(filename, relative);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -24,6 +24,7 @@ exports.addSourceMappingUrl = function (code, loc) {
|
||||
exports.transform = function (filename, code, opts) {
|
||||
opts = _.defaults(opts || {}, index.opts);
|
||||
opts.filename = filename;
|
||||
resolveRc(filename, opts);
|
||||
|
||||
var result;
|
||||
try {
|
||||
@ -42,7 +43,6 @@ exports.transform = function (filename, code, opts) {
|
||||
};
|
||||
|
||||
exports.compile = function (filename, opts) {
|
||||
resolveRc(filename, opts);
|
||||
var code = fs.readFileSync(filename, "utf8");
|
||||
return exports.transform(filename, code, opts);
|
||||
};
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"blacklist": ["useStrict"]
|
||||
}
|
||||
@ -67,6 +67,7 @@
|
||||
"trim-right": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel": "4.5.0",
|
||||
"browserify": "^8.1.3",
|
||||
"chai": "^2.0.0",
|
||||
"esvalid": "^1.1.0",
|
||||
|
||||
@ -30,7 +30,12 @@ module.exports = function (loc, opts) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
opts = merge(json, opts);
|
||||
if (json.breakConfig) return;
|
||||
merge(opts, json, function(a, b) {
|
||||
if (Array.isArray(a)) {
|
||||
return a.concat(b);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var up = path.dirname(start);
|
||||
3
src/babel/transformation/templates/.babelrc
Normal file
3
src/babel/transformation/templates/.babelrc
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"blacklist": ["useStrict", "es6.blockScoping"]
|
||||
}
|
||||
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