0.3.9 • Published 9 years ago

marionette-cli v0.3.9

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

#Marionette CLI

Marionette CLI is the command line utility that provides RequireJS/CommonJS/ES6 app structure.

##Install

Run npm install -g marionette-cli or add dependency in your package.json file and run npm install

##Features

  • Generate app skeleton
  • Generate backbone/marionette files
  • Support different module types (RequireJS, CommonJS, ES6)

##Commands ###Set

set [options] <type>  Change module type. Short - s
Usage: set [options] <type>

Example: mt set rjs Example: mt s rjs

###New

new [options] Create new project. Short - n
Usage: new [options]

Example: mt new Example: mt n Example: mt n folderName - will genarate app in folderName folder

Command copying best practices (most stared examples of applications) from github.

####Generated files content

  • ES6 file content:
export default Marionette.LayoutView.extend({
	//stuff
	//Doc - http://marionettejs.com/docs/v2.4.4/marionette.layoutview.html
});

more

  • CommonJS file content:
"use strict";
var LayoutView = Marionette.LayoutView.extend({
	//stuff
	//Doc - http://marionettejs.com/docs/v2.4.4/marionette.layoutview.html
});
module.exports = LayoutView;

more

  • RequireJS file content:
define(['marionette'], function (Marionette) {
	"use strict";
	var LayoutView = Marionette.LayoutView.extend({
		//stuff
		//Doc - http://marionettejs.com/docs/v2.4.4/marionette.layoutview.html
	});
	return LayoutView;
});

more

####Projects:

###Generate

Usage: generate [options] [folder]
Generate files for marionette. Short - g

Options:

    -l --layout [name]       Layout
    -c --collection [name]   Collection
    -m --model [name]        Model
    -r --router [name]       Router
    -o --object [name]       Object or controller
    -v --itemView [name]     Item view
    --collectionView [name]  Collection view
    --compositeView [name]   Composite view

Example: mt generate -l - will create marionette layout file layout.js Example: mt g -l - the same as above

Example: mt generate -l myName - will create marionette layout file myName.js Example: mt g -l - the same as above

Example: mt generate -l myName myFolder - will create marionette layout file myName.js in folder myFolder Example: mt g -l myName myFolder - the same as above

###Using Atom as your IDE? Get lasy and use MarionetteJS CLI package for atom

###Want to run CLI from your code?

var cli = require('marionette-cli/lib/cli');

cli.run(['generate', '--help']);
0.3.9

9 years ago

0.3.8

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago