Git Product home page Git Product logo

gulp-uglifycss's Introduction

gulp-uglifycss

Gulp plugin to use UglifyCSS.

Build Status

Install

npm install --save gulp-uglifycss

Usage

var uglifycss = require('gulp-uglifycss');

gulp.task('css', function () {
  gulp.src('./styles/**/*.css')
    .pipe(uglifycss({
      "maxLineLen": 80,
      "uglyComments": true
    }))
    .pipe(gulp.dest('./dist/'));
});

Options

No specific options. You can use all the UglifyCSS options.

gulp-uglifycss's People

Contributors

ajaxray avatar armandabric avatar justinpinili avatar neilrees avatar shouze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gulp-uglifycss's Issues

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

I got this weird error today that I can't seem to fix

<--- Last few GCs --->

   16759 ms: Scavenge 810.9 (1456.0) -> 810.9 (1457.0) MB, 0.6 / 0 ms [allocation failure].
   16759 ms: Scavenge 811.4 (1457.0) -> 811.4 (1457.0) MB, 0.3 / 0 ms [allocation failure].
   16759 ms: Scavenge 811.4 (1457.0) -> 811.4 (1457.0) MB, 0.4 / 0 ms [allocation failure].
   16819 ms: Mark-sweep 811.4 (1457.0) -> 811.4 (1457.0) MB, 59.3 / 0 ms [last resort gc].
   16881 ms: Mark-sweep 811.4 (1457.0) -> 811.4 (1457.0) MB, 62.5 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2ad5b5337339 <JS Object>
    1: indexOf(aka indexOf) [native string.js:~76] [pc=0x1c9dfaa0c6a4] (this=0x3564aba83b71 <Very long string[261282]>,z=0x1fba144d33f9 <String[2]: /*>)
    2: arguments adaptor frame: 2->1
    3: processString [/Users/SubZane/Sites/Knowit/folktandvarden-intranet/frontend/node_modules/gulp-uglifycss/node_modules/uglifycss/uglifycss-lib.js:288] [pc=0x1c9dfaacdf23] (this=0xa3cce6ea911 <an
Object ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Abort trap: 6

Sourcemap problems

Made an exemple at:
puggan/gulp-test@819afc7

the all.css.map file works as expected, referencing to the right less-file.

but the all.min.css.map dosn't.
after runing gulp the style for header references to b.less.
if i run gulp re-uglifycss, the styles all refers to all.min.css

  1. Why do the 2 task give different results?
  2. What can I do to make the sourcemap work again?

Yarn package just broke

info No lockfile found.
warning prezola.com: No license field
[1/4] Resolving packages...
warning gulp > vinyl-fs > glob-stream > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 28/03/2017, 11:08:08
warning browser-sync > localtunnel > request > [email protected]: Use uuid module instead
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/gulp-uglifycss/-/gulp-uglifycss-1.0.7.tgz: invalid tar file".
info If you think this is a bug, please open a bug report with the information provided in "/srv/src/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Removing intermediate container ab2294a90d76```

Spaces removed in url

Hi there,

Just changed a site we are working on from dev to live, minified versions of the js and css and have noticed we have a problem with urls having all spaces removed, fine except for we are using the following to create a styled dropdown arrow in a select box.

url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="32" height="24" viewBox="0 0 32 24"><polygon points="0,0 32,0 16,24" style="fill: rgb%2851, 51, 51%29"></polygon></svg>')

after uglifycss gets through with it we get this

url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg "version="1.1"width="32"height="24"viewBox="003224"><polygonpoints="0,032,016,24"style="fill:rgb%2851,51,51%29"></polygon></svg>')

This results in the svg not being displayed. The issue seems to be the same one as reported here: fmarcia/uglifycss#38

We are loading the dependency as follows:

"gulp-uglifycss": "^1.0.5"

Any thoughts on how we can fix this issue?

Cheers,

Will

cb() never called

as of today couple hours ago I receive cb() never called from npm install

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.