Skip to content

kenken17/npm-meteor-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-meteor-setup

Command line tool for creating basic Meteor app structure.

Installation

$ npm install -g meteor-setup

Commands

###create Create a new boilerplate Meteor project.

$ ms create <dir>

This will create a new Meteor project under the <dir> folder, with the default folder structure.

Options:

-f: force to overwrite/empty the existing folder.
-t <templateDir>: the path to user defined folder.

Default folder structure as below:

/
├── client/
│   ├── _layouts/
│   │   └── defaultLayout.html
│   ├── views/
│   │   └── main.html
├── lib/
│   └── route.js
├── server/ 		
│   └── *
├── collections/ 		
│   └── *
├── public/ 		
│   └── *
├── private/ 		
│   └── *

###init Initialize a project. This will copy over ms.json to the project.

$ ms init

Structure of the init file as below:

{
	"templates": {
		"viewPath": "/client/views",
		"collectionPath": "/collections"
	},

	"packages": {
		"remove": ["autopublish", "insecure"],
		"add": ["underscore", "iron:router", "reactive-var", "accounts-password"]
	}
}

###setup Setup a new project based on init file, if any. This will perform basic setup steps. I.e. adding packages and remove packages.

$ ms setup

###view Create a new view. If ms.json is missing, it will create one before this command.

$ ms view <name>

Options:

-p <path>: the path for collection to put into.
-r: also add a route for this view.

###collection Create a new collection. If ms.json is missing, it will create one before this command.

$ ms collection <name>

Options:

-p <path>: the path for collection to put into.
-m: create the collection with CRUD method appended.

About

Command line tool for creating basic Meteor app structure

Resources

Stars

Watchers

Forks

Packages

No packages published