Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
31 lines (31 loc) · 2.77 KB
/
Copy pathpackage.json
File metadata and controls
31 lines (31 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"author": {
"name": "Franck Marcia",
"email": "franck.marcia@gmail.com",
"url": "https://github.com/fmarcia"
},
"name": "uglifycss",
"description": "Port of YUI CSS Compressor to NodeJS",
"version": "0.0.8",
"license": "MIT",
"homepage": "https://github.com/fmarcia/UglifyCSS",
"repository": {
"type": "git",
"url": "git://github.com/fmarcia/UglifyCSS.git"
},
"main": "./index.js",
"bin": {
"uglifycss": "./uglifycss"
},
"readme": "UglifyCSS is a port of [YUI Compressor](https://github.com/yui/yuicompressor) to [NodeJS](http://nodejs.org) for its CSS part. Its name is a reference to the awesome [UglifyJS](https://github.com/mishoo/UglifyJS) but UglifyCSS is not a CSS parser. Like YUI CSS Compressor, it applies many regexp replacements. Note that a [port to JavaScript](https://github.com/yui/ycssmin) is also available in the YUI Compressor repository.\n\nUglifyCSS passes successfully the test suite of YUI compressor CSS.\n\n### Installation\n\nFor a command line usage:\n```sh\n$ npm install uglifycss -g\n```\n\nFor API usage:\n```sh\n$ npm install uglifycss\n```\n\nFrom Github:\n```sh\n$ git clone git://github.com/fmarcia/UglifyCSS.git\n```\n\n### Command line\n\n```sh\n$ uglifycss [options] css1 [css2] [...] > output\n```\n\nOptions:\n\n* `--max-line-len n` adds a newline (approx.) every `n` characters; `0` means no newline and is the default value\n* `--expand-vars` expands variables; by default, `@variables` blocks are preserved and `var(x)`s are not expanded\n* `--ugly-comments` removes newlines within preserved comments; by default, newlines are preserved\n* `--cute-comments` preserves newlines within and around preserved comments\n\n\n### API\n\n2 functions are provided:\n\n* `processString( content, options )` to process a given string\n* `processFiles( [ filename1, ... ], options )` to process the concatenation of given files\n\nOptions are identical to the command line:\n* `<int> maxLineLen` for `--max-line-len n`\n* `<bool> expandVars` for `--expand-vars`\n* `<bool> uglyComments` for `--ugly-comments`\n* `<bool> cuteComments` for `--cute-comments`\n\nBoth functions return uglified css.\n\n#### Example\n\n```js\nvar uglifycss = require('uglifycss');\n\nvar uglified = uglifycss.processFile(\n [ 'file1', 'file2' ],\n { maxLineLen: 500, expandVars: true }\n);\n\nconsole.log(uglified);\n```\n\nSee also [test.js](https://github.com/fmarcia/UglifyCSS/blob/master/test.js).\n\n### License\n\nUglifyCSS is MIT licensed.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/fmarcia/UglifyCSS/issues"
},
"_id": "uglifycss@0.0.8",
"dist": {
"shasum": "ce3ef49a9684a304d75b73ac6ac9f5a134849b71"
},
"_from": "uglifycss@",
"_resolved": "https://registry.npmjs.org/uglifycss/-/uglifycss-0.0.8.tgz"
}