Created
April 27, 2016 16:57
-
-
Save hoosteeno/a823e6b1a50813619b00166ce63ca6a8 to your computer and use it in GitHub Desktop.
metalsmith-devonly plugin
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 devonly = function(plugin, options) { | |
if (process.argv.length > 2 && process.argv.indexOf('dev') > 0) { | |
return plugin(options); | |
} | |
else { | |
return function(files, metalsmith, done) { | |
done(); | |
}; | |
} | |
}; |
Run it:
$ node build [dev]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add it to build.js: