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

Make all "polymer-cli build" features available without the CLI #2484

Open
ronnyroeller opened this issue Jun 19, 2017 · 4 comments
Open

Make all "polymer-cli build" features available without the CLI #2484

ronnyroeller opened this issue Jun 19, 2017 · 4 comments

Comments

@ronnyroeller
Copy link

"polymer-cli build" provides great out-of-the-box functionality but so far we very quickly outgrow it for every project (e.g. inject the Git rev number, create localization files, build Cordova apps, etc.)

From the documentation, I understand that gulp + polymer-build is the way to go once polymer-cli becomes insufficient for the project's needs. Unfortunately, there is quite some nice functionality in polymer-cli (but not in polymer-build) that needs to be replicated - and maintained - when doing this step. For example: compile to ES5, minification, build presets, polymer.json config for those steps, etc.

Is this intentionally (e.g. is "polymer-cli build" intended only to spin up demo apps)?
Is there already a way to reuse these polymer-cli features?
Alternatively, is it possible (and advised) to inject our own build steps (like injecting Git rev number) in the "polymer-cli build" process? If so: is there any documentation on how to do this?

@ronnyroeller
Copy link
Author

If somebody else runs into the same issue: We described & open sourced our build process for Polymer apps (and still hope to nuke it soon once this ticket gets implemented 😉 ):
https://medium.com/collaborne-engineering/building-polymer-app-with-gulp-dee266d348df

@web-padawan
Copy link
Contributor

web-padawan commented Aug 10, 2017

Great work, our gulpfile includes mostly the same stuff, just not so structured.
Regarding further additions, it's clear to me that for Polymer 2, we are going to need at least 3 build destinations for conditional serving:

  • browsers both supporting ES6 + Service workers (Chrome, Firefox)
  • browsers supporting ES6 but not Service Workers (Safari 10, Edge)
  • browsers only supporting ES5 (Safari 9, IE11)

The fact is that Polymer team only enforces us to use Service Workers and says nothing about cache busting, so I don't think they are inclined to implement the latter.

@davidmaxwaterman
Copy link

I'm also hitting the limitations of polymer-cli. I've been very reluctant to move into my own gulpfile since I've been there and it can be quite a 'time-pit' (I've moved back-and-forth a couple of times already)...but I really do want to be able force an update to files cached by the service worker, and add a version to my app's "about" UI.
I'll take a look at @ronnyroeller's one - thanks for that!

@stale
Copy link

stale bot commented Mar 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants