Skip to content

Instantly share code, notes, and snippets.

@deanrad
Last active August 29, 2015 14:27
Show Gist options
  • Save deanrad/e994ae26175abfa9d27a to your computer and use it in GitHub Desktop.
Save deanrad/e994ae26175abfa9d27a to your computer and use it in GitHub Desktop.
Meteor package.json for fun and profit

Why use pacakge.json with Meteor ?

  • Keep the preferred port with the project
  • Each project need not run on port 3000 (Keep your favicon.ico from getting confused!)
  • Start up with settings.json in a conventional way
  • Install utils with your project, like spacejam, ESLint, etc..
  • Have a uniform interface between package projects and meteor apps

How to use it ?

Use aliases such as:

  • ms "Meteor start" - runs npm start
  • mtest "Meteor test" - runs npm run test
  • mls "Meteor ls" - runs npm run, listing all avaliable commands in package.json

Etc. Get creative.

How to install it ?

curl -L http://bit.ly/install-package-json | sh

# Run this file via:
# curl -L http://bit.ly/install-package-json | sh
curl -LO https://gist.githubusercontent.com/deanius/e994ae26175abfa9d27a/raw/package.json
curl -LO https://gist.githubusercontent.com/deanius/e994ae26175abfa9d27a/raw/settings.development.json
{
"name": "deanius-meteor-package-json",
"version": "0.1.0",
"description": "Manage settings, testing, deployment of your meteor app",
"scripts": {
"start": "meteor --port 3120 --settings settings.development.json",
"test": "spacejam test-packages ./",
"deploy": "meteor deploy your-site.meteor.com",
"view": "open http://your-site.meteor.com"
},
"repository": {
"type": "git",
"url": "https://gist.github.com/e994ae26175abfa9d27a.git"
},
"keywords": [
"meteor", "npm", "package.json"
],
"author": "Dean Radcliffe",
"license": "MIT",
"homepage": "https://gist.github.com/deanius/e994ae26175abfa9d27a",
"devDependencies": {
"spacejam": "^1.2.2"
}
}
@deanrad
Copy link
Author

deanrad commented Aug 28, 2015

Interesting - yes its' nice what you did breaking out the individual fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment