<commit_before># Ember-cerebral

Installation
--------------
- `ember install ember-cerebral`

- `ember g services cerebral`

  At installation, a default generator will run, creating an initializer at:
`app/initializers/cerebral`. This initializer `import`s cerebral packages
from npm and injects Cerebral into your app components and routes.

  The `services` generator will generate an instance initializer, giving you access to
the cerebral controller so you can inject services (ajax, ember-data, etc) into Cerebral

- `npm install ember-browserify --save-dev` - necessary for loading npm packages

- `npm install cerebral cerebral-model-baobab cerebral-module-devtools --save`

Usage
--------
Expose Cerebral state to your component using the `CerebralMixin`:

```js
// in component x-foo.js

import CerebralMixin from 'ember-cerebral/mixins/cerebral-mixin';

export default Ember.Component.extend(CerebralMixin, {
  cerebralProps() {
    userName: 'path.to.cerebral.userName'
  }
});
```

State is available as props on the component (and routes):

```js
// in component foo.js

excitedUserName: Ember.computed('userName', function() {
  return `${this.get('userName')}!!!!!!`;`
})
```

Trigger signals to change state:
```js
actions: {
  buttonClicked() {
    this.get('signals').buttonClicked();
  }
}
```




-----------------
For more information on using ember-cli, visit [http://ember-cli.com/](http://ember-cli.com/).<commit_msg>Add thanks and short description.<commit_after># Ember Cerebral

Enhanced state management for complex Ember apps using [Cerebral](http://www.cerebraljs.com/).

Installation
--------------
- `ember install ember-cerebral`

- `ember g services cerebral`

  At installation, a default generator will run, creating an initializer at:
`app/initializers/cerebral`. This initializer `import`s cerebral packages
from npm and injects Cerebral into your app components and routes.

  The `services` generator will generate an instance initializer, giving you access to
the cerebral controller so you can inject services (ajax, ember-data, etc) into Cerebral.

- `npm install ember-browserify --save-dev` - necessary for loading npm packages

- `npm install cerebral cerebral-model-baobab cerebral-module-devtools --save`

Usage
--------

Check out the example [TodoMVC app HERE!](https://github.com/bfitch/ember-cerebral-todomvc)

Expose Cerebral state to your component using the `CerebralMixin`:

```js
// in component x-foo.js

import CerebralMixin from 'ember-cerebral/mixins/cerebral-mixin';

export default Ember.Component.extend(CerebralMixin, {
  cerebralProps() {
    userName: 'path.to.cerebral.userName'
  }
});
```

State is available as props on the component (and routes):

```js
// in component foo.js

excitedUserName: Ember.computed('userName', function() {
  return `${this.get('userName')}!!!!!!`;`
})
```

Trigger signals to change state:
```js
actions: {
  buttonClicked() {
    this.get('signals').buttonClicked();
  }
}
```

Thanks
----------
Thanks to <NAME> (@toranb) who's [screencast](https://vimeo.com/160234990) on [ember-redux](https://github.com/toranb/ember-redux) inspired this integration.


-----------------
For more information on using ember-cli, visit [http://ember-cli.com/](http://ember-cli.com/).
{'fraction_non_alphanumeric': 0.14639364303178484, 'fraction_numerical': 0.0027506112469437654, 'mean_word_length': 3.9666160849772383, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, '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': '582319', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1000, 'n_words': 308}