Git Product home page Git Product logo

ember-cli-deploy-gzip's Introduction

Ember CLI Deploy

Build Status Code Climate

Simple, flexible deployment for your Ember CLI app

Installation

ember install ember-cli-deploy

Quick start

After installation, choose plugins matching your deployment environment, configure your deployment script appropriately and you're ready to start deploying.

In-depth documentation

Visit the Docs site

Contributing

Clone the repo and run npm install. To run tests,

npm test

ember-cli-deploy-gzip's People

Contributors

achambers avatar avdv avatar chrisgame avatar dannyfallon avatar dependabot[bot] avatar dschmidt avatar ghedamat avatar jasonkriss avatar jrjohnson avatar lukemelia avatar wagenet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ember-cli-deploy-gzip's Issues

ignorePattern doesn't seem to be working

Howdy 👋

Just trying to stop this gzipping my sourcemaps and I've been trying to add an ignorePattern that doesn't seem to be working 😕

I've tried ignorePattern: '**.map' and ignorePattern: '*.map' but they both still gzipped my sourcemaps. I even tried ignorePattern: '\*\*/\*.map', which I lifted from the default filePattern 😂

I ended up working around this by just using filePattern with map removed as an option, but I figured I should open an issue to see if there is anything I can do to help. I would love to add a failing test if someone could at least point me in the right direction.

Why compress jpg, png and gif?

I just saw that jpg, png and gif images are compressed by default. These formats already are compressed and it is unlikely that gzipping them will reduce the file size. In fact, it might even increase it and / or introduce a slight performance regression on the client-side due to the added (and unnecessary) CPU work.

If this is a mistake and not intended, I'll submit a PR to fix this - if wanted.

Keep modification time the same as the original file

When using the gzip_static on` directive of nginx, the manual says:

The files can be compressed using the gzip command, or any other compatible one. It is recommended that the modification date and time of original and compressed files be the same.

Add an option to only keep gzipped files when smaller

Sometimes you do not really know whether a file compresses good (enough) with gzip so that it will actually become smaller.

It would be nice to introduce an option which will discard the gzipped file if the resulting file is larger, and just keep the original one.

gzipped javascript files produce errors

I installed and ember-cli-deploy-gzip run a deploy, my assets are uploaded and they contain errors:

  • Chrome: Uncaught SyntaxError: Invalid or unexpected token
  • Firefox: SyntaxError: illegal character

Both at vendor-***.js:1

My config is here:

	ENV.gzip = {
		ignorePattern: '**/{crossdomain.xml,robots.txt}'
	};

Without the ignorePattern, the browsers also weren't able to parse crossdomain.xml or rather robots.txt

Issue with compressed files

Hi,

If I use ember-cli-deploy without gzip things work fine.

After installing ember-cli-deploy-gzip the assets now render from the server as strange characters.

For example, my application js file if I go to the URL displays this

�‹��������í}ÛvÛF²è»¿�Á¬��Ë�L‚�Q˜Å�#kì8�ËñXv2{kky5�&	��`\$2Š^ÏóùÆó%§ª»q%H�Œ$‹9Qb	è®nTUWUWõUŽC*…Q`›‘üÄ¢SÛ¥-Ù�ˆ;£j@,ÛS¯é„øþ3b�?¢Aø^�Û$‘í¹²r!Ó¥ï�Q(+2]Lh Z$"ðRUE�ÙNølF]��ˆª‘÷™ºò¥2�]�kkQ%R‚öÍÏ“OÔŒ4ŽÌÛÀói�­ Sþø‘†gž�;TVn®ˆ�Sã›Îm[¡�Kb'�GÉ“öÏóŸßœ¼ýñ„c­ÑeD]«u3÷ÂÈ�çQä�Ï€�[×�†�GW3½…¬¸dACŸ˜Ô�¯tY™Sb�ÝÆ�$�!ü8¢VKæé��GÎ(h�Z�DÇ­Ž�$¨´[ÑÜ�µ�¼ý$ Q�¸7ò¿Õ�ßæ�ú`[²Aµ8¶-�Ò�>‰£¹úž1�’�§�ùÄ4©�©¯�՘̨lÈÔU?œË··míÊs I�ÚjßÂ�J­–d©Å6¬ßò¢¹mwê@kyÁ}5dÒr_b�¬Œò'�
Ä) 

(I've just included the start to give an illustration the actual file is a lot longer).

I notice that if I look in the /tmp/deploy-dist/assets directory this matches how the file looks locally there.

Initially I thought it might be an issue with the server not supporting gzip, so I followed a tutorial online and now when I use a site to check for gzip support it says that GZIP is supported.

So now I'm at a loss as to how to fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.