# ember-cli-deploy-plugin

> For building plugins for ember-cli-deploy

Latest version **0.2.9** (published 2016-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-deploy-plugin
pnpm add ember-cli-deploy-plugin
yarn add ember-cli-deploy-plugin
bun add ember-cli-deploy-plugin
```

## 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.9 |
| Published | 2016-11-21 |
| First published | 2015-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Luke Melia and ember-cli-deploy team |
| Maintainers | achambers, ghedamat, lukemelia |

## Links

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

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^1.0.0
- [core-object](https://npm.io/package/core-object.md) 2.0.6
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) ^4.5.0

## Recent versions

- 0.2.9 (latest) — 2016-11-21
- 0.2.8 — 2016-11-21
- 0.2.7 — 2016-11-21
- 0.2.6 — 2016-04-19
- 0.2.5 — 2016-04-01
- 0.2.4 — 2016-04-01
- 0.2.3 — 2016-03-29
- 0.2.2 — 2016-02-06
- 0.2.1 — 2016-01-24
- 0.2.0 — 2015-10-24
- 0.1.3 — 2015-08-04
- 0.1.2 — 2015-07-17
- 0.1.1 — 2015-07-12
- 0.1.0 — 2015-07-11

## README

# ember-cli-deploy-plugin

This NPM module exposes a base class that can be used by ember-cli-deploy plugins to streamline
implementation of a plugin.

## Usage

In your plugin's directory:

`npm install ember-cli-deploy-plugin --save`

In your plugin's `index.js` file:

```js
/* jshint node: true */
'use strict';

var DeployPluginBase = require('ember-cli-deploy-plugin');

module.exports = {
  name: 'ember-cli-deploy-awesomeness',

  createDeployPlugin: function(options) {
    var DeployPlugin = DeployPluginBase.extend({
      name: options.name,

      // note: most plugins can simply implement these next two properties and use
      // the base class' implementation of the `configure` hook
      defaultConfig: {
        someKey: 'defaultValue',
        anotherKey: function(context) {
          return context.anotherKey; // to use data added to the context by another plugin
        }
      },
      requiredConfig: ['awesomeApiKey'], // throw an error if this is not configured

      // implement any hooks appropriate for your plugin
      willUpload: function(context) {
        // Use the `readConfig` method for uniform access to this plugin's config,
        // whether via a dynamic function or a configured value
        var someValue     = this.readConfig('someKey');
        var anotherValue  = this.readConfig('anotherKey');
        var awesomeApiKey = this.readConfig('awesomeApiKey');

        // Use the `log` method to generate output consistent with the tree style
        // of ember-cli-deploy's verbose output
        this.log('output some awesomeness');
        this.log('output some red awesomeness', { color: 'red' });
        this.log('output this only when verbose option is enabled', { verbose: true });

        // Need to do something async? You can return a promise.
        // Need to fail out? Throw an error or return a promise which becomes rejected
        return Promise.resolve();
      },
    });
    return new DeployPlugin();
  }
};

## TODO

Tests

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