#Create Astro Project without copying files
17 messages · Page 1 of 1 (latest)
I'd open an issue on the GitHub repo, but for now you can probably use degit to download an example repo. It won't do all the setup steps, but it should give you a working template.
For example, if you wanted the minimal template:
npx degit withastro/astro/examples/minimal meerkat
Open a New Issue
https://github.com/withastro/astro/issues/new/choose
Thank you, let me try that
I got
! could not fetch remote https://github.com/withastro/astro
! could not find commit hash for HEAD
hmm, that's odd. looks like you might be having issues with git/github?
are you able to clone other repos fine?
yes , I can clone fine
then as a last resort, I guess you could clone the astro repo with --depth=1 and cp the example you want 😅 not very ideal though
so say i want the minimal one, the full command would be :
git clone https://github.com/withastro/astro --depth=1 cp minimal
like that?
this to clone the astro repo (you'll only need to ever do this once)
git clone https://github.com/withastro/astro --depth=1
then this to copy an example to a folder
cp astro/examples/minimal my-app
as separate commands? one after the other?
yep
Let me first say - i'm on windows
I did the the git clone - astro folder has been copied , the cp command says:cp: -r not specified; omitting directory 'astro/examples/minimal'
ah yeah, -r copies recursively (also I think I slightly mistyped the command. you might need cp astro/examples/minimal/* my-app). either way you can copy via the command line, or using file explorer