You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
I've been asking this question several times on slack @Polymer without an answer, maybe the maintainers of PSE have informations.
What would be the recommended way to use DSL (Eg Jade, HAML, Coffee etc), and even ES2015 within a seed-element based repository, allowing Polyserve to correctly run, while publishing the correct transpiled files when other people use the element? Would that require the integration of a proper Gulpfile? Or is there anything already recommended regarding that?
The text was updated successfully, but these errors were encountered:
@justinfagnani would be a good person to ask. For the ES2015 I think the easiest thing might be to keep the js for your element separate and transpile it. So if you have x-foo.es6.js which transpiles to x-foo.js, which is what your element depends on, then you should be able to serve that just fine with polyserve.
You don't need to put ES2015 code in a separate file, but you do have to strip it out to compile with Babel. I tend to do this in a Gulp rule with Crisper, then gulp-if to send the JS through Babel.
@justinfagnani Would you be kind enough to show us a Gulpfile doing that? I am aware of the Polymer Starter Kit Gulpfile, but it seems maybe too big and bloated for a simple Polymer Seed Element, what do you think?
Just to make sure it's correct:
We would have Gulp (Or whatever build system) watch for changes,
Every time a change occurs, the files get transpiled to their final "production" location,
In parallel (And optionally), Polyserve is running and serving the files which got transpiled,
Edit: One thing I'm not too sure about: what would be the recommended directory structure for such setup? Having all coffee / ES2015 in an src/ directory but getting them transpiled in the root / directory? Or something else? Also, would the vulcanization be involved in that process, or do you recommend only running it from an application project directory?
When I have such pattern (Multiple things to be ran in parallel), I usually use foreman. Would you recommend such approach? Does it sound too complicated for newcomers maybe?
I've been asking this question several times on slack @Polymer without an answer, maybe the maintainers of PSE have informations.
What would be the recommended way to use DSL (Eg Jade, HAML, Coffee etc), and even ES2015 within a seed-element based repository, allowing Polyserve to correctly run, while publishing the correct transpiled files when other people use the element? Would that require the integration of a proper Gulpfile? Or is there anything already recommended regarding that?
The text was updated successfully, but these errors were encountered: