# cca-delegate

> Chrome Mobile Apps command delegate for using in programmatically on gulp/Grunt plug-ins

Latest version **1.0.0** (published 2016-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install cca-delegate
pnpm add cca-delegate
yarn add cca-delegate
bun add cca-delegate
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-07-16 |
| First published | 2015-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ragingwind |
| Maintainers | ragingwind |
| Keywords | cca-delegate, cca, Chrome Mobile Apps, Chrome Apps |

## Links

- npm: https://www.npmjs.com/package/cca-delegate
- Repository: https://github.com/ragingwind/cca-delegate
- Homepage: https://github.com/ragingwind/cca-delegate#readme
- Issues: https://github.com/ragingwind/cca-delegate/issues
- npm.io page: https://npm.io/package/cca-delegate

## Dependencies (9)

- [q](https://npm.io/package/q.md) ^1.4.1
- [cpy](https://npm.io/package/cpy.md) ^4.0.1
- [execa](https://npm.io/package/execa.md) ^0.4.0
- [lodash](https://npm.io/package/lodash.md) ^4.13.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [semver](https://npm.io/package/semver.md) ^5.2.0
- [archiver](https://npm.io/package/archiver.md) ^1.0.0
- [exec-then](https://npm.io/package/exec-then.md) ^1.3.1
- [cordova-linkto](https://npm.io/package/cordova-linkto.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2016-07-16
- 0.2.0 — 2016-07-14
- 0.1.2 — 2016-01-06
- 0.1.1 — 2015-09-23
- 0.1.0 — 2015-09-23
- 0.0.15 — 2015-08-22
- 0.0.14 — 2015-06-10
- 0.0.13 — 2015-06-09
- 0.0.11 — 2015-03-11
- 0.0.10 — 2015-03-11
- 0.0.9 — 2015-03-10
- 0.0.8 — 2015-02-25
- 0.0.7 — 2015-02-22
- 0.0.6 — 2015-02-17
- 0.0.5 — 2015-02-15
- … 1 more at https://npm.io/package/cca-delegate/versions

## README

# cca-delegate

> node module for cca (Chrome Mobile Apps) delegate to use programmatically on gulp/Grunt plug-ins and node modules

## WARNING

It's still in experimental. Currently, cca doesn't support a official way of using cca programmatically in source code. This node module will return result of execution of cca whether true or false after parsing stdio string getting came from cca execution. However the result of execution could be changed by updating of cca that mean is `cca-delegate` could has risk factors

### Deprecated

- searchPlugins: Because of cca 0.8.1 return timeout without any result

## Install

```sh
$ npm install --save cca-delegate
```

## Methods

`cca-delegate` exports methods with `cca` commands and arguments. You can find more information from [cca](https://www.npmjs.com/package/cca) and [test](./test) at this repository. Options of common execution is based on [exec-then](http://goo.gl/lEn3L8)

- version: `cca --v`
- checkenv: `cca checkenv`,
- create: `cca MyApp com.company.my-app`
- addPlatform: `cca platform add android`
- removePlatform: `cca platform rm android`
- getPlatform: `cca platform ls`
- updatePlatform: `cca platform update android`
- getPlugins: `cca plugin ls`
- searchPlugins: `cca plugin search <keyword>`
- build: `cca build android`
- run: `cca run --debug --watch android` or `cca emulate --debug android`
  + linkto: `String`, You can change www link of cordova project that created with --link-to option
- packageup: package up for android and chrome with built the project

```js
const ccad = require('cca-delegate');

ccad.version().then(() => {
  // after job
});

ccad.create({directory: './', name: 'com.company.myapp'}).then(res => {
  // after job
});

ccad.run({platform: 'chrome', cwd:'./platform'}).then(() => {
  // after job
});
```

## Test

We recommend that run from each test for your purpose with ENV options. You can run `test:run` command with PLATFORM and TARGET environment variable for running of application

### Test APIs

```
npm test
```

### Test App Running with specific platform

```
PLATFORM=chrome npm run test:run
TARGET=192.168.0.2 npm run test:run
```

## License

MIT © [Jimmy Moon](http://github.com/ragingwind)

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