MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / printJSON

Method printJSON

lib/models/asset-size-printer.js:34–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 }
33
34 printJSON() {
35 let ui = this.ui;
36 return this.makeAssetSizesObject().then((files) => {
37 if (files.length !== 0) {
38 let entries = files.map((file) => ({
39 name: file.name,
40 size: file.size,
41 gzipSize: file.gzipSize,
42 }));
43 ui.writeLine(JSON.stringify({ files: entries }));
44 } else {
45 ui.writeLine(chalk.red(`No asset files found in the path provided: ${this.outputPath}`));
46 }
47 });
48 }
49
50 async makeAssetSizesObject() {
51 let files = this.findFiles();

Callers 2

runMethod · 0.80

Calls 2

makeAssetSizesObjectMethod · 0.95
thenMethod · 0.45

Tested by

no test coverage detected