cocos2d-cli 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/screenshot.js +11 -6
package/package.json
CHANGED
|
@@ -89,13 +89,18 @@ async function run(args) {
|
|
|
89
89
|
options.outputDir = path.resolve(options.outputDir);
|
|
90
90
|
|
|
91
91
|
try {
|
|
92
|
-
await takeScreenshot(options);
|
|
93
|
-
|
|
92
|
+
const result = await takeScreenshot(options);
|
|
93
|
+
const filename = path.basename(result.screenshotPath);
|
|
94
|
+
console.log(JSON.stringify({
|
|
95
|
+
success: true,
|
|
96
|
+
filename: filename
|
|
97
|
+
}));
|
|
94
98
|
} catch (error) {
|
|
95
|
-
console.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
console.log(JSON.stringify({
|
|
100
|
+
success: false,
|
|
101
|
+
error: error.message,
|
|
102
|
+
logDir: error.logDir || null
|
|
103
|
+
}));
|
|
99
104
|
process.exit(1);
|
|
100
105
|
}
|
|
101
106
|
}
|