Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Commit

Permalink
Merge pull request #109 from yavorsky/debug-targets
Browse files Browse the repository at this point in the history
Fix targets for debug.
  • Loading branch information
hzoo authored Jan 3, 2017
2 parents 2982b6e + b213fc3 commit ba896ec
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const logPlugin = (plugin, targets, list) => {
a[b] = envList[b];
return a;
}, {});
const logStr = `\n ${plugin} ${JSON.stringify(filteredList)}`;
const logStr = ` ${plugin} ${JSON.stringify(filteredList)}`;
console.log(logStr);
};

Expand Down Expand Up @@ -256,19 +256,17 @@ export default function buildPreset(context, opts = {}) {
if (debug && !hasBeenLogged) {
hasBeenLogged = true;
console.log("babel-preset-env: `DEBUG` option");
console.log("");
console.log(`Using targets: ${JSON.stringify(opts.targets, null, 2)}`);
console.log("");
console.log(`modules transform: ${moduleType}`);
console.log("");
console.log("Using plugins:");
console.log("\nUsing targets:");
console.log(JSON.stringify(targets, null, 2));
console.log(`\nModules transform: ${moduleType}`);
console.log("\nUsing plugins:");
transformations.forEach((transform) => {
logPlugin(transform, opts.targets, pluginList);
logPlugin(transform, targets, pluginList);
});
console.log("\nUsing polyfills:");
if (useBuiltIns && polyfills.length) {
polyfills.forEach((polyfill) => {
logPlugin(polyfill, opts.targets, builtInsList);
logPlugin(polyfill, targets, builtInsList);
});
}
}
Expand Down

0 comments on commit ba896ec

Please sign in to comment.