inesita-rb / inesita

Frontend web application framework in Ruby using Opal.
https://inesita.fazibear.me/
MIT License
259 stars 15 forks source link

Changing location of index.slim #36

Closed ghivert closed 6 years ago

ghivert commented 6 years ago

Hi!

I'm used to write SPA with JS where I often put the index.html in the static folder (because, well, it is static code ^^), and I can't do the same easily with Inesita.

Is there any way to achieve it? I have the same question with stylesheet.sass! Thanks!

fazibear commented 6 years ago

I using slim or other template engines because in development mode you need to add a lot of files int the header section, of course at the end simple HTML file will be generated.

ghivert commented 6 years ago

Yes, I get it, but could it be moved to /static? Because it resides in /app right now, and moving it to /static creates a bug in bundle exec inesita server. In the end, I like having only *.rb files in app folder, static files in static folder, etc. 😀

I don't really know sprockets, so maybe it's a configuration or something else?

fazibear commented 6 years ago

The static folder is not a sprockets feature. There are a lot of magic to make it work in dev and production mode without any code changes.

Sprockets need an entry point for html and css files. So these files have to be in the app folder because sprockets look for a needed file there.