Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit outputDir options per component #655

Closed
delaneyj opened this issue Jun 17, 2021 · 2 comments · May be fixed by HaLaGu1L/execution-apis#5
Closed

Add explicit outputDir options per component #655

delaneyj opened this issue Jun 17, 2021 · 2 comments · May be fixed by HaLaGu1L/execution-apis#5
Assignees
Labels

Comments

@delaneyj
Copy link

Is your feature request related to a problem? Please describe.
While there is outDir in the open-rpc-generator-config.json is still forces the output relative to outDir to be ${type}/${language}.

Describe the solution you'd like

{
  "openrpcDocument": "openrpc.json",
  "outDir": ".",
  "components": [
    {
      "type": "client",
      "name": "@foo/client",
      "language": "typescript",
      "outDir": "../foo-client"
    },
    {
      "type": "server",
      "name": "@foo/server",
      "language": "typescript",
      "outDir": "../foo-server"
    }
  ]
}

Describe alternatives you've considered
Not really, though it ties directly to #624 and possible making the generation more configurable.

Additional context
This is primarily to working well with workspace implementation such as Yarn/Lerna or PNPM.

@zcstarr zcstarr self-assigned this Aug 27, 2021
@zcstarr
Copy link
Member

zcstarr commented Aug 27, 2021

Hey thanks for the suggestion ! I think this makes sense , the behavior of outDir will differ though, so we are going to label the outDir on the component outPath.

Where this time for outPath it will just be absolute path without inference.

The behavior will be as follows

(outDirSpecified, outPathonComponent)

(outDir, null) -> same behavior as current
(outDir,outPath) -> outPath full path specified here is used no directory inference type/language
(null,outPath) -> outPath is used , meaning outDir is optional if all components have outPath
(null, null) -> Not allowed

openrpc-bastion added a commit that referenced this issue Aug 27, 2021
# [1.22.0](1.21.2...1.22.0) (2021-08-27)

### Bug Fixes

* update component in README ([1f708f5](1f708f5))

### Features

* refactor code to support an override output directory ([6e7937e](6e7937e)), closes [#655](#655)
@openrpc-bastion
Copy link
Member

🎉 This issue has been resolved in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants