Skip to content

Commit

Permalink
fix(p3-convert): verify p3-convert (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Limon Monte authored Dec 4, 2018
1 parent 5deb6b0 commit 2b703ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/magi-p3-convert
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ async function main() {
${process.argv.slice(2).join(' ')} \
`);

// check that conversion went well and the primary entry point is there
const packageJson = JSON.parse(fs.readFileSync('package.json'));
if (!fs.existsSync(packageJson.main)) {
throw `⚠️ Something went wrong during P3 convert, ${packageJson.main} wasn't found.`;
}

// Set default values for replacements
const postProcess = {files, from, to};

Expand Down

0 comments on commit 2b703ab

Please sign in to comment.