Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-cli-deploy-plugin

ember-cli-deploy134.2kMIT0.2.9

For building plugins for ember-cli-deploy

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

changelog

Change Log

0.2.9 (2016-11-21)

Full Changelog

Merged pull requests:

v0.2.8 (2016-11-21)

Full Changelog

Merged pull requests:

v0.2.7 (2016-11-21)

Full Changelog

[BREAKING] This release changes the context of this within a user-defined config property function from the base plugin itself to the surrounding config object. This behavior was previously inconsistent.

Merged pull requests:

v0.2.6 (2016-04-19)

Full Changelog

Merged pull requests:

v0.2.5 (2016-04-01)

Full Changelog

Merged pull requests:

v0.2.4 (2016-04-01)

Full Changelog

Merged pull requests:

v0.2.3 (2016-03-29)

Full Changelog

Merged pull requests:

v0.2.2 (2016-02-06)

Full Changelog

Merged pull requests:

  • ember cli uses the wrong spelling from originalOutputStream #7 (ghedamat)

v0.2.1 (2016-01-24)

Full Changelog

Merged pull requests:

  • ensure that we start logging from the beginning of the line #6 (ghedamat)

v0.2.0 (2015-10-24)

Full Changelog

Merged pull requests:

  • Add verbose option support to log method, and update docs #2 (lukemelia)

v0.1.3 (2015-08-04)

Full Changelog

Merged pull requests:

  • Call default getters in plugin context #1 (dschmidt)

v0.1.2 (2015-07-17)

Full Changelog

v0.1.1 (2015-07-12)

* This Change Log was automatically generated by github_changelog_generator