Skip to content

Commit

Permalink
Use npm module SVGO to optimize .svg files
Browse files Browse the repository at this point in the history
Note: though I'm adding a new module, the additions to npm_exclude.txt
shrink npm_modules.tar.gz by 200KB+ (4436810 -> 4216240).

Bug: 954683

Change-Id: Ibbab9a954c4aa45f10fa5a3c3a1f3e694747d1ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1552415
Commit-Queue: Dan Beam <dbeam@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652714}
  • Loading branch information
danbeam authored and Commit Bot committed Apr 20, 2019
1 parent 541cc2f commit e42487c
Show file tree
Hide file tree
Showing 8 changed files with 1,921 additions and 7 deletions.
18 changes: 18 additions & 0 deletions third_party/node/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,21 @@ update NPM dependencies.

Local Modifications:
See chromium_polymer_bundler.patch


Name: SVG Optimizer
Short Name: svgo
URL: https://www.npmjs.com/package/svgo
Version: 1.2.0
Date: Feb 24, 2019
Revision: 0cc1d0a3d6d6ea38eb2f764d17fb097d9ffe6b31
License: MIT
License File: NOT_SHIPPED
Security Critical: Probably not (does rewrite .svg files displayed on chrome:// pages, though)
License Android Compatible: Yes?

Description:
SVG Optimizer is a Nodejs-based tool for optimizing SVG vector graphics files.

Local Modifications:
(none)
12 changes: 8 additions & 4 deletions third_party/node/node_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ def PathToCrisper():
return _path_in_node_modules('crisper', 'bin', 'crisper')


def PathToEsLint():
return _path_in_node_modules('eslint', 'bin', 'eslint')


def PathToPolymerCssBuild():
return _path_in_node_modules('polymer-css-build', 'bin', 'polymer-css-build')


def PathToUglify():
return _path_in_node_modules('uglify-es', 'bin', 'uglifyjs')
def PathToSvgo():
return _path_in_node_modules('svgo', 'bin', 'svgo')


def PathToEsLint():
return _path_in_node_modules('eslint', 'bin', 'eslint')
def PathToUglify():
return _path_in_node_modules('uglify-es', 'bin', 'uglifyjs')
2 changes: 1 addition & 1 deletion third_party/node/node_modules.tar.gz.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c0e0f34498afb3f363cc37cd2e9c1a020cb020d9
f7f479efd86894f51e85d120ddc4cb7c827c0ef0
5 changes: 5 additions & 0 deletions third_party/node/npm_exclude.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.html
hydrolysis/hydrolysis.js
*/jsdoc2md/
*.lock
*.md
*.png
*.sh
Expand All @@ -13,3 +14,7 @@ hydrolysis/hydrolysis.js
@types
*.woff
*.yml
Makefile
source-map.debug.js
powered-test/es6-destructuring-assignments.js
*.map
1 change: 1 addition & 0 deletions third_party/node/npm_include.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
svgo/.svgo.yml
Loading

0 comments on commit e42487c

Please sign in to comment.