<commit_before># Mantra CLI

[![Build Status](https://travis-ci.org/sungwoncho/mantra-cli.svg?branch=master)](https://travis-ci.org/sungwoncho/mantra-cli)

A command line interface for developing Meteor apps using [Mantra](https://github.com/kadirahq/mantra).


## Installation

    npm install -g mantra-cli


## Commands

The available commands are:

* create
* generate

Currently, CLI expects you to be in the app root directory.


### mantra create [path]
*Note: You can also use the alias "c":* `mantra c [path]`

Create a Meteor application using Mantra spec under `path`.

### mantra generate [type] [name]
*Note: You can also use the alias "g":* `mantra g [type] [name]`

Generate a file of `type` and name specified `name`.

**type**

Possible values are:

* action
* component
* container
* collection
* method
* publication

For `container`, the command generates `container`, and then also generates the
corresponding `component`.

**name**

If the `type` is one of `action`, `component`, or `container`, the name should
follow the format `moduleName:entityName`. This is because Mantra is modular
on the client side, and all files of those types should belong to a module.

*Example*

    mantra generate component core:posts
    mantra generate publication users
    mantra generate method comments

#### Automatic update to index.js

For `action`, `collection`, `method`, and `publication`, the command
automatically updates a `index.js` file to automatically include the newly
generated file.

*Example*

    $ mantra generate action core:users
      create  ./client/modules/core/actions/users.js
      update  ./client/modules/core/actions/index.js

*./client/modules/core/actions/users.js*
```js
export default {

}
```

*./client/modules/core/actions/index.js*
```js
import users from './users';

export default {
  users
};
```

## License
<commit_msg>Document remove command and improve doc<commit_after># Mantra CLI

[![Build Status](https://travis-ci.org/sungwoncho/mantra-cli.svg?branch=master)](https://travis-ci.org/sungwoncho/mantra-cli)

A command line interface for developing Meteor apps using [Mantra](https://github.com/kadirahq/mantra).


## Installation

    npm install -g mantra-cli


## Documentation

The available commands are:

* [create](https://github.com/mantrajs/mantra-cli#mantra-create-path)
* [generate](https://github.com/mantrajs/mantra-cli#mantra-generate-type-name)
* [destroy](https://github.com/mantrajs/mantra-cli#mantra-destroy-type-name)

Currently, CLI expects you to be in the app root directory.

---------------------------------------

### mantra create [path]
*alias: c*

Create a Meteor application using Mantra spec under `path`.

It creates a Meteor app, prepares the directories and files, adds Meteor and
NPM dependencies, and installs the NPM dependencies.

---------------------------------------

### mantra generate [type] [name]
*alias: g*

Generate a file of `type` and name specified `name`.

#### type

Possible values are:

* `action`
* `component`

By default, a stateless component is generated. By using `--use-class` option
(alias `-uc`), you can generate a ES2015 class extending `React.Component`.

* `container`

Generates a `container` and its corresponding `component`.

* `collection`
* `method`
* `publication`
* `module`


#### name

If the `type` is one of `action`, `component`, or `container`, the name should
follow the format `moduleName:entityName`. This is because Mantra is modular
on the client side, and all files of those types belong to a module.

*Example*

    mantra generate component core:posts
    mantra generate publication users
    mantra generate method comments

**Automatic update to index.js**

For `action`, `collection`, `method`, and `publication`, the command automatically
inserts `import` and `export` statements to the relevant `index.js` file.

---------------------------------------

### mantra destroy [type] [name]
*alias: d*

Destroys all files that its counterpart `mantra generate` command would generate.
You can provide all `types` supported by the `generate` commans.

**This command removes files.**

---------------------------------------

## Contributor Guide

* Clone this repository and run `npm install`.
* Write your code under `/lib`.
* `npm run-script compile` compiles your ES2015 code in `/lib` into `/dist`.
* `npm test` compiles the code and runs the tests.


## License

{'fraction_non_alphanumeric': 0.14799728445349628, 'fraction_numerical': 0.0018103643358225842, 'mean_word_length': 3.6624472573839664, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6374751', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1277, 'n_words': 480}