Sh-ui / caffeinated-html

Testing methodology for html to coffeescript web development
0 stars 0 forks source link

components aren't rendering when called as a variable #7

Open Sh-ui opened 7 years ago

Sh-ui commented 7 years ago

@tilleryj

Currently no components are being called in brewing.coffee but previous tests have shown that I don't know what I'm doing.

The component being used for testing currently is the header. I have exports set up in the file currently (although it's likely done incorrectly; do I need constructors?) , but placing a require statement in brewing.coffee like so:

@header = require 'components.coffee'
@header.header()

doctype 5
html ->
  head ->
    title 'Caffeine Test'
    ...

doesn't work

Although that could be an issue with my node installation not using requirejs properly

Using require doesn't seem like the route I'd want to go even if i did get it to work...

looking for an overall better solution

Sh-ui commented 7 years ago

I'm out of town this week without a battlestation, so I probably won't be able to jump on this for real until next week

tilleryj commented 7 years ago

It looks like you are on the right track here. What happens when you launch node? Does it fail to startup?

Sh-ui commented 7 years ago

Ah no, it launches fine. When I'm running coffee-world I can save and compile properly, but when I add anything with a require statement to my file it won't save. It throws the message require is not defined.

On Thu, May 25, 2017 at 7:44 AM Jason Tillery notifications@github.com wrote:

It looks like you are on the right track here. What happens when you launch node? Does it fail to startup?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sh-ui/caffeinated-html/issues/7#issuecomment-304001439, or mute the thread https://github.com/notifications/unsubscribe-auth/AaOuFdYdXxFQycoIUgsulR7JrIYnWs2Cks5r9XfCgaJpZM4Nkl99 .