QuickTip – Command aliases with package.json for meteor projects.

Hello guys, this quick tip will show you how to create command aliases with package.json for meteor projects. Right now I’m working in a project that has different mup.json (Meteor up – mup) to deploy in different environments such production and homolog. We have different settings.json for each environment, settings for production are different from development so, to start the application, we need to use the flag –settings to point to the correct file. It looks like that

But we can create aliases for commands that need to be executed, to do that, just create a file called package.json in the root of your project and create your aliases under “scripts”.

And them to execute them

And, in this case, to deploy

Another cool thing about package.json is that instead of install global modules we can install them locally and pointing to a specific version, eg: If you do that.

You can see an new entry called “dependencies” in your package.json

Now if a new developer join the team, there is no risk of using the wrong mup version.

Leave a Reply