From 8bd7d16a96bb89edbd42fe563306d7baaa9d4b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20T=C3=A4schner?= Date: Sat, 13 Jul 2019 12:44:46 +0200 Subject: [PATCH] fix: codegen bin commands (#133) * fix: add bin command --- codegen/bin/slushy-codegen | 2 ++ codegen/package.json | 4 +++- docs/index.md | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 codegen/bin/slushy-codegen diff --git a/codegen/bin/slushy-codegen b/codegen/bin/slushy-codegen new file mode 100644 index 000000000..b7065690a --- /dev/null +++ b/codegen/bin/slushy-codegen @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('../dist/index.js') \ No newline at end of file diff --git a/codegen/package.json b/codegen/package.json index cfdcf0780..3a573da5a 100644 --- a/codegen/package.json +++ b/codegen/package.json @@ -6,7 +6,9 @@ "repository": "https://github.com/aimed/slushy", "author": "Maximilian Taeschner", "license": "MIT", - "bin": "./dist/index.js", + "bin": { + "slushy-codegen": "./bin/slushy-codegen" + }, "dependencies": { "commander": "^2.20.0", "fs-extra": "^8.0.1", diff --git a/docs/index.md b/docs/index.md index ab2d90994..7d7b4fc5b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -96,10 +96,10 @@ await app.start(3000) yarn add @slushy/codegen # Generate code based on an OpenApi file -yarn @slushy/codegen gen ./openApi.yaml ./src/generated +yarn slushy-codegen gen ./openApi.yaml ./src/generated ``` -The command line tool takes the following arguments: `@slushy/codegen gen [Code generators]`. +The command line tool takes the following arguments: `slushy-codegen gen [Code generators]`. Currently the following code generators are supported: