ignore "ignored files" when babel.transform has determined that it should be ignored, this is likely the result of an rc file resolution - fixes #1362

This commit is contained in:
Sebastian McKenzie 2015-05-15 00:24:03 +01:00
parent fd9c98ff86
commit 1b15481460
3 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,7 @@ module.exports = function (commander, filenames, opts) {
var data = util.compile(src, {
sourceFileName: slash(path.relative(dest + "/..", src))
});
if (data.ignored) return;
if (commander.sourceMaps && commander.sourceMaps !== "inline") {
var mapLoc = dest + ".map";

View File

@ -116,7 +116,9 @@ module.exports = function (commander, filenames, opts) {
_.each(_filenames, function (filename) {
if (util.shouldIgnore(filename)) return;
results.push(util.compile(filename));
var data = util.compile(filename);
if (data.ignored) return;
results.push(data);
});
output();

View File

@ -493,6 +493,7 @@ export default class File {
if (this.shouldIgnore()) {
return {
metadata: {},
ignored: true,
code: code,
map: null,
ast: null