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/a5c4e055-9506-49af-b6cd-ed89a4f093fd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to