marmothq-cli
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,56 +7,7 @@ 'use strict'; | ||
const urllib = require('urllib'); | ||
const iosUtils = require('ios-utils'); | ||
const istanbul = require('macaca-istanbul'); | ||
const g2js = require('gradle-to-js/lib/parser'); | ||
const iosGen = require('./ios/gen'); | ||
const _ = utils.merge({}, utils); | ||
/** | ||
* is path a regular file | ||
* @type Node.js | ||
* @returns {boolean} returns true if the path is regular file, otherwise false | ||
* @method isExistedFile | ||
*/ | ||
/** | ||
* is path a file system directory | ||
* @type Node.js | ||
* @returns {boolean} returns true if the path is a directory, otherwise false | ||
* @method isExistedDir | ||
*/ | ||
/** | ||
* A `rm -rf` util for nodejs | ||
* @see {@link https://github.com/isaacs/rimraf#rimrafsync} | ||
* @method rimraf | ||
*/ | ||
/** | ||
* Node.js implementation of port detector | ||
* @see {@link https://github.com/node-modules/detect-port} | ||
* @method detectPort | ||
*/ | ||
/** | ||
* Portable Unix shell commands for Node.js | ||
* @see {@link https://github.com/shelljs/shelljs} | ||
* @method shelljs | ||
*/ | ||
/** | ||
* Synchronously create a new directory and any necessary subdirectories at dir with octal permission string opts.mode. If opts is a non-object, it will be treated as the opts.mode. | ||
* @see {@link https://github.com/substack/node-mkdirp#mkdirpsyncdir-opts} | ||
* @method mkdir | ||
*/ | ||
/** | ||
* Parse, validate, manipulate, and display dates and times | ||
* @see {@link https://momentjs.com/} | ||
* @class moment | ||
*/ | ||
/** | ||
* get marmot home path | ||
@@ -82,3 +33,2 @@ * @type Node.js | ||
/** | ||
@@ -171,58 +121,2 @@ * get marmot is running in docker | ||
/** | ||
* ios utils namespace | ||
* @namespace {object} iosUtils | ||
*/ | ||
_.iosUtils = iosUtils; | ||
/** | ||
* ios file genertors namespace | ||
* @namespace iosGen | ||
* @memberof iosUtils | ||
*/ | ||
iosUtils.iosGen = iosGen; | ||
/** | ||
* generate the ios plist.info file content | ||
* @type Node.js | ||
* @returns {String} plist.info file string | ||
* @method genPlist | ||
* @memberof iosUtils.iosGen | ||
* @param {Object} options | ||
* @param {string} options.url assets url | ||
* @param {string} options.bundleIdentifier metadata bundle-identifier | ||
* @param {string} options.bundleVersion meatadata bundle-version | ||
* @param {string} options.title meatadata bundle-title | ||
*/ | ||
/** | ||
* generate the download HTML file content string | ||
* @type Node.js | ||
* @returns {String} HTML doc string containing a download link | ||
* @method genDownloadHtml | ||
* @memberof iosUtils.iosGen | ||
* @param {Object} options | ||
* @param {string} options.url download url | ||
*/ | ||
/** | ||
* android utils | ||
* @namespace | ||
*/ | ||
_.androidUtils = { | ||
/** | ||
* parse gradle config | ||
* @param {String} content gradle config text content | ||
* @type Node.js | ||
* @returns {Object} gradle config js object | ||
*/ | ||
parseGradle: content => { | ||
return new Promise((resolve) => { | ||
g2js.parseText(content) | ||
.then(representation => { | ||
resolve(representation); | ||
}); | ||
}); | ||
}, | ||
}; | ||
/** | ||
* web utils | ||
@@ -229,0 +123,0 @@ * @namespace |
{ | ||
"name": "marmothq-cli", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "command-line interface for Marmot", | ||
@@ -9,3 +9,3 @@ "keywords": [ | ||
"bin": { | ||
"marmot": "./bin/marmot-cli.js" | ||
"marmot": "./bin/marmothq-cli.js" | ||
}, | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/MarmotHQ/marmot-cli.git" | ||
"url": "https://github.com/MarmotHQ/marmothq-cli.git" | ||
}, | ||
@@ -21,4 +21,2 @@ "dependencies": { | ||
"globby": "^8.0.1", | ||
"gradle-to-js": "^1.1.0", | ||
"ios-utils": "^1.0.7", | ||
"last-commit-log": "^1.0.12", | ||
@@ -32,12 +30,14 @@ "macaca-istanbul": "^1.0.5", | ||
"cheerio": "^1.0.0-rc.2", | ||
"eslint": "^4.19.1", | ||
"eslint-config-antife": "^1.0.2", | ||
"eslint": "^5.12.1", | ||
"eslint-config-antife": "^2.0.0", | ||
"husky": "^1.3.1", | ||
"intelli-espower-loader": "^1.0.1", | ||
"jsdoc": "^3.5.5", | ||
"lint-staged": "^8.1.1", | ||
"minami": "^1.1.1", | ||
"mocha": "^5.2.0", | ||
"np": "^4.0.2", | ||
"nyc": "^12.0.2", | ||
"power-assert": "^1.6.0", | ||
"pre-commit": "^1.2.2", | ||
"sinon": "^6.0.0" | ||
"sinon": "^7.2.3" | ||
}, | ||
@@ -50,7 +50,16 @@ "scripts": { | ||
"test-debug": "nyc --reporter=lcov --reporter=text mocha; open coverage/lcov-report/index.html", | ||
"lint": "eslint . --fix" | ||
"lint": "eslint . --fix", | ||
"prepublishOnly": "np --yolo --no-publish" | ||
}, | ||
"pre-commit": [ | ||
"lint" | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"eslint --fix", | ||
"git add" | ||
] | ||
}, | ||
"engines": { | ||
@@ -57,0 +66,0 @@ "node": ">=8" |
@@ -1,2 +0,2 @@ | ||
# marmot-cli | ||
# marmothq-cli | ||
@@ -9,12 +9,12 @@ [![NPM version][npm-image]][npm-url] | ||
[npm-image]: https://img.shields.io/npm/v/marmot-cli.svg?style=flat-square | ||
[npm-url]: https://npmjs.org/package/marmot-cli | ||
[travis-image]: https://img.shields.io/travis/MarmotHQ/marmot-cli.svg?style=flat-square&logo=travis | ||
[travis-url]: https://travis-ci.org/MarmotHQ/marmot-cli | ||
[codecov-image]: https://img.shields.io/codecov/c/github/MarmotHQ/marmot-cli.svg?style=flat-square | ||
[codecov-url]: https://codecov.io/gh/MarmotHQ/marmot-cli | ||
[npm-image]: https://img.shields.io/npm/v/marmothq-cli.svg?style=flat-square | ||
[npm-url]: https://npmjs.org/package/marmothq-cli | ||
[travis-image]: https://img.shields.io/travis/MarmotHQ/marmothq-cli.svg?style=flat-square&logo=travis | ||
[travis-url]: https://travis-ci.org/MarmotHQ/marmothq-cli | ||
[codecov-image]: https://img.shields.io/codecov/c/github/MarmotHQ/marmothq-cli.svg?style=flat-square | ||
[codecov-url]: https://codecov.io/gh/MarmotHQ/marmothq-cli | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_8-green.svg?style=flat-square | ||
[node-url]: http://nodejs.org/download/ | ||
[download-image]: https://img.shields.io/npm/dm/marmot-cli.svg?style=flat-square | ||
[download-url]: https://npmjs.org/package/marmot-cli | ||
[download-image]: https://img.shields.io/npm/dm/marmothq-cli.svg?style=flat-square | ||
[download-url]: https://npmjs.org/package/marmothq-cli | ||
@@ -26,3 +26,3 @@ > command-line interface for Marmot | ||
```bash | ||
$ npm i marmot-cli -g | ||
$ npm i marmothq-cli -g | ||
``` | ||
@@ -61,24 +61,7 @@ | ||
```javascript | ||
const helper = require('marmot-cli').helper; | ||
const { | ||
iosUtils, | ||
androidUtils, | ||
webUtils, | ||
} = helper; | ||
const helper = require('marmothq-cli').helper; | ||
const { webUtils } = helper; | ||
``` | ||
### Integration Samples | ||
- [ios-app-bootstrap](//github.com/app-bootstrap/ios-app-bootstrap) | ||
- [android-app-bootstrap](//github.com/app-bootstrap/android-app-bootstrap) | ||
- [awesome-practice-projects](//github.com/app-bootstrap/awesome-practice-projects) | ||
- [web-app-bootstrap](//github.com/app-bootstrap/web-app-bootstrap) | ||
Example for ios-app-bootstrap: | ||
```bash | ||
$ MARMOT_SERVER_URL=http://127.0.0.1:9900 ci.sh | ||
``` | ||
## Environment Variable | ||
@@ -85,0 +68,0 @@ |
7
8
1
17146
13
15
481
73
- Removedgradle-to-js@^1.1.0
- Removedios-utils@^1.0.7
- Removedbig-integer@1.6.52(transitive)
- Removedbplist-parser@0.1.1(transitive)
- Removeddevicelog@1.0.9(transitive)
- Removedgradle-to-js@1.2.1(transitive)
- Removedios-utils@1.0.9(transitive)
- Removedlodash.merge@4.6.1(transitive)
- Removedmacaca-utils@1.0.1(transitive)