Separate CLI
Original commit de780cbf2ca6ca400853d0d5f55347fed478ccb3
This commit is contained in:
Родитель
b37bd7ee62
Коммит
69d59ef57f
|
@ -22,13 +22,6 @@ $ npm start
|
|||
|
||||
The react app will live-reload when you edit any source.
|
||||
|
||||
## Install
|
||||
|
||||
```shell
|
||||
$ npm link
|
||||
$ quicktype https://blockchain.info/latestblock
|
||||
```
|
||||
|
||||
## Deploy
|
||||
|
||||
```shell
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/bundle.js
|
||||
node_modules
|
|
@ -0,0 +1,15 @@
|
|||
# quicktype
|
||||
|
||||
Quickly generate types from data
|
||||
|
||||
## Options
|
||||
|
||||
* `--src file|url` The JSON file or url to type.
|
||||
* `--lang cs` The target language.
|
||||
* `-h, --help` Get some help.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
$ quicktype --lang cs https://blockchain.info/latestblock > LatestBlock.cs
|
||||
```
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "quicktype",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"command-line-args": "^4.0.6",
|
||||
"command-line-usage": "^4.0.0",
|
||||
"shelljs": "^0.7.8",
|
||||
"stream-json": "0.5.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "cd .. && npm run bundle-cli",
|
||||
"patch-release": "npm version patch && npm publish"
|
||||
},
|
||||
"bin": "quicktype.js"
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const fs = require('fs');
|
||||
const shell = require("shelljs");
|
||||
const Main = require("../output/Main");
|
||||
const Main = require("./bundle");
|
||||
const makeSource = require("stream-json");
|
||||
const Assembler = require("stream-json/utils/Assembler");
|
||||
const commandLineArgs = require('command-line-args')
|
15
package.json
15
package.json
|
@ -2,26 +2,19 @@
|
|||
"name": "quicktype",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"command-line-args": "^4.0.6",
|
||||
"command-line-usage": "^4.0.0",
|
||||
"shelljs": "^0.7.8",
|
||||
"stream-json": "0.5.2"
|
||||
},
|
||||
"scripts": {
|
||||
"setup": "npm install && cd app && npm install",
|
||||
"build": "pulp build",
|
||||
"test": "pulp test && bin/test.js",
|
||||
"postinstall": "bower install && npm run build",
|
||||
"start": "cd app && npm start",
|
||||
"deploy": "cd app && npm run deploy"
|
||||
"deploy": "cd app && npm run deploy",
|
||||
"bundle-cli": "pulp browserify --standalone --skip-entry-point > /tmp/bundle.js && uglifyjs --compress -- /tmp/bundle.js > cli/bundle.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.8.0",
|
||||
"pulp": "^11.0.2",
|
||||
"purescript": "^0.11.6"
|
||||
},
|
||||
"bin": {
|
||||
"quicktype": "bin/quicktype.js"
|
||||
"purescript": "^0.11.6",
|
||||
"uglify-js": "^3.0.26"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче