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

[pingy-scaffold.json] explicit vs implicit files #74

Open
afknapping opened this issue Nov 24, 2017 · 5 comments
Open

[pingy-scaffold.json] explicit vs implicit files #74

afknapping opened this issue Nov 24, 2017 · 5 comments

Comments

@afknapping
Copy link
Contributor

so i have to write sth like this for every file:

{
    "input": "components/_component-list.pug",
    "output": "components/_component-list.pug"
}

there are two things with this:

  • if output is omitted, you could assume input = output. there might be cases where output is different, but in general i would always recommend to keep them the same anyways (simpler = easier to understand behaviour)
  • now that i forgot to add a file to that json for the first time, i thought: "why do i have to add those in the first place? why would i add files to the scaffold that i would not want in my project?" there might be special cases that need that too, but a blacklist seems less work and less config i need to think about...
@davej
Copy link
Member

davej commented Nov 24, 2017

Thanks for the feedback, this is great stuff.

  1. Yes, that will come soon. You will be able to just use an array of strings if the input and output are the same and there is no vars. I.e.. ["components/_component-list.pug", …]. 👍
  2. For the moment I'm going to keep it as a whitelist. It's not super obvious now but I think it will be the simpler solution when I add dynamic scaffolding. Dynamic scaffolding will be awesome. 😉

@afknapping
Copy link
Contributor Author

dynamic scaffolding

i guess that has something to do with the vars... but otherwise i am not sure what that could mean...

@afknapping
Copy link
Contributor Author

ah – i guess that is about the full pingy client. you don't want one repo per scaffold, but configure the scaffolds from one pool of files...

i'm just wondering why not have both? :)

@davej
Copy link
Member

davej commented Nov 24, 2017

No it's for Pingy CLI too. But yeah your basically correct about a pool of files. Take the Bootstrap scaffold for instance, there are lots of slightly different starter templates.

I'll leave you in suspense as to how dynamic scaffolding will actually work but it will be completely different to how other tools (Yeoman etc..) do it. 😁

i'm just wondering why not have both? :)

That's a possibility. I'll review it again when dynamic scaffolding is released.

@afknapping
Copy link
Contributor Author

i get it – bootstrap is good example 👍👍

That's a possibility. I'll review it again when dynamic scaffolding is released.

cool – i fell over that multiple times when updating my scaffold in the past hours :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants