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

Allow presets #39

Open
mattstauffer opened this issue Jul 17, 2017 · 6 comments
Open

Allow presets #39

mattstauffer opened this issue Jul 17, 2017 · 6 comments

Comments

@mattstauffer
Copy link
Member

For example:

lambo --preset=API FacebookForPets

I think that would read a separate shell script after after.sh in something like ~/.lambo/presets/API.sh.

Other examples:

lambo --preset=fractal FacebookForPets
lambo --preset=API FacebookForPets
lambo --preset=jsend FacebookForPets
lambo --preset=adminCrud FacebookForPets
lambo --preset=spark FacebookForPets
@mattstauffer mattstauffer changed the title Update after file to allow presets Allow presets Jul 17, 2017
@milose
Copy link
Contributor

milose commented Jul 24, 2017

Perhaps enable running of multiple presets:
lambo --preset=adminCrud,mysql

@mattstauffer
Copy link
Member Author

@milose yah, i like that idea

@tucq88
Copy link

tucq88 commented Oct 3, 2017

What exactly presets would work ? I dont get it clearly :D

@mattstauffer
Copy link
Member Author

Hi @tucq88;
imagine you might want to run a certain set of commands for every project that was going to be an API
but a different set of commands for every project that was going to have an admin panel
and a different set of commands for each project that was going to use Spark.

Each of those would be a "preset". And like I referenced above, it would likely live in ~/.lambo/presents/:presetname:.sh or something like that.

@quickliketurtle
Copy link
Contributor

Hey @mattstauffer , working on this now and have a couple of thoughts.

Will start with naive implementation just accepting any string and matching to a file in ~/.lambo/presets/API.sh following the current structure of option [space] string to keep it consistent.
lambo --preset API would try to match ~/.lambo/presets/API.sh or display warning that the preset does not exist.
For an abbreviation -p is already taken by path, could use -s but none fit great...
I think that will do as a first pass.

What are your thoughts about providing some presets for people like your examples? Should we create a preset folder with presets on the repo that people can download and use? Or just an example in the docs? Any need for a 'create preset' command? I'm thinking not and just keep it simple.

A subsequent update can be to switch all options from command [space] "string" to command="string". I like that format better and is consistent with other Laravel command options.

Next I'm thinking about the use case for the after file, with presets added. Being that it is commands that you want to run on 'every' project, maybe we create a 'default' or 'base' preset? At the very least it aligns the language and makes it more clear what the 'after' file is vs a 'preset'. Thoughts?

@jonsugar
Copy link
Collaborator

Work has started on this in the mes/presets branch as part of the port to PHP.

The API may not be exactly the same but the intention is.

@jonsugar jonsugar modified the milestones: Beta 2, Post launch Sep 7, 2020
@jonsugar jonsugar removed this from the Post launch milestone Mar 18, 2021
@jonsugar jonsugar added this to To do / Triage in Presets Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Presets
  
To do / Triage
Development

No branches or pull requests

5 participants