UNPKG

2.11 kBMarkdownView Raw
1# ember-lodash
2
3[![Build Status](https://travis-ci.org/levanto-financial/ember-lodash.svg?branch=master)](https://travis-ci.org/levanto-financial/ember-lodash)
4[![Dependency Status](https://david-dm.org/levanto-financial/ember-lodash.svg)](https://david-dm.org/levanto-financial/ember-lodash)
5[![devDependency Status](https://david-dm.org/levanto-financial/ember-lodash/dev-status.svg)](https://david-dm.org/levanto-financial/ember-lodash#info=devDependencies)
6[![Ember Observer Score](http://emberobserver.com/badges/ember-lodash.svg)](http://emberobserver.com/addons/ember-lodash)
7[![npm version](https://badge.fury.io/js/ember-lodash.svg)](http://badge.fury.io/js/ember-lodash)
8[![Code Climate](https://codeclimate.com/github/levanto-financial/ember-lodash/badges/gpa.svg)](https://codeclimate.com/github/levanto-financial/ember-lodash)
9
10This ember addon allows consumption of the [lodash](https://lodash.com/) library (its [ES6 module variant](https://github.com/lodash/lodash/tree/es)) in [ember-cli](http://ember-cli.com) apps.
11
12## Use
13
14First you install this addon
15
16```sh
17# ember-cli > 0.2.3
18ember install ember-lodash
19# ember-cli <= 0.2.3
20ember install:addon ember-lodash
21```
22
23And then in your ember.js app, you can import individual lodash modules freely
24
25```js
26import _string from 'lodash/string';
27
28let truncatedString = _string.trunc(rawString);
29```
30
31Additionally, if you wish to work with the entire lodash library on a single namespace, you have the option of importing that as well
32
33```js
34import _ from 'lodash/lodash';
35
36let truncatedString = _.trunc(rawString);
37```
38
39## Installation
40
41* `git clone` this repository
42* `npm install`
43* `bower install`
44
45## Running
46
47* `ember server`
48* Visit your app at http://localhost:4200.
49
50## Running Tests
51
52* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
53* `ember test`
54* `ember test --server`
55
56## Building
57
58* `ember build`
59
60For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
61
62![Analytics](https://ga-beacon.appspot.com/UA-66610985-1/mike-north/ember-lodash/readme)