I want to introduce my code generator for marionettejs.

I decided to write my own code generator for MarionetteJS. There is already a generator for
yeoman , but below I will show and tell you about my generator written in NodeJS
So, let's begin. Install the generator globally:
')
npm install -g marionette-cli
The CLI generates marionettejs files of two types: RequireJS and CommonJS. You just need to tell the generator what type of files to generate. By default, RequireJS is set.
mt set js
Now all subsequent files will be CommonJS type.
You can generate files with the command:
mt generate -l myLayout appFolder
- The first parameter is the file type, layout, model, router, etc.
- The second parameter is the file name. If a file with the same name is present, the corresponding error will appear in the console.
- The third parameter is the folder in which the file will be generated. By default, the file is generated in the same directory as the generate command.
As a result, a marionette layout file in the appFolder folder will be generated.
The same generator can generate the skeleton of the application.
mt new
Future plans:
- Add es6 file generator
- Improve the skeleton of the application. Generate a fully working 'todo list' application for different types of modules
CLI is available on
github . I will be very glad to your comments, suggestions and pool requests.
Thanks for attention.