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

Get rid of .tp-config.json and use package.json #228

Closed
fmvilas opened this issue Feb 24, 2020 · 4 comments · Fixed by #349
Closed

Get rid of .tp-config.json and use package.json #228

fmvilas opened this issue Feb 24, 2020 · 4 comments · Fixed by #349
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed released

Comments

@fmvilas
Copy link
Member

fmvilas commented Feb 24, 2020

Now that templates are packages, we could use a custom key on the package.json file instead of having our own entire file. For instance:

// package.json
{
  "name": "my-template",
  "version": "0.1.0",
  "asyncapi-generator": {
    "supportedProtocols": ["amqp", "mqtt", "kafka", "ws"],
    "parameters": {
      "server": {
        "description": "The server you want to use in the code.",
        "required": true
      }
    },
    "nonRenderableFiles": [
      "src/api/middlewares/*.*",
      "src/lib/config.js"
    ]
  },
  "dependencies": {
    // ...
  }
}

Thoughts?

@fmvilas fmvilas added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 24, 2020
@derberg
Copy link
Member

derberg commented Feb 24, 2020

I don't have a strong opinion here really:
On one hand, I like when configurations are separated per file for different packages. Separate config file for this and for that. But I also had experience with lerna-changelog that is configured inside package.json https://github.com/lerna/lerna-changelog#configuration and it was super handy as you simply maintain 1 and not 2 files. Only remark would be that we need to advise that in package.json config key is the last one as it can grow in size, example https://github.com/lerna/lerna-changelog#configuration

@fmvilas fmvilas added this to the Make Generator stable milestone Mar 13, 2020
@fmvilas fmvilas self-assigned this Apr 6, 2020
@derberg
Copy link
Member

derberg commented May 15, 2020

oh my, I have no idea what would be the name of the parameter in package.json, "tp-config" ?

@fmvilas
Copy link
Member Author

fmvilas commented May 15, 2020

generator? It's the config for the generator.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.50.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
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants