Repress in Production?
nicholasalanbrown opened this issue · 1 comments
nicholasalanbrown commented
Is there any way to make the package only run in development, not after a deploy?
francocatena commented
Hi @nicholasalanbrown, I think you can do something like:
Env = {
development: function () {
return process.env.NODE_ENV === 'development'
}
}
As mentioned here: http://stackoverflow.com/questions/11183424
(Only works on the server, so you need to expose this via Meteor.methods or similar)
And then not include the status template. Is not ideal, but unfortunately by the time is not possible to parametrize a package inclusion on production.
Another approach is to fork this package and create your own, you need to add this on package.js
Package.describe({
// Stuff
debugOnly: true
})
And it will be excluded from the build process. But you also need to handle the template inclusion somehow.
Cheers.