├── .gitignore ├── .npmignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── bin └── juice ├── index.js ├── lib ├── juice.js ├── property.js ├── selector.js └── utils.js ├── package.json └── test ├── cases ├── alpha.css ├── alpha.html ├── alpha.out ├── cascading.css ├── cascading.html ├── cascading.out ├── class+id.css ├── class+id.html ├── class+id.out ├── class.css ├── class.html ├── class.out ├── css-quotes.css ├── css-quotes.html ├── css-quotes.out ├── direct-descendents.css ├── direct-descendents.html ├── direct-descendents.out ├── empty.css ├── empty.html ├── empty.out ├── id.css ├── id.html ├── id.out ├── ignore-pseudos.css ├── ignore-pseudos.html ├── ignore-pseudos.out ├── important.css ├── important.html ├── important.out ├── jsdom.css ├── jsdom.html ├── jsdom.out ├── juice-content │ ├── apply-link-to-style-tag-mq.css │ ├── apply-link-to-style-tag-mq.html │ ├── apply-link-to-style-tag-mq.json │ ├── apply-link-to-style-tag-mq.out │ ├── apply-link-to-style-tag.css │ ├── apply-link-to-style-tag.html │ ├── apply-link-to-style-tag.json │ ├── apply-link-to-style-tag.out │ ├── font-quotes.css │ ├── font-quotes.html │ ├── font-quotes.json │ ├── font-quotes.out │ ├── important.css │ ├── important.html │ ├── important.json │ ├── important.out │ ├── media-preserve.css │ ├── media-preserve.html │ ├── media-preserve.json │ ├── media-preserve.out │ ├── width-attr.css │ ├── width-attr.html │ ├── width-attr.json │ └── width-attr.out ├── media.css ├── media.html ├── media.out ├── normalize.css ├── normalize.html ├── normalize.out ├── preserve-events.css ├── preserve-events.html ├── preserve-events.out ├── regression-media.css ├── regression-media.html ├── regression-media.out ├── regression-selector-newline.css ├── regression-selector-newline.html ├── regression-selector-newline.out ├── specificity.css ├── specificity.html ├── specificity.out ├── style-preservation.css ├── style-preservation.html ├── style-preservation.out ├── tag.css ├── tag.html ├── tag.out ├── yui-reset.css ├── yui-reset.html └── yui-reset.out ├── html ├── Test.css ├── doctype.in.html ├── doctype.out.html ├── no_css.in.html ├── no_css.out.html ├── remote_url.in.html ├── remote_url.out.html ├── spaces in path │ └── Test.css ├── spaces_in_path.in.html ├── spaces_in_path.out.html ├── two_styles.in.html └── two_styles.out.html ├── juice.test.js ├── run.js └── test.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *~ 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | support/ 3 | README.md 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/README.md -------------------------------------------------------------------------------- /bin/juice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/bin/juice -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/juice'); 3 | -------------------------------------------------------------------------------- /lib/juice.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/lib/juice.js -------------------------------------------------------------------------------- /lib/property.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/lib/property.js -------------------------------------------------------------------------------- /lib/selector.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/lib/selector.js -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/lib/utils.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/package.json -------------------------------------------------------------------------------- /test/cases/alpha.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0; 3 | } 4 | -------------------------------------------------------------------------------- /test/cases/alpha.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/alpha.html -------------------------------------------------------------------------------- /test/cases/alpha.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/alpha.out -------------------------------------------------------------------------------- /test/cases/cascading.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/cascading.css -------------------------------------------------------------------------------- /test/cases/cascading.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/cascading.html -------------------------------------------------------------------------------- /test/cases/cascading.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/cascading.out -------------------------------------------------------------------------------- /test/cases/class+id.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/class+id.css -------------------------------------------------------------------------------- /test/cases/class+id.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/class+id.html -------------------------------------------------------------------------------- /test/cases/class+id.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/class+id.out -------------------------------------------------------------------------------- /test/cases/class.css: -------------------------------------------------------------------------------- 1 | .woot { 2 | overflow: hidden; 3 | } 4 | -------------------------------------------------------------------------------- /test/cases/class.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/class.html -------------------------------------------------------------------------------- /test/cases/class.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/class.out -------------------------------------------------------------------------------- /test/cases/css-quotes.css: -------------------------------------------------------------------------------- 1 | p { 2 | background: url("/woot"); 3 | } 4 | -------------------------------------------------------------------------------- /test/cases/css-quotes.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/css-quotes.html -------------------------------------------------------------------------------- /test/cases/css-quotes.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/css-quotes.out -------------------------------------------------------------------------------- /test/cases/direct-descendents.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/direct-descendents.css -------------------------------------------------------------------------------- /test/cases/direct-descendents.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/direct-descendents.html -------------------------------------------------------------------------------- /test/cases/direct-descendents.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/direct-descendents.out -------------------------------------------------------------------------------- /test/cases/empty.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cases/empty.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/empty.html -------------------------------------------------------------------------------- /test/cases/empty.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/empty.out -------------------------------------------------------------------------------- /test/cases/id.css: -------------------------------------------------------------------------------- 1 | #test { 2 | display: none; 3 | } 4 | -------------------------------------------------------------------------------- /test/cases/id.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/id.html -------------------------------------------------------------------------------- /test/cases/id.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/id.out -------------------------------------------------------------------------------- /test/cases/ignore-pseudos.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/ignore-pseudos.css -------------------------------------------------------------------------------- /test/cases/ignore-pseudos.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/ignore-pseudos.html -------------------------------------------------------------------------------- /test/cases/ignore-pseudos.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/ignore-pseudos.out -------------------------------------------------------------------------------- /test/cases/important.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/important.css -------------------------------------------------------------------------------- /test/cases/important.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/important.html -------------------------------------------------------------------------------- /test/cases/important.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/important.out -------------------------------------------------------------------------------- /test/cases/jsdom.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cases/jsdom.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cases/jsdom.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/jsdom.out -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag-mq.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag-mq.css -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag-mq.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag-mq.html -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag-mq.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag-mq.json -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag-mq.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag-mq.out -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag.css: -------------------------------------------------------------------------------- 1 | p { 2 | width: 200px; 3 | } -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag.html -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag.json -------------------------------------------------------------------------------- /test/cases/juice-content/apply-link-to-style-tag.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/apply-link-to-style-tag.out -------------------------------------------------------------------------------- /test/cases/juice-content/font-quotes.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cases/juice-content/font-quotes.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/font-quotes.html -------------------------------------------------------------------------------- /test/cases/juice-content/font-quotes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/font-quotes.json -------------------------------------------------------------------------------- /test/cases/juice-content/font-quotes.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/font-quotes.out -------------------------------------------------------------------------------- /test/cases/juice-content/important.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cases/juice-content/important.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/important.html -------------------------------------------------------------------------------- /test/cases/juice-content/important.json: -------------------------------------------------------------------------------- 1 | { 2 | "preserveImportant": true 3 | } -------------------------------------------------------------------------------- /test/cases/juice-content/important.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/important.out -------------------------------------------------------------------------------- /test/cases/juice-content/media-preserve.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cases/juice-content/media-preserve.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/media-preserve.html -------------------------------------------------------------------------------- /test/cases/juice-content/media-preserve.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/media-preserve.json -------------------------------------------------------------------------------- /test/cases/juice-content/media-preserve.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/media-preserve.out -------------------------------------------------------------------------------- /test/cases/juice-content/width-attr.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cases/juice-content/width-attr.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/width-attr.html -------------------------------------------------------------------------------- /test/cases/juice-content/width-attr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/width-attr.json -------------------------------------------------------------------------------- /test/cases/juice-content/width-attr.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/juice-content/width-attr.out -------------------------------------------------------------------------------- /test/cases/media.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/media.css -------------------------------------------------------------------------------- /test/cases/media.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/media.html -------------------------------------------------------------------------------- /test/cases/media.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/media.out -------------------------------------------------------------------------------- /test/cases/normalize.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/normalize.css -------------------------------------------------------------------------------- /test/cases/normalize.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/normalize.html -------------------------------------------------------------------------------- /test/cases/normalize.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/normalize.out -------------------------------------------------------------------------------- /test/cases/preserve-events.css: -------------------------------------------------------------------------------- 1 | p { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /test/cases/preserve-events.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/preserve-events.html -------------------------------------------------------------------------------- /test/cases/preserve-events.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/preserve-events.out -------------------------------------------------------------------------------- /test/cases/regression-media.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/regression-media.css -------------------------------------------------------------------------------- /test/cases/regression-media.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/regression-media.html -------------------------------------------------------------------------------- /test/cases/regression-media.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/regression-media.out -------------------------------------------------------------------------------- /test/cases/regression-selector-newline.css: -------------------------------------------------------------------------------- 1 | a, 2 | p { 3 | color: red; 4 | } 5 | -------------------------------------------------------------------------------- /test/cases/regression-selector-newline.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/regression-selector-newline.html -------------------------------------------------------------------------------- /test/cases/regression-selector-newline.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/regression-selector-newline.out -------------------------------------------------------------------------------- /test/cases/specificity.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/specificity.css -------------------------------------------------------------------------------- /test/cases/specificity.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/specificity.html -------------------------------------------------------------------------------- /test/cases/specificity.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/specificity.out -------------------------------------------------------------------------------- /test/cases/style-preservation.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/style-preservation.css -------------------------------------------------------------------------------- /test/cases/style-preservation.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/style-preservation.html -------------------------------------------------------------------------------- /test/cases/style-preservation.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/style-preservation.out -------------------------------------------------------------------------------- /test/cases/tag.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/tag.css -------------------------------------------------------------------------------- /test/cases/tag.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/tag.html -------------------------------------------------------------------------------- /test/cases/tag.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/tag.out -------------------------------------------------------------------------------- /test/cases/yui-reset.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/yui-reset.css -------------------------------------------------------------------------------- /test/cases/yui-reset.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/yui-reset.html -------------------------------------------------------------------------------- /test/cases/yui-reset.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/cases/yui-reset.out -------------------------------------------------------------------------------- /test/html/Test.css: -------------------------------------------------------------------------------- 1 | strong { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /test/html/doctype.in.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/doctype.in.html -------------------------------------------------------------------------------- /test/html/doctype.out.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/doctype.out.html -------------------------------------------------------------------------------- /test/html/no_css.in.html: -------------------------------------------------------------------------------- 1 |

hi

2 | -------------------------------------------------------------------------------- /test/html/no_css.out.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/no_css.out.html -------------------------------------------------------------------------------- /test/html/remote_url.in.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/remote_url.in.html -------------------------------------------------------------------------------- /test/html/remote_url.out.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/remote_url.out.html -------------------------------------------------------------------------------- /test/html/spaces in path/Test.css: -------------------------------------------------------------------------------- 1 | strong { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /test/html/spaces_in_path.in.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/spaces_in_path.in.html -------------------------------------------------------------------------------- /test/html/spaces_in_path.out.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/spaces_in_path.out.html -------------------------------------------------------------------------------- /test/html/two_styles.in.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/two_styles.in.html -------------------------------------------------------------------------------- /test/html/two_styles.out.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/html/two_styles.out.html -------------------------------------------------------------------------------- /test/juice.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/juice.test.js -------------------------------------------------------------------------------- /test/run.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/run.js -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewrk/juice/HEAD/test/test.js --------------------------------------------------------------------------------