📜 ⬆️ ⬇️

CLI for MarionetteJS

I want to introduce my code generator for marionettejs.

image

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 


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:


CLI is available on github . I will be very glad to your comments, suggestions and pool requests.

Thanks for attention.

Source: https://habr.com/ru/post/273779/


All Articles