Skip to content

Commit 5c7eb48

Browse files
committed
2.1.0 use core-js instead of bluebird
1 parent 61e532d commit 5c7eb48

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ A node.js wrapper for the docker command line tool
44
[![NPM](https://nodei.co/npm/docker-cli-js.png?downloads=true&downloadRank=true)](https://nodei.co/npm/docker-cli-js/)
55
[![NPM](https://nodei.co/npm-dl/docker-cli-js.png?months=6&height=3)](https://nodei.co/npm/docker-cli-js/)
66

7+
[![NPM version][npm-image]][npm-url]
8+
[![NPM downloads][downloads-image]][downloads-url]
9+
710
## Installation
811

912
### Step 1: Prerequisites
@@ -24,7 +27,7 @@ var Docker = dockerCLI.Docker;
2427

2528
## Usage
2629

27-
With promise
30+
### With promise
2831

2932
```js
3033
var options = new DockerOptions(
@@ -108,7 +111,7 @@ With promise
108111
//}
109112
```
110113

111-
With callback:
114+
### With callback:
112115

113116
```js
114117
var docker = new Docker();
@@ -120,7 +123,7 @@ With callback:
120123

121124
```
122125

123-
Typescript
126+
### Typescript
124127

125128
```ts
126129
import { Docker, Options } from 'docker-cli-js';
@@ -543,4 +546,14 @@ docker.command('info').then(function (data) {
543546
// name: 'atomix',
544547
// id: '3KBH:CSNL:ZFBD:7HG4:QHTG:LXN5:37YQ:TUXL:KJGP:JFL7:JLVU:77PL',
545548
// username: 'quobject',
546-
// registry: 'https://index.docker.io/v1/' } }
549+
// registry: 'https://index.docker.io/v1/' } }
550+
551+
552+
## License
553+
554+
MIT
555+
556+
[npm-image]: https://img.shields.io/npm/v/docker-cli-js.svg?style=flat
557+
[npm-url]: https://npmjs.org/package/docker-cli-js
558+
[downloads-image]: https://img.shields.io/npm/dm/docker-cli-js.svg?style=flat
559+
[downloads-url]: https://npmjs.org/package/docker-cli-js

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docker-cli-js",
3-
"version": "2.0.7",
3+
"version": "2.1.0",
44
"description": "A node.js wrapper for the docker command line interface CLI",
55
"main": "dist/index.js",
66
"typings": "dist/index",
@@ -30,17 +30,17 @@
3030
"homepage": "https://github.com/Quobject/docker-cli-js",
3131
"devDependencies": {
3232
"blue-tape": "^0.2.0",
33-
"bluebird": "^3.4.0",
3433
"rimraf": "^2.5.2",
3534
"tap-diff": "^0.1.1",
3635
"ts-node": "^0.7.3",
3736
"tslint": "^3.10.2",
3837
"typescript": "^1.8.10"
3938
},
4039
"dependencies": {
41-
"bluebird": "^3.4.0",
4240
"cli-table-2-json": "^1.0.8",
43-
"dockermachine-cli-js": "^2.0.4",
44-
"lodash": "^4.12.0"
41+
"dockermachine-cli-js": "^3.0.2",
42+
"lodash": "^4.12.0",
43+
"core-js": "^2.4.0",
44+
"nodeify-ts": "^1.0.1"
4545
}
4646
}

src/index.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* tslint:disable:no-shadowed-variable */
22
/* tslint:disable:no-unused-variable */
33
import test = require('blue-tape');
4-
import * as Promise from 'bluebird';
54
import * as path from 'path';
65
import { Docker, Options } from './index';
76
const config = require('../my_config.json');

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as _ from 'lodash';
2-
import * as Promise from 'bluebird';
32
import * as child_process from 'child_process';
43
import * as os from 'os';
4+
import nodeify from 'nodeify-ts';
55
import { cliTable2Json } from 'cli-table-2-json';
66
import { DockerMachine } from 'dockermachine-cli-js';
77
const exec = child_process.exec;
@@ -149,7 +149,7 @@ export class Docker {
149149
let execCommand = 'docker ';
150150
let machineconfig = '';
151151

152-
return Promise.resolve().then(function () {
152+
const promise = Promise.resolve().then(function () {
153153
if (docker.options.machineName) {
154154

155155
const dockerMachine = new DockerMachine();
@@ -195,7 +195,9 @@ export class Docker {
195195
};
196196
return extractResult(result);
197197

198-
}).nodeify(callback);
198+
});
199+
200+
return nodeify(promise, callback);
199201
}
200202
}
201203

typings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"dependencies": {
3-
"bluebird": "registry:npm/bluebird#3.3.4+20160515010139",
43
"typescript": "npm:typescript"
54
},
65
"globalDependencies": {
6+
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
77
"lodash": "registry:dt/lodash#3.10.0+20160330154726",
88
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#48c1e3c1d6baefa4f1a126f188c27c4fefd36bff"
99
},

0 commit comments

Comments
 (0)