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

How to remove default app icons from asset:precompile #78

Open
vestimir opened this issue Jul 17, 2019 · 3 comments
Open

How to remove default app icons from asset:precompile #78

vestimir opened this issue Jul 17, 2019 · 3 comments

Comments

@vestimir
Copy link

I noticed that precompile is also precompiling the images included (heart-xxx) in the gem (https://github.com/rossta/serviceworker-rails/blob/master/lib/serviceworker/engine.rb#L18-L22).

How can I skip them so it uses only the files I've specified in the manifest file (and save some time on the deployments).

Here's from my logs:

I, [2019-07-17T10:09:36.668722 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/icon-192x192-14aab0481a489b9c499ebf152723fa6e76096f60160f3fac831d01d0b47c760f.png
I, [2019-07-17T10:09:36.669896 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/icon-512x512-e270d5f3eeb4d0015bb984c25b69c6c39a0f600186de290ad97bee05004a911a.png
I, [2019-07-17T10:09:36.672091 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/icon-512x512-e270d5f3eeb4d0015bb984c25b69c6c39a0f600186de290ad97bee05004a911a.png

...

I, [2019-07-17T10:09:36.835203 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-1200x1200-b97c5e2be6dd37b74d3616b834bb00b865ff7e6e42596806602ebe0d05a69914.png
I, [2019-07-17T10:09:36.839824 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-120x120-6af554cd96341e1bb4457a53727a6daf9beaf9cd383b9f49d13e8ff48d9d6995.png
I, [2019-07-17T10:09:36.848787 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-152x152-0f965e88ace9d61e0c43fe5dc1c920c7548136d42d9d3744f977b3636b649fde.png
I, [2019-07-17T10:09:36.852965 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-180x180-87a26af4da86a713ec42d0d5dc94f7b4ad414abfc7005b06c9b4b066318d897a.png
I, [2019-07-17T10:09:36.858133 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-192x192-5f6108b873e5fa9a94d74e6848cace923310f98803d4481429f184b586ce0119.png
I, [2019-07-17T10:09:36.864988 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-36x36-2f0b196ef98bf6940e9719e60844273b6c3607a127ab21803a989b51dcf490bc.png
I, [2019-07-17T10:09:36.869506 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-48x48-62d30c6acdef83c42a01121be6501b2552995be96441b9eadaedca446d7f4b5f.png
I, [2019-07-17T10:09:36.873809 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-512x512-f62845cd4dbf565496ffe50bc26742a0ba0a14016ebc810469cdfe4a8ebe11c5.png
I, [2019-07-17T10:09:36.880421 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-60x60-9aea3d29f6a85dd246f89d9db36e1944c9f9fd649d052c278bf2a31f37cce6d8.png
I, [2019-07-17T10:09:36.886786 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-72x72-474e889752849872383f5a3a9528107e610cd7d723bf483aebb8dd4e3adadc5c.png
I, [2019-07-17T10:09:36.892438 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-76x76-cebcd7285592aa664bc437131a55b0434043a3adc3a292ac0aef98e900c2dcde.png
I, [2019-07-17T10:09:36.900101 #6]  INFO -- : Writing /app/public/assets/serviceworker-rails/heart-96x96-817f2a443ddb4b6b607e6538b2c37cfe46da24b77d9622b54d6f1800d1187018.png
@rossta
Copy link
Owner

rossta commented Jul 17, 2019

I agree it would be nice to omit the baked in defaults if you don't need them. They're included automatically in the engine: https://github.com/rossta/serviceworker-rails/blob/c2ea427b3164df2e237a94aed62259c9b6890192/lib/serviceworker/engine.rb#L18-L2

A PR to omit these files optionally would be welcome.

@vestimir
Copy link
Author

vestimir commented Jul 26, 2019

What would be best:

  • Option 1: if any custom icons are set in manifest.json.erb, skip building of pre-packaged heart icons
  • Option 2: dedicated option to skip the inclusion of the pre-packaged icons

I'd go with option 1, what do you think?

PS: Thanks for the library!

@unurgunite
Copy link

As for me, I just change default icons from gem's source code to my own icons

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

3 participants