Last active
May 23, 2016 05:14
-
-
Save hellobrian/d11e30456f3613802f366fd80c631e35 to your computer and use it in GitHub Desktop.
npm lifecycle event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TARGET = process.env.npm_lifecycle_event; | |
if (TARGET === ‘build’) { | |
console.log(`Running your build tasks!`); | |
} | |
if (TARGET === ‘dev’) { | |
console.log(`Running the dev server!`); | |
} | |
if (TARGET === ‘start’) { | |
console.log(`Running App in production!`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment