Skip to content

denar90/atom-marionettejs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MarionetteJS CLI package for atom

Atom package for generate marionette files. Based on MarionetteJS CLI

A screenshot of your package

##Features Add menu items to your Atom (Packages->atom-marionettejs-cli)

  • Generate app skeleton (best practices)

  • Generate backbone/marionette files

    • Model
    • Collection
    • ItemView
    • CollectionView
    • CompositeView
    • LayoutView
    • Behavior
    • Object
    • Router
  • Set module formats (RequireJS, CommonJS, ES6). Setting module type you choose module format for generated files.

####Where can I find generated file? If any file opened in editor - generated backbone.marionette file will be placed to the same folder as your active opened file.

Or

File will be placed in root of your project if any files were opened in your editor.

###Example

####Generate app

  • Run Packages->atom-marionettejs-cli->generate marionettejs application

Or

  • Click right mouse btn -> generate marionettejs application

####Generate file

  • Run Packages->atom-marionettejs-cli->generate marionettejs file->layout
  • Layout file with name marionette--layout.js will be created.

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

###TODO

  • write tests