Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Sorted display according to functional process sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
olivab committed Dec 4, 2017
1 parent 0e24fde commit 1e01c79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,21 +241,22 @@ function generateForConfig(imageObj, settings, config) {
gauge.show(sectionName, 0);

return Q.mapSeries(definitions, (def) => {
var transformPromise;
var transformPromise = Q.resolve();
transformPromise = transformPromise.then(() => {
progressIndex++;
var progressRate = progressIndex / definitionCount;
gauge.show(sectionName, progressRate);
gauge.pulse(def.name);
});
switch (config.type) {
case 'icon':
transformPromise = transformIcon(def);
transformPromise = transformPromise.then(() => transformIcon(def));
break;
case 'splash':
transformPromise = transformSplash(def);
transformPromise = transformPromise.then(() => transformSplash(def));
break;
}
return transformPromise.then(() => {
progressIndex++;
var progressRate = progressIndex / definitionCount;
gauge.show(sectionName, progressRate);
gauge.pulse();
});
return transformPromise;
}).then(() => {
gauge.disable();
display.success('Generated ' + config.type + ' files for ' + config.platform);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-res-generator",
"version": "0.4.0",
"version": "0.4.1",
"description": "Generates icon & splash screen for cordova/ionic projects using javascript only.",
"main": "index.js",
"preferGlobal": true,
Expand Down

0 comments on commit 1e01c79

Please sign in to comment.