Closed georgeedwards closed 7 years ago
Hi @georgeedwards , you can use:
tns create MyApp --template https://github.com/NativeScript/sample-Groceries
May be --copy-from and --template are a bit confusing and may be it will be better if we have a single command. Ideas for improvement of commands and user experience are welcome :)
@dtopuzov Thanks for clearing that up, I think one command would be more intuitive. Does template support branch info? e.g. could I do tns create sample-groceries --template https://github.com/NativeScript/sample-Groceries/tree/start
? - I know that doesn't work as I got HTTP 406 errors. Maybe something like tns create sample-groceries --template https://github.com/NativeScript/sample-Groceries --branch start
?
--template support branching, those are valid options: "https://github.com/NativeScript/template-hello-world-ts/tarball/master" "https://github.com/NativeScript/template-hello-world-ts.git#master"
Note: --template behavior is a bit different compared to --copy-form option. --template will copy content of the package/url inside your app folder. --copy-from will copy everything (not only app folder) What you actually try to do is: git clone https://github.com/NativeScript/sample-Groceries cd sample-Groceries and may be --template is not a good option for you, because sample-Groceries has some other things outside app folder.
@dtopuzov Ahh, I see, a tns command which replicated:
git clone -b start --single-branch https://github.com/NativeScript/sample-Groceries
would be really helpful. In which case, a --copy-from
url support + branch support would be the solution.
Also, the --template flag doesn't seem to be documented on this repo's README?
--copy-from
is now deprecated in flavor of --template
.
tns create MyApp --template
can be used with everything that can be npm installed, but don't forget it should be template, not complete application!
It would be great if the command
tns create MyApp --copy-from https://github.com/NativeScript/sample-Groceries
worked at the moment, it just errors saying that the directory "path-to-current-position/https://github.com/NativeScript/sample-Groceries" doesn't exist.