Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
fixed #5
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Wilkowski <Hi@Dominik-Wilkowski.com>
  • Loading branch information
dominikwilkowski committed Jan 29, 2017
1 parent cc10e2f commit 7fdbdee
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pancake-batter.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,28 @@ allPackages
else {
Log.info( `No modules found 😬` );
}

//checking settings
const PackagePath = Path.normalize(`${ pkgPath }/package.json`);
let PKG = {
uikit: {},
};

try {
PKG = JSON.parse( Fs.readFileSync( PackagePath, `utf8` ) );

Log.verbose(`Read settings at ${ Chalk.yellow( PackagePath ) }`);
}
catch( error ) {
Log.verbose(`No package.json found at ${ Chalk.yellow( PackagePath ) }`);
}

//we only fire up syrup if the settings allow
if( PKG.uikit['auto-syrup'] !== false ) {
Log.verbose(`Running syrup with: ${ Chalk.yellow( `pancake syrup ${ pkgPath } ${ Program.verbose ? '-v' : '' }` ) }`);

Spawn('pancake', ['syrup', pkgPath, Program.verbose ? '-v' : ''], { shell: true, stdio: 'inherit' });
}
}
);

Expand Down

0 comments on commit 7fdbdee

Please sign in to comment.