Coder Social home page Coder Social logo

Comments (4)

adambeynon avatar adambeynon commented on August 28, 2024

Try:

puts Template.paths

That should give you a list of all compiled templates. I have a feeling that we strip the "templates/" prefix off the template names, but that is due to change for the next release.

from opal-haml.

jgaskins avatar jgaskins commented on August 28, 2024

Yep, already did that. :-) Empty array.

Requiring templates individually works fine using the Ruby require, but using the Sprockets require_tree doesn't. Could this actually be an Opal thing and not specific to Opal-Haml?

from opal-haml.

adambeynon avatar adambeynon commented on August 28, 2024

Are you running from git? Or a gem release? And which versions? For 0.7 we introduce out own require_tree method, but that is only in the beta gems

from opal-haml.

jgaskins avatar jgaskins commented on August 28, 2024

Ah! Okay, I tried both 0.6 and the latest 0.7 beta. require_tree didn't work in 0.6 as a Ruby method, so I guess I didn't even think to try it in 0.7. It seems it works like a charm!

Most of the opal-haml stuff I've been doing is based on the opal-todos project, which requires templates individually. Once 0.7 final is out, I might put in a PR on opal-todos to update that. :-)

from opal-haml.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.