Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract .inline() into rework-plugin-inline #146

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/rework.js
Expand Up @@ -145,12 +145,4 @@ exports.ease = require('./plugins/ease');
};
});

/**
* Try/catch plugins unavailable in component.
*/

try {
exports.inline = require('./plugins/inline');
} catch (err) {}

function noop(){}
Binary file removed test/fixtures/images/dot.png
Binary file not shown.
3 changes: 0 additions & 3 deletions test/fixtures/inline.css

This file was deleted.

3 changes: 0 additions & 3 deletions test/fixtures/inline.out.css

This file was deleted.

24 changes: 0 additions & 24 deletions test/rework.js
Expand Up @@ -249,30 +249,6 @@ describe('rework', function(){
})
})

describe('.inline(dir)', function(){
it('should inline images', function(){
rework(fixture('inline'))
.use(rework.inline('lib/', 'test/fixtures'))
.toString()
.should.equal(fixture('inline.out'));
})

it('should accept dirs in array', function(){
rework(fixture('inline'))
.use(rework.inline(['lib/', 'test/fixtures']))
.toString()
.should.equal(fixture('inline.out'));
})

it('should throw error on nonexistent file', function(){
(function(){
rework(fixture('inline'))
.use(rework.inline())
.toString()
}).should.throw(/dot.png/)
})
})

describe('.toString() compress option', function(){
it('should compress the output', function(){
rework('body { color: red; }')
Expand Down