Skip to content

Commit

Permalink
Merge pull request #3 from ns0m/feature/export-and-run
Browse files Browse the repository at this point in the history
Module export and run
  • Loading branch information
ath0mas authored Dec 7, 2020
2 parents 836c129 + ff001a2 commit 52de8aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
5 changes: 4 additions & 1 deletion bin/cordova-splash
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/usr/bin/env node
require('./../index.js');

'use strict';

require('../')();
32 changes: 18 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,22 @@ var configFileExists = function () {
return deferred.promise;
};

display.header('Checking Project & Splash');
function run() {
display.header('Checking Project & Splash');

atLeastOnePlatformFound()
.then(validSplashExists)
.then(configFileExists)
.then(getProjectName)
.then(getPlatforms)
.then(generateSplashes)
.catch(function (err) {
if (err) {
console.log(err);
}
}).then(function () {
console.log('');
});
return atLeastOnePlatformFound()
.then(validSplashExists)
.then(configFileExists)
.then(getProjectName)
.then(getPlatforms)
.then(generateSplashes)
.catch(function (err) {
if (err) {
console.log(err);
}
}).then(function () {
console.log('');
});
}

module.exports = run;

0 comments on commit 52de8aa

Please sign in to comment.