Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kellyselden/ember-cli-rollup-packager
Rollup.js packager for Ember CLI
https://github.com/kellyselden/ember-cli-rollup-packager
Last synced: 16 days ago
JSON representation
Rollup.js packager for Ember CLI
- Host: GitHub
- URL: https://github.com/kellyselden/ember-cli-rollup-packager
- Owner: kellyselden
- License: mit
- Created: 2018-05-25T01:09:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T13:59:12.000Z (over 6 years ago)
- Last Synced: 2025-01-09T08:51:38.412Z (17 days ago)
- Language: JavaScript
- Size: 381 KB
- Stars: 14
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ember-cli-rollup-packager
[![npm version](https://badge.fury.io/js/ember-cli-rollup-packager.svg)](https://badge.fury.io/js/ember-cli-rollup-packager)
[![Build Status](https://travis-ci.org/kellyselden/ember-cli-rollup-packager.svg?branch=master)](https://travis-ci.org/kellyselden/ember-cli-rollup-packager)
[![Build status](https://ci.appveyor.com/api/projects/status/5pn7be6cvog1dg7e/branch/master?svg=true)](https://ci.appveyor.com/project/kellyselden/ember-cli-rollup-packager/branch/master)[Rollup.js](https://rollupjs.org) packager for [Ember CLI](https://ember-cli.com)
## Prerequisites
Make sure your app works with ember-cli master first.
## Installation
```
npm install --save-dev ember-cli-rollup-packager kellyselden/ember-cli#content-funnel cross-env
```## Usage
```js
// ember-cli-build.js
const rollupPackager = require('ember-cli-rollup-packager');module.exports = function(defaults) {
let app = new EmberApp(defaults, {
package: rollupPackager({
// options
})
});return app.toTree();
};
``````js
// package.json
{
"scripts": {
"packager": "cross-env EMBER_CLI_PACKAGER=true EMBER_CLI_DELAYED_TRANSPILATION=true",
"prebuild": "npm run packager",
"prestart": "npm run packager",
"pretest": "npm run packager"
}
}
```## Options
| Option | Description | Type | Examples | Default |
|---|---|---|---|---|
| `useNodeModules` | Search node_modules for imported modules. This is not on by default because shims can be mistaken for real modules. See option `externalImports` for more info. | `boolean` | | `false` |
| `additionalEntryPoints` | Prevent non-standard Ember code from being ejected. Some addons have their own conventions that you need to manually enter in. | `Array` of `String`s | `['app-tree-output/custom-file.js']` | `[]` |
| `includeEntireAppTree` | Include all non-standard Ember code from the "app" folder. This may be easier than using `additionalEntryPoints`, but eliminates some tree-shaking of the app. | `boolean` | | `false` |
| `externalImports` | Mark shims as external. This suppresses warnings and prevents a different module with the same name from being found in node_modules. | `Array` of `String`s | `['pretender']` | `[]` |
| `additionalRollupInputOptions` | Supply additional input options to affect the Rollup output. | `Object` | `{ treeshake: { pureExternalModules: true } }` | `{}` |