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 creating new packages from custom skeleton sources #15

Open
sagikazarmark opened this issue Apr 2, 2015 · 10 comments
Open

Allow creating new packages from custom skeleton sources #15

sagikazarmark opened this issue Apr 2, 2015 · 10 comments

Comments

@sagikazarmark
Copy link

Sometimes we have to follow rules about packages (eg. when developing a package in an organization). Would be awesome to be able create packages from existing sources, for example a skeleton repository.

@franzliedke
Copy link
Owner

Thanks for the input! Hmm, not sure about the best way to do this.

You could copy the package and then use the load command.
As an alternative, I could add a --local flag similar to the --git option.

What do you think?

@sagikazarmark
Copy link
Author

Both could work. I imagine some command/option which simply pulls down a repository (either form local or github, optionally accepts a branch name, and creates a new package based on that source.

Actually, this is not a major one. I usually use Jeffrey Way's Fetch plugin for sublime to create a new package from a skeleton. The reason I think it would be good is that by default studio asks a set of questions when creating a new package. If I have those pre-set in a skeleton repo, actually the questions does not add anything to the process, so the should be skipped.

@franzliedke
Copy link
Owner

Well, you can already use studio create --git repoaddress then.

You will only be asked those questions when you generate a new empty project.

@sagikazarmark
Copy link
Author

But that will use the skeleton repo as origin, won't it? Also, it would preserve the history, which I don't want.

Ideally it should do the following:

git clone SKELETON_REPO package_name
rm -rf .git
git init

@franzliedke
Copy link
Owner

Interesting. Okay, that is a different use case, specifically for skeleton repos. Okay, we'll let this sit a bit, for now you can use a combination of the --git option and running these two commands by hand, okay?

@sagikazarmark
Copy link
Author

Of course, I am not pushing anything. Thought it might be a useful thing.

@dberry37388
Copy link

+1 on the skeleton repo, that's a great idea.

It would also be nice to be able to use a standard set of placeholders, (namespace, vendor, etc...) that will be replaced inside the files in the repo. Maybe recursively go through the files and regex replace the placeholders.

@sagikazarmark
Copy link
Author

Yeah, that's a good idea. Currently I also do it by hand.

@RemiCollin
Copy link
Contributor

Came accross this project which was a move in this direction : https://github.com/packedge/workbench/

Seem to have been abandonned half way though

@sebastiaanluca
Copy link

The regex replace thing would come in handy when starting a package from https://github.com/thephpleague/skeleton for instance. Currently throws a Composer\Json\JsonValidationException when using it with the --git argument since the placeholders aren't being replaced (and I hate to spend the 10 minutes doing a find/replace of all those placeholders each time I start a new package).

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

No branches or pull requests

5 participants