evidence-dev/evidence-vscode

Add new `Evidence: Template Project Url` extension Setting

RandomFractals opened this issue · 15 comments

to allow users to set their own local or remote Evidence template Url in extension Settings.

  • add evidence.templateProjectUrl string setting to package.json
  • default it to the Evidence template github repo Url for now
  • use this new evidence.templateProjectUrl setting in project.ts when creating new projects
  • check for file:// or https:// template project Uri scheme to determine if we need to load it from local file system or github repo via cloning added in #48
  • test it with cloned Evidence template repo and local fs
  • update #48 to either copy local project folder or clone it from github based on the template Url scheme entered in the displayed template Url prompt
  • test new embedded Evidence project /template added in #61 by changing this setting to /template extension folder path
  • update Settings section in README.md with this new setting info
  • change this setting to use new embedded /template folder by default for faster New Evidence Project and Evidence Project from Template project creation and onboarding user experience.

New Evidence Template Project Url Setting displayed when you view Evidence settings using new View Settings command from #55

image

New Evidence Project command using this new evidence.templateProjectUrl setting with github url, and cloning that repo:

image

When invalid github url is provided in new evidence.templateProjectUrl setting:

image

Error message displayed when invalid template project Url is provided, i.e. not using https:// or file://:

image

Invalid local template project folder error message and output logging display:

image

Output view messages and prompt to open created project folder when a valid file:// template project Url is provided:

image

New and improved instance new Evidence project creation from a local template folder:

evidence-project-new-from-local-template

will need to finalize this for the v1.1.0 release too (#65)

Updated Settings section with new evidence.templateProjectUrl info in md table and settings.json config example in docs:

https://github.com/evidence-dev/evidence-vscode#evidence-settings

Using /template folder from this repo for the default template project url and cloning to create new project:

image

We can set /template as default once we can confirm #72 works on Mac OS as expected.

New evidence.templateProjectUrl default and description displayed in the built-in VS Code Settings editor:

image

File setting description v.:

image

File setting description v.:

image

See updated and final Settings section in docs for the v1.1.0 release:

https://github.com/evidence-dev/evidence-vscode#evidence-settings