# How do I author a library for consumption in ember-cli?

**URL:** https://discuss.emberjs.com/t/how-do-i-author-a-library-for-consumption-in-ember-cli/7395
**Category:** Ember CLI
**Created:** [February 24, 2015, 12:44am UTC](https://discuss.emberjs.com/t/how-do-i-author-a-library-for-consumption-in-ember-cli/7395 "2015-02-24T00:44:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![blakeley](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/blakeley/32/9806_2.png) [@blakeley](https://discuss.emberjs.com/u/blakeley)
#### Post date: [February 24, 2015, 12:44am UTC](https://discuss.emberjs.com/t/how-do-i-author-a-library-for-consumption-in-ember-cli/7395/1 "2015-02-24T00:44:57Z")

</div>

I’m developing a library for use in an ember app. The library consists of a few files, each of which contains a single class. Some classes depend on others, and I’m importing the needed classes with something like `var libClass = require('../libClass');`. I’ve compiled this library with Browserify, pushed this library to github, required and installed it through `bower.json`, and successfully imported it in `Brocfile.js` with `app.import('bower_components/mylib/dist/mylib.js')`. This makes it available in my ember-cli app as a **global** , but I want it available through **es6 imports** so I can import it only where needed, and only which parts as needed. I’m open to replacing the `require` syntax with es6 syntax in the library, but I need my automated tests to run a single command (currently `npm test` or `./node_modules/mocha/bin/mocha`). How do I make this happen?
