# ember-cli-deploy-sh

> The default blueprint for ember-cli addons.

Latest version **0.3.1** (published 2018-06-08) · MIT license · 0 weekly downloads

## Install

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

## 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.3.1 |
| Published | 2018-06-08 |
| First published | 2016-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.2.0 |
| Dependencies | 6 |
| Unpacked size | 208.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | joebartels |
| Keywords | ember-addon, ember-cli-deploy-plugin |

## Links

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

## Dependencies (6)

- [rsvp](https://npm.io/package/rsvp.md) ^4.8.2
- [dargs](https://npm.io/package/dargs.md) 4.1.0
- [strip-ansi](https://npm.io/package/strip-ansi.md) 3.0.1
- [shell-escape](https://npm.io/package/shell-escape.md) 0.2.0
- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^6.12.0
- [ember-cli-deploy-plugin](https://npm.io/package/ember-cli-deploy-plugin.md) 0.2.9

## Recent versions

- 0.3.1 (latest) — 2018-06-08
- 0.3.0 — 2018-04-17
- 0.2.7 — 2018-02-09
- 0.2.6 — 2017-03-21
- 0.2.5 — 2017-03-01
- 0.2.4 — 2016-11-30
- 0.2.3 — 2016-11-30
- 0.2.2 — 2016-11-29
- 0.2.1 — 2016-11-29
- 0.2.0 — 2016-11-06

## README

[![Build Status](https://travis-ci.org/joebartels/ember-cli-deploy-sh.svg?branch=master)](https://travis-ci.org/joebartels/ember-cli-deploy-sh)

# Ember-cli-deploy-sh
> An ember-cli-deploy plugin to run shell commands during deploy.

## Configuration Options

### hooks
Supports all will* and did* hooks:<br>
`willDeploy`, `willBuild`, `willPrepare`, `willUpload`, `willActivate`<br>
`didBuild`, `didPrepare`, `didUpload`, `didActivate`, `didDeploy`, `didFail`

Each hook takes an array of tasks
```js
config/deploy.js

ENV.sh = {
  hooks: {
    willDeploy: [ {task} ]
  }
};
```


### task
A task is a shell commands defined in a JS Object. 

**`command`**
* the shell command to execute

**`options`**
* the arguments to include with the shell command
* are passed directly into [dargs](https://github.com/sindresorhus/dargs#usage) during formatting

This is an example of a task that makes a curl request:
```js
// config/deploy.js

require('dotenv').load(); // ember-cli-deploy v0.6.0x has native support for .env
var querystring = require('querystring');

Env.sh = {
  hooks: {
    didDeploy: [
      {
        command: 'curl',
        options: {
          request: 'POST',
          form: ['file=@dist-deploy/index.html', 'version=' + process.env.VERSION,
          verbose: true,
          url: buildURL('https://api.com/new-release', { pass: process.env.PASSWORD })
        }
      }      
    ]
  }
};

function buildURL(url, options) {
  return url + '?' + querystring.stringify(options);
}
```

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