Predefined options in newly generated projenrc's
See original GitHub issueWe are building multiple project types for usage with the --from flag. This process really helps in standardisation within our company.
One thing i’m looking into is adding default configuration options into generated projenrc files (a big wish is to have this as a typescript file)
What I was thinking of is that when the new project is generated that the project class can return a predefined struct of configuration options that are put into the options part of the projenrc file.
Example usage:
class MyCustomTypescriptProject extends TypeScriptProject {
generateDemoConfiguration() {
return {
...super.generateDemoConfiguration(),
environments: {
staging: {},
prod: {}
}
}
}
}
This would then end up in the projenrc file as:
const project = new MyCustomTypescriptProject({
name: 'project name',
environments: {
staging: {},
prod: {}
}
})
This will give more options in adding things like “best practices”, mandatory options, example usages.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (14 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like that idea. If you’re not using GitHub, a lot of (useful) defaults needs to be disabled. Although, there might be another solution to my problem as well. Like group these GitHub options somehow together as presets? Have an OpenSourceGitHub preset and one for my company…
I’m totally cool with cutting down on the wall of options through some kind of featured label, and including those featured options as uncommented (if it’s possible avoid the snag w/ complex types you mentioned).