MarionetteJS CLI package for atom
Atom package for generate marionette files. Based on MarionetteJS CLI
##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
});
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;
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;
});
###TODO
- write tests