This repository was archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
cosmetic changes to the generated JS? #425
Labels
Comments
This is:
W/ the de-indent change, this file will also be slightly smaller. |
We haven't done anything to tweak the module boilerplate, because it will be fixed by generating much much cleaner ES6 modules. Or even just following one of the ES5 module patterns, so the code looks like what humans write for ES5. That's covered by #285, #284, #34.
|
I think this is covered by those other issues, but let me know if I missed anything. |
Ah, properly pretty much covered then. Here's one more tweak to the format (which doesn't try and change the module header format): // Compiled from web/entry.dart.
dart_library.library('entry', null, /* Imports */[
'dart/_runtime',
'logging/logging',
'dart/core',
'atom/atom',
'atom_flutter/flutter'
], /* Lazy imports */[
], function(exports, dart, logging, core, atom, flutter) {
'use strict';
let dartx = dart.dartx;
function main() {
logging.Logger.root.level = logging.Level.INFO;
logging.Logger.root.onRecord.listen(dart.fn(r => {
let tag = `[${r.loggerName} ${r.level.name[dartx.toLowerCase]()}: `;
core.print(`${tag} ${r.message}`);
if (r.error != null) core.print(`${tag} ${r.error}`);
if (r.stackTrace != null) core.print(`${tag} ${r.stackTrace}`);
}, dart.void, [logging.LogRecord]));
atom.registerPackageDDC(new flutter.FlutterDevPackage());
}
dart.fn(main);
exports.main = main;
});
//# sourceMappingURL=entry.js.map |
This issue was moved to dart-lang/sdk#27306 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Here's the current generated JS for a sample dart file:
Here is the sample file with some tweaks:
The text was updated successfully, but these errors were encountered: