-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A way to validate the typescript of assembled tutorial sections #395
Comments
Could you set up minimal reproduction for this? For example using https://node.new and running |
Hi, here it is:
The lesson itself, that is the combination of the template and the lesson is valid but nore the templare nor the lesson are. You can verify that its valid by using "open in stackblitz" If I run astro build I get an error - and that's ok - I exclude template and content from the ts file. I wish there was a way to generate to some temp folder, the "merged" lessons and build them to make sure its all ok. |
I'm not sure how this could be implemented. I thought {
"compilerOptions": {
"paths": {
+ "./src/content/tutorial/1-basics/1-introduction/1-welcome/_files/*": [
+ "./src/templates/default/*"
+ ]
}
}
} |
I'm old school - if there was away to reuse the logic you use to build the source folder for the web container, and just output it to a tmp folder - with a folder for each lesson, and run the tsc there - that would be a good start. |
Is your feature request related to a problem?
Today, the actual lesson is a combination of files from the template and from the lesson itself. When I use vs code - or when I build astro typescript files - the build fails, because the template may refer to files that exist only on the lesson and vice versa.
I wish there was a way to validate that.
Describe the solution you'd like.
One "dummy" thought, is a cli command to "build" all the lessons with their files and template files into a temp folder and run typescript build there - to validate that all is ok
Describe alternatives you've considered.
The other way I can think of is duplicating many files - but that's maintanance hell.
Additional context
Love this project
The text was updated successfully, but these errors were encountered: