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

New feature proposals #21

Open
jarib opened this issue Feb 7, 2022 · 3 comments
Open

New feature proposals #21

jarib opened this issue Feb 7, 2022 · 3 comments

Comments

@jarib
Copy link

jarib commented Feb 7, 2022

Thanks for this project, exactly what I've been looking for 👍

I would like to propose the following features. Would you accept PRs for any of these?

1. Read bluprint from a local directory

Perhaps I've missed something, but it seems any bluprint changes must be pushed to Github before you can test it? This is quite frustrating when developing new bluprints, especially since github.com seems to do a bit of caching that is hard to get around.

It would be nice to run bluprint start ../my-bluprint without having to commit every change.

Alternatively git archive to get a tarball or by adding support for git daemon to the hosted-git-info package.

2. Allow .blueprintrc.js

It would be useful to have the ability to execute JS inside this file. E.g. for my render actions I would like to have the current year in the context:

context: { year: new Date().getFullYear() } 

The only solution to this I've found is to switch from mustache to ejs and execute the JS line as part of the templates.

3. Allow templated execute actions

E.g.:

"cmds": [ ["git", ["remote", "add", "origin", "{{ org }}/{{ year }}-{{ slug }}" ]] ] 

4. Custom actions from the template repo

Not too sure about this one, but the ability to have custom actions in the bluprint repo itself would really make anything possible in terms of customization.

@hobbes7878
Copy link
Member

Hiya & thanks!

I think the answer to most of these is yes.

Re 1., I think if we make that feature maybe we expose a separate command? bluprint test ./local-path/ or something?

On 2., we'd just need to gracefully fallback to json as the minimum requirement to be a valid bluprint. There are also a few places we presume a JSON config file so we can verify a repo is a bluprint that would have to be unwound.

On 4., I can tell you we often use execute actions for this use case, for example, running local node scripts like this. I think that should cover what most folks would need in terms of template specific actions.

@jarib
Copy link
Author

jarib commented Feb 10, 2022

Great!

I think 1. is the highest priority for us, so will begin with that.

Good point on 4. That solves what I was trying to do.

However when using local node scripts I noticed that the exit code from execute actions is ignored. Perhaps we could change that? As it would be a breaking change, perhaps it would have to be explicitly enabled:

"action": "execute",
"abortOnError": true,
"cmds": [ … ],

@jarib
Copy link
Author

jarib commented Oct 12, 2022

@hobbes7878 Any interest in feature 1. here? See #30

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