mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Add docker wrapper to be able to use it as a cli tool without direct installation on the host
This commit is contained in:
parent
6fdafa59e7
commit
cfe83c12d2
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM node:alpine
|
||||
WORKDIR /usr/src/app
|
||||
COPY . /usr/src/app
|
||||
RUN npm install && npm run release
|
||||
WORKDIR /src
|
||||
ENTRYPOINT [ "node", "/usr/src/app/bin/index.js" ]
|
||||
CMD "--help"
|
||||
14
README.md
14
README.md
@ -58,6 +58,20 @@ $ openapi --help
|
||||
$ openapi --input ./spec.json --output ./generated --client xhr
|
||||
```
|
||||
|
||||
## Docker usage
|
||||
|
||||
* Help screen
|
||||
|
||||
```
|
||||
docker run leeelenbaas/openapi-typescript-codegen --help
|
||||
```
|
||||
|
||||
* Generate client for `sample.yaml` in current folder to the `client` subfolder
|
||||
|
||||
```
|
||||
docker run -v "$PWD:/src" leeelenbaas/openapi-typescript-codegen -i sample.yaml -o client
|
||||
```
|
||||
|
||||
Documentation
|
||||
===
|
||||
- [Basic usage](docs/basic-usage.md)
|
||||
|
||||
@ -56,7 +56,8 @@
|
||||
"eslint": "eslint .",
|
||||
"eslint:fix": "eslint . --fix",
|
||||
"prepublishOnly": "npm run clean && npm run release",
|
||||
"codecov": "codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b"
|
||||
"codecov": "codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b",
|
||||
"docker": "docker build -t eeelenbaas/openapi-typescript-codegen ."
|
||||
},
|
||||
"dependencies": {
|
||||
"camelcase": "^6.3.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user