Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
enyo templates install
command is for installing templates from git repositories as shown in the README.md example:This is very convenient, but when using a git repo as illustrated in the example, the repo will be cloned into enyo-dev's templates directory including the template repo's .git directory and README.md as an inited local repo. This is a reasonable course of action allowing an end user to identify where a template came from and potentially modify it and push changes upstream. What is problematic is that when that template is used via
enyo init
the full template directory is copied into the new enyo project including the template's .git directory. The user is expecting a fresh project ready for work and may easily start making commits without realizing that they are committing to the template's repo rather than to their fresh project repo as they may reasonably assume.This pull request attempts to fix this significant problem by avoiding copying the .git directory from the enyo templates directory when
enyo init
is called.It would be nice to avoid copying the README.md as well, but I could not come up with a reasonable way to do that within the existing code. Perhaps a
.enyoinitignore
file along the lines of a .gitignore file could be used by template creators to specify which files should not be used byenyo init
, but the presence of a README.md file from a template repo inside of a newly inited project is a minor nuisance compared to that project having a .git directory from the template repo in it.If a enyo-dev template repo is needed to test this PR, please feel free to use mine:
https://github.com/bbito/onyx-webos-app.git
-Thanks,
--bbito