asyncapi / asyncapi/generator

Make it possible to generate only given template files

Open
#581 27 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1.1k
Forks
397
Avg merge
1d 7h
Merged PRs (30d)
25

Description

#### Reason/Context
I'd like to use generator not only to scaffold my project when I start working on my application. I also want to use it continuously, every time I change something in AsyncAPI document.

The problem is that regeneration means basically another generation of the entire template. This leads to a process of regenerate -> carefully go through each change introduced after regenerating and ignore changes that will break your code

More context [here](https://deploy-preview-237--asyncapi-website.netlify.app/blog/websocket-part3#keeping-asyncapi-in-sync-with-code).

#### Description

A partial solution for the problem, but also not very complicated would be a configuration I could pass to the library/cli where I could specify what files to include/exclude in a generation.

Let's say I use some Node.js template. I generated my app and later added some more dependencies for my business login. Later I want to regenerate, but by telling the generator to ignore **package.json** and **package-lock.json** files.

What do you think? is the use case clear? you think it makes sense?

Contributor guide

Open the contributing guide

Research direction

Start with the generator's library/CLI configuration entry point and the Node.js template behavior described in the issue. Use package.json and package-lock.json as the example files, then verify that an include/exclude configuration regenerates selected files while leaving excluded files unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.