Can you include a js file inline from jade?

104 views
Skip to first unread message

Jon Wu

unread,
Jul 26, 2012, 11:30:18 PM7/26/12
to sca...@googlegroups.com
Looking through the group, it seems like people have wanted to include things like coffee files and put them inline, but what about plain old text like a js file?

I'm using jade and I tried something like this:

- include("/../../static/scripts/app.js")

However I then get this error:

TemplateException: Not a template file extension (page | coffee | feed | md | markdown | ssp | scaml | mustache | jade), you requested: js

Is there another way I should be doing this?

Alternatively if there isn't maybe I could just write Scala code to read the file?

I have a single page app and sometimes the request for the js file fails (rarely) but then I thought, why not include it inline and make initialization faster for everyone?

Thanks!
Reply all
Reply to author
Forward
0 new messages