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
Allow configuration from package.json or .scuri.json #32
Comments
I'd like to be able to provide a custom spec template via a config option. For people/projects who want specific boilerplate, this would be very useful. Edit - poking around angular-schematics and the scuri code a bit, I see this isn't necessarily as straightforward as I would've hoped. Maybe custom templates is more of a feature request for the schematics project. |
@JarvisJ thanks for the feedback. I intend to look into that. Will let you know . |
POC custom template@JarvisJ I just published a POC for custom template* - How to use:
the
*custom class template - creates a spec for a class e.g. |
Awesome! I tried out 1.0.8-rc.1, and it worked as expected with my custom template. Thanks! |
Glad to hear it. Will be moving forward with this feature ASAP
…On Tue, Jun 8, 2021, 14:10 JarvisJ ***@***.***> wrote:
Awesome! I tried out 1.0.8-rc.1, and it worked as expected with my custom
template. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#32 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2SEV3T6QXIIM6WZXXD2DTTRX3AXANCNFSM4IW2V6WA>
.
|
@JarvisJ 1.1.0-rc.1 is now live with support for config file. Care to take it for a spin?
|
Works great so far! Thanks! Edit - and to confirm, I did test specifying the template from package.json. That works as expected. |
Do you want to test it with SCuri code? Well there is a way. SCuri code keeps dependencies in a shared folder (maintained by VS Code) so here's how to locate that folder on a machine and install @JarvisJ FYI |
It works, using my template, with the vs-code extension. The extension still doesn't work in my multiroot workspace. I describe that issue here: |
Hey there. I'm picking up where Mr. JarvisJ left off (literally, same company and product), I'm finding that it would be very helpful to be able to forEach through the declaration and buildExports like we can through the params and publicMethods, there are some places where we'd like to be able to consistently override the line-by-line generation for specific classes. |
Hey, @Z-Newman, I think you can do that with the From index.ts Lines 173 to 184 in 969dd91
The Lines 200 to 216 in 969dd91
Here's an example of the template using these params https://gist.github.com/gparlakov/f299011829e229c9d37cf0cb38506d97#file-my-tmpl-L6-L9 |
Thank you, that's very helpful. Adding that example to the documentation on GitHub for your slower users wouldn't hurt anything. ;)
On Monday, October 18, 2021, 11:17:35 PM EDT, Georgi Parlakov ***@***.***> wrote:
Hey, @Z-Newman,
I think you can do that with the params property that's already exposed to the template.
From index.ts
https://github.com/gparlakov/scuri/blob/969dd91b577ce293e531f871225e84e619cc9ce5/src/spec/index.ts#L173-L184
The declarations and buildExports are just representations of the (constructor) params:
https://github.com/gparlakov/scuri/blob/969dd91b577ce293e531f871225e84e619cc9ce5/src/spec/index.ts#L200-L216
Here's an example of the template using these params
https://gist.github.com/gparlakov/f299011829e229c9d37cf0cb38506d97#file-my-tmpl-L6-L9
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
We'd like to be able to configure things like:
it
name - i.e. now hard-coded defaultwhen <method> is called it should
...etc.
--config
cli arg for custom file)configure setup function nameuse custom templates for thatconfigure whether to add tests for new methods (per test file, per execution of scuri:spec)use custom templates for thatconfigure if try to add support for Angular Standard method (per test file, per execution of scuri:spec)use custom templates for thatThe text was updated successfully, but these errors were encountered: