Original commit de780cbf2ca6ca400853d0d5f55347fed478ccb3
This commit is contained in:
David Siegel 2017-07-23 20:41:41 -07:00
Родитель b37bd7ee62
Коммит 69d59ef57f
6 изменённых файлов: 37 добавлений и 19 удалений

Просмотреть файл

@ -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

2
cli/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,2 @@
/bundle.js
node_modules

15
cli/README.md Normal file
Просмотреть файл

@ -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
```

15
cli/package.json Normal file
Просмотреть файл

@ -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')

Просмотреть файл

@ -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"
}
}