Closed fakenickels closed 3 years ago
Hey @fakenickels π
There's no way to do this at the moment, but I think that's a great idea! Something like a raw_files
stanza in the spin template config that will instruct the generator engine to just copy the files, without processing them.
A PR for this would be very much welcomed if you want, otherwise, I'll look into it π
Although, to be sure I understand the issue:
Is the issue that the generation fails after the prompt, or is it that the generation takes too much time?
Also, could you copy the error that you're encountering here? I'm not sure why Spin would fail because of the filenames.
Hey! Sorry, I just tried again and I realized I misread the error. The actual error is something else
? Project name NewApp
? Project slug used in package.json [newapp]
? Project bundle id (eg astroapp.company) astroapp.newapp
? Project Astro's product id 20
ποΈ Creating a new project from spin-rescript in packages/newapp
spin: [ERROR] The template generation failed:
Error while running the template engine on content of "packages/newapp/android/app/src/main/assets/fonts/Montserrat-BoldItalic.ttf".
Looks like it fails while trying to apply the template in a font file. But I also got the same error with some images. Looks like it happens with binary files
Thanks for the details!
So yeah, I think what you were suggesting is a good solution here: let's have a stanza that instructs spin to not parse a list of files. In addition to that, it would probably make sense to have a list of extensions to not parse by default (everything binary)
That would be amazing! For now I'll try to use the ignore
stanza and then add a post command to copy over the ignored files to the new destination.
If you want I can go ahead and submit a PR to include the new "raw_files" stanza!
I'm not sure the post commands can access the template files, so that might not be possible.
If you want I can go ahead and submit a PR to include the new "raw_files" stanza!
Sure, a PR for this, if you have time to look into it, would be very appreciated π
Hey @fakenickels! I went ahead and implemented it. Let me know if you have any other issue π
Wow! Thanks a lot βΊοΈ
First of all, thanks for the awesome piece of software π.
As far as I tested it
spin
seems to try to map over all the files in the project. If you are trying to spin up a relatively more complex or big project it takes some time to just load the files and then after the set up prompts and fails due to some different named files, for instance asset names within a iOS project or Android like it was in my case (I'm trying to use it to spin up a React Native project based on a internal company template).Is there a way to point out in the config file which files are actually holding the interpolation tags and tell
spin
to just copy the rest of the files?