Skip to content

Commit

Permalink
Update dependencies to latest major versions (SVGO 1.x.x) (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
toptalo authored and sindresorhus committed Nov 24, 2017
1 parent 443f186 commit 8b898ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"minify"
],
"dependencies": {
"chalk": "^1.0.0",
"each-async": "^1.0.0",
"log-symbols": "^1.0.0",
"chalk": "^2.3.0",
"each-async": "^1.1.1",
"log-symbols": "^2.1.0",
"pretty-bytes": "^4.0.2",
"svgo": "^0.7.0"
"svgo": "^1.0.3"
},
"devDependencies": {
"grunt": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion tasks/svgmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = grunt => {
const srcPath = el.src[0];
const srcSvg = grunt.file.read(srcPath);

svgo.optimize(srcSvg, result => {
svgo.optimize(srcSvg).then(result => {
if (result.error) {
grunt.warn(srcPath + ': ' + result.error);
next();
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ it('minifies svgo but preserves viewBox attribute', () => {
const original = fs.statSync('test/fixtures/test.svg').size;
const minified = fs.statSync('test/tmp/withconfig.svg').size;
assert(minified < original);
// the output svg should still contain the viewBox attribute
// The output svg should still contain the viewBox attribute
const svg = fs.readFileSync('test/tmp/withconfig.svg').toString();
assert(svg.indexOf('viewBox="0 0 360 334.99"') > 0);
});

0 comments on commit 8b898ab

Please sign in to comment.