Skip to content
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

support for jade? #6

Closed
dcsan opened this issue Apr 24, 2014 · 7 comments
Closed

support for jade? #6

dcsan opened this issue Apr 24, 2014 · 7 comments

Comments

@dcsan
Copy link

dcsan commented Apr 24, 2014

I tried to create a jade template that used a famous component, without success.
if you could suggest some pointers where to look at fixing i can try to make a PR

template(name='scroll1')

    +famous(view='Scrollview')
        | p some content

this should be equivalent to

<template name="scroll0">
    {{#famous view='Scrollview'}}
        <p>Some content</p>
    {{/famous}}
</template>

the error is a bit cryptic:

While building the application:
<runJavaScript-6>:130:11: Expected space
...ous view='Scrollview')}}
                        ^ (compiling client/views/scroll1.jade.html)
  at [object Object].Scanner.fatal (<runJavaScript-6>:130:11)
  at error (<runJavaScript-20>:569:13)
  at expected (<runJavaScript-20>:573:5)
  at Function.TemplateTag.parse (<runJavaScript-20>:631:9)
  at [object Object]._.extend.visitMixin (<runJavaScript-21>:257:37)
  at [object Object]._.extend.visitNode (<runJavaScript-21>:236:39)
  at [object Object]._.extend.visitBlock (<runJavaScript-21>:220:24)
  at [object Object]._.extend.visitNode (<runJavaScript-21>:230:51)
  at [object Object]._.extend.visitBlock (<runJavaScript-21>:220:24)
  at [object Object]._.extend.compile (<runJavaScript-21>:168:10)
  at sourceHandler (<runJavaScript-21>:478:46)
@raix
Copy link
Contributor

raix commented Apr 24, 2014

Seems to be a bug in the jade parser - it returns ..ous view='Scrollview')}} instead of ..ous view='Scrollview'}}

@dcsan
Copy link
Author

dcsan commented Apr 25, 2014

cool, i reported it on the meteor-jade repo too with a stock meteor component - the accounts-ui

@gadicc
Copy link
Owner

gadicc commented Apr 25, 2014

Great, looks like this has been fixed now :> Let me know how famous-components feels in Jade.

@dcsan
Copy link
Author

dcsan commented Apr 25, 2014

yep, its confirmed working in unreleased jade and meteor.

fyi you'll need to update your smart.json to run the dev branches of both, as per this issue

mquandalle/meteor-jade#27 (comment)

@dcsan dcsan closed this as completed Apr 25, 2014
@sferoze
Copy link

sferoze commented May 19, 2014

amazing thank you, famous components with jade is amazing!

@sferoze
Copy link

sferoze commented May 20, 2014

I am kind of confused though,

How do you express the following spacebar code in jade?

{{>famous template='yieldMain' size='[undefined,undefined]'}}

@gadicc
Copy link
Owner

gadicc commented May 20, 2014

Hey, great to hear... love getting feedback like this.

I don't use jade personally, but as per comments above and the meteor-jade README, you want this:

+famous(template='yieldMain', size='[undefined,undefined]')

Let us know if that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants