-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat: support files listed in nonRenderableFiles with conditionalFiles #363
feat: support files listed in nonRenderableFiles with conditionalFiles #363
Conversation
I added support for nonrenderablefiles as agreed in the related issue I tested against:
and works as expected, ready for review |
@Tenischev it is not yet merged, so for sure it doesn't resolve yet. But the goal is that it does 😉
Do you like it 😄 |
I ❤️ new But there still issue about these
|
@Tenischev oh, I know what you mean, that actually sucks, you are right, in this new example I added about so I made a fix but to fix it nice there would have to be a nice log message. But we have too many of those already, so I added another use case to our new example of log messages for different cases, where there is debug on or off
|
docs/authoring.md
Outdated
@@ -211,17 +211,17 @@ The `generator` property from `package.json` file must contain a JSON object tha | |||
} | |||
}, | |||
"conditionalFiles": { | |||
"src/api/adapters/amqp.js": { | |||
"template/dir/relative/path/to/file/test-amqp.js": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without template
in the beginning, because of
Line 546 in 736bfa0
const relativeSourceFile = path.relative(this.templateContentDir, sourceFile); |
docs/authoring.md
Outdated
"validation": { | ||
"const": "mqtt" | ||
} | ||
"template/dir/relative/path/to/file/support.html": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without template
in the beginning, because of
Line 546 in 736bfa0
const relativeSourceFile = path.relative(this.templateContentDir, sourceFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I think I made it a bit too confusing, I meant here in example that path must be relative to template dir. I'll fix
@@ -158,6 +159,8 @@ class Generator { | |||
throw new Error('Parameter entrypoint is required when using output = "string"'); | |||
} | |||
|
|||
if (this.debug) log.setLevel('debug'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea! Could we pass debug flag into template? So in template we also could write some debug logs. (Ofc this suggestion is for separate issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you for sure have access to it in hooks out of the box, but filters and Nunjucks, that would be awesome, please write an issue for it
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@Tenischev how about 1c0dccd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good fix! Thanks!
🎉 This PR is included in version 0.52.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Related issue(s)
Resolves #358