# ember-cli-rollup

> Bundles modules imported in your app

Latest version **0.2.5** (published 2016-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-rollup
pnpm add ember-cli-rollup
yarn add ember-cli-rollup
bun add ember-cli-rollup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2016-10-24 |
| First published | 2016-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 14 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | apezel |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-cli-rollup
- Repository: https://github.com/apezel/ember-cli-rollup
- Homepage: https://github.com/apezel/ember-cli-rollup#readme
- Issues: https://github.com/apezel/ember-cli-rollup/issues
- npm.io page: https://npm.io/package/ember-cli-rollup

## Dependencies (14)

- [walk-sync](https://npm.io/package/walk-sync.md) ^0.3.1
- [typescript](https://npm.io/package/typescript.md) ^2.0.3
- [fs-tree-diff](https://npm.io/package/fs-tree-diff.md) ^0.5.2
- [broccoli-concat](https://npm.io/package/broccoli-concat.md) ^3.0.5
- [broccoli-rollup](https://npm.io/package/broccoli-rollup.md) ^1.0.3
- [broccoli-source](https://npm.io/package/broccoli-source.md) ^1.1.0
- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^5.1.6
- [rollup-plugin-babel](https://npm.io/package/rollup-plugin-babel.md) ^2.6.1
- [broccoli-merge-trees](https://npm.io/package/broccoli-merge-trees.md) ^1.1.4
- [broccoli-file-creator](https://npm.io/package/broccoli-file-creator.md) ^1.1.1
- [rollup-plugin-commonjs](https://npm.io/package/rollup-plugin-commonjs.md) ^5.0.5
- [rollup-plugin-node-globals](https://npm.io/package/rollup-plugin-node-globals.md) ^1.0.9
- [rollup-plugin-node-resolve](https://npm.io/package/rollup-plugin-node-resolve.md) ^2.0.0
- [rollup-plugin-node-builtins](https://npm.io/package/rollup-plugin-node-builtins.md) ^2.0.0

## Recent versions

- 0.2.5 (latest) — 2016-10-24
- 0.2.4 — 2016-10-22
- 0.1.1 — 2016-10-21

## README

ember-cli-rollup
==============================================================================

Say goobye to shims !
Automatically embed modules imported from your source code. No need to prefix imports like ember-browserify does.
*This addon is still experimental and may need more tests and optimizations. Tested with d3, moment, lodash and date-now.*

WARNING : ember-cli-rollup may require the latest version of [loader.js](https://github.com/ember-cli/loader.js), especially if you plan to use named or namespace imports.

Installation
------------------------------------------------------------------------------

```
npm install --save-dev ember-cli-rollup
```

What it does
------------------------------------------------------------------------------

`ember-cli-rollup` :
- parses sources under app/ and detects imports that are not ember's aliases or yet installed addons
- supports namespace, default and named imports
- exports everything into a single self executing module that will re-exports everything into separate modules
- prevent code duplication through exported modules

Usage
------------------------------------------------------------------------------

This section is using [D3](https://github.com/d3/d3) as an example of how
to build custom bundles for your app.

1.  Install the packages that you want to use via NPM and save them as
    dependencies in your `package.json` file:

    ```
    npm install --save-dev d3-selection d3-scale d3-axis
    ```

2.  Use d3 in your app

    ```js
    import { scaleLinear, scaleTime } from 'd3-scale';
    import { axisBottom, axisLeft } from 'd3-axis';
    import { select } from 'd3-selection';
    ```

3.  And that's it ! All required modules parts will be bundled

4.  Configure. In your `ember-cli-build.js` file you can configure the rollup general build options or isolate a module and pass specific options to it.

    ```js
    var app = new EmberApp(defaults, {
      'ember-cli-rollup': {

        excludes: ["some module to exclude from bundle"],
        trace: true, //writes generated exports to console, default false

        global: {
          sourceMap: false //default: true
          /* global build settings */
        },

        standalone: {
           "d3-scale": { //d3-scale will be bundled apart : define('d3-scale', ...) { ... }
           /* module specific build settings */
          }
        }
      }
    });
    ```

History
------------------------------------------------------------------------------

This addon was inspired by Turbo87/ember-cli-rollup

License
------------------------------------------------------------------------------
This project is licensed under the [MIT License](LICENSE.md).

---
_Source: https://npm.io/package/ember-cli-rollup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
