Skip to content

Commit 2180c2e

Browse files
author
Nicolas Gallagher
committed
Depend on 'css' and remove migrated code
All the stringify code and tests are now part of the 'css' package. From now on, 'css-stringify' will merely export the `stringify` method of 'css'. Recommended that you depend on 'css' directly.
1 parent 87d6994 commit 2180c2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+24
-1284
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
node_modules
2-
test.css
3-
test.js

.npmignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

History.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
HEAD
2+
==================
3+
4+
* depend on the 'css' package, which now contains the stringifier
15

26
1.4.1 / 2013-12-09
37
==================

Makefile

Lines changed: 0 additions & 8 deletions
This file was deleted.

Readme.md

Lines changed: 7 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,15 @@
1-
# css-stringify [![Build Status](https://travis-ci.org/reworkcss/css-stringify.png)](https://travis-ci.org/reworkcss/css-stringify)
1+
# css-stringify
22

3-
CSS compiler using the AST provided by [css-parse](https://github.com/reworkcss/css-parse).
3+
JavaScript CSS stringifier for Node.js (exports the `stringify` method of [css](https://github.com/reworkcss/css))
44

5-
## API
5+
## Installation
66

7-
### stringify(object, [options])
7+
$ npm install css-stringify
88

9-
Accepts an AST `object` from css-parse and returns a CSS string.
9+
## Usage
1010

11-
```js
12-
var stringify = require('css-stringify');
13-
var parse = require('css-parse');
14-
15-
var ast = parse('body { font-size: 12px; }');
16-
var css = stringify(ast);
17-
```
18-
19-
Optionally you may `compress` the output:
20-
21-
```js
22-
var css = stringify(ast, { compress: true });
23-
```
24-
25-
Or return a `sourcemap` along with the CSS output,
26-
which requires the use of the css-parse `position` option.
27-
28-
```js
29-
var ast = parse('body { font-size: 12px; }', { position: true });
30-
var result = stringify(ast, { sourcemap: true });
31-
32-
result.code // string with CSS
33-
result.map // source map
34-
```
35-
36-
## Performance
37-
38-
Formats 15,000 lines of CSS (2mb) in 23ms on my macbook air.
11+
Please see the [css](https://github.com/reworkcss/css) module documentation.
3912

4013
## License
4114

42-
(The MIT License)
43-
44-
Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
45-
46-
Permission is hereby granted, free of charge, to any person obtaining
47-
a copy of this software and associated documentation files (the
48-
'Software'), to deal in the Software without restriction, including
49-
without limitation the rights to use, copy, modify, merge, publish,
50-
distribute, sublicense, and/or sell copies of the Software, and to
51-
permit persons to whom the Software is furnished to do so, subject to
52-
the following conditions:
53-
54-
The above copyright notice and this permission notice shall be
55-
included in all copies or substantial portions of the Software.
56-
57-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
58-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
59-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
60-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
61-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
62-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
63-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15+
MIT

examples/comments.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/comments.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/dialog.css

Lines changed: 0 additions & 92 deletions
This file was deleted.

examples/dialog.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/document.css

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/document.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/empty.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/empty.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/keyframes.css

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/keyframes.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/media.css

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/media.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/page.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/page.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/sourcemaps.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)