A starting point for Meteor applications with a basic folder structure and some files.
$ npm install
$ meteor
npm start
- start your meteor server with settings-development.jsonnpm run lint -s
- lint all javascript filesnpm run lint:fix -s
- lint all javascript files and autofix problems
Important: don't use
npm start
at this moment because of performance issues, read this discussion.
Note that -s option is a shortcut for --loglevel=silent that makes the log output a little tidier and hides npm errors if the script exits with an error status (non-zero exit code).
insecure and autopublish packages are removed.
standard-minifiers core package is removed in favor of seba:minifiers-autoprefixer, read this discussion about minifiers.
- meteorhacks:npm
- fourseven:scss (with sourcemaps)
- seba:minifiers-autoprefixer (standard minifiers + autoprefixer)
- chalk (enabled)
- reactive-var
- aldeed:collection2 (also includes aldeed:simple-schema)
.
├── client/ # Client folder
│ ├── compatibility/ # Legacy libraries that expect to be global
│ ├── lib/ # Code for the client to be loaded first
│ │ ├── helpers/
│ │ └── vendors/
│ ├── startup/ # Meteor.statup functions that will run as soon as the DOM is ready
│ ├── stylesheets/ # Sass files
│ └── templates/ # Contains all templates
│ ├── authenticated/ # Templates for logged-in users
│ ├── globals/ # Templates used globally like footer, header, loading template, 404...
│ ├── layouts/ # App layouts
│ └── public/ # Public templates
│
├── lib/ # Common code for client and server
│ ├── collections/ # Common collections
│ ├── helpers/ # Common helpers
│ └── routes/ # Routes
│
├── packages/ # npm modules defined in packages.json will be automatically added here
│ └── npm-container/
│
├── private/ # Private files that you don't want to be accessible from the outside
│
├── public/ # Public files like images, fonts, favicons...
│ ├── favicons/
│ ├── fonts/
│ └── images/
│
├── server/ # Server folder
│ ├── fixtures/ # Fixture data
│ ├── lib/ # Code for the server to be loaded first
│ │ └── helpers/
│ ├── methods/ # Meteor.methods definitions
│ ├── publications/ # Meteor.publish definitions
│ └── startup/ # Meteor.startup functions that will run when on server startup
│
├── tests/ # Local test code
│ └── jasmine/
│ ├── client/
│ └── server/
│
├── package.json # Defines project contents and useful scripts
├── packages.json # npm modules used by meteorhacks:npm package
├── postcss.json # Autoprefixer config
└── settings-development.json # Configuration data to be passed to meteor --settings
Don't push keys in your code, push them in settings file.
settings-development.json
should only contain values used for testing.settings-production.json
should only contain values used in production.
For security purposes settings-production.json
is ignored to prevent from being stored into version control.
An example of production file with Kadira keys:
{
"kadira": {
"appId": "<appId>",
"appSecret": "<appSecret>"
}
}
Read this article for more info about Meteor settings.
Language | Style guide | Linter |
---|---|---|
Sass | Sass guidelines | SCSS-Lint |
JavaScript | Airbnb | ESLint |
MIT © marioblas