We use pre-processors and post-processors successfully with polymer here: 
https://github.com/bevry/interconnect/tree/rtc.io-polymer/src/documents/components

We use DocPad for compilation, then use the compiled version on the 
client-side. It works really well, especially with using Browserify to 
bundle a component's js together.


On Friday, 7 March 2014 08:04:51 UTC+11, Andrew Huth wrote:
>
> What are your thoughts on using web technologies that require a 
> compilation step, such as CoffeeScript and SASS, inside Polymer components?
>
> I posted <https://groups.google.com/forum/#!topic/polymer-dev/4l7eIsf3p4Q>the 
> other day about a ruby 
> gem I made called Emcee <https://github.com/ahuth/emcee>. Essentially, it 
> allows you to declare in your Rails app what web components to import. It 
> then handles putting those and their dependencies into the asset pipeline, 
> and inserting html import tags into the page for them. In production, it 
> even concatenates everything into one import tag, and runs basic 
> compressing on it (removing comments and newlines).
>
> So pretty much Vulcanize, except for Rails. And it handles everything 
> automatically when the app runs.
>
> I've been thinking about where to go next, and I realized that it will 
> (hopefully) be pretty straightforward to add CoffeeScript or SASS 
> compilation to the processing of Polymer components.
>
> You could define an element like this:
>
> <polymer-element name="my-element">
>   <template>
>     <span>stuff</span>
>   </template>
>   <script type="application/coffeescript">
>     # CoffeeScript code here
>   </script>
> </polymer-element>
>
>
> and when you load your web app, the CoffeeScript will have been converted 
> to Javascript. The same would go for SASS.
>
> Does anyone have an thoughts on this, and is this something people want to 
> see? Or am I barking up the wrong tree here?
>
> P.S. Does anyone know a better way to format code on here? It seems like 
> the box the code example in is HUGE.
>
> Thanks
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/59c7ff18-fb6c-44d1-85c9-34790104ea5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to