Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/assemble_spritesheet.js

Issue 2671413004: DevTools: introduce spritesheet assembler. (Closed)
Patch Set: rebaseline tests Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env node
2
3 var path = require('path');
4 var exec = require('child_process').exec;
5 var writeSVGAndDescriptors = require('./spritesheet_assembler');
6
7 // Write new spritesheet.
8 var frontendFolder = path.join(__dirname, '..', 'front_end');
9 var iconsFolder = path.join(frontendFolder, 'Images', 'icons');
10 var outputSVGPath = path.join(frontendFolder, 'Images', 'src', 'icons_spriteshee t.svg');
11 var outputJSPath = path.join(frontendFolder, 'ui', 'GeneratedIconDescriptors.js' );
12 writeSVGAndDescriptors(iconsFolder, 1, outputSVGPath, outputJSPath);
13
14 // Convert SVG to PNG.
15 var convertScript = 'convert_svg_images_to_png.py';
16 var convertScriptPath = path.join(__dirname, convertScript);
17 var cmd = 'python ' + convertScriptPath;
18 console.log('Running ' + convertScript);
19 exec(cmd, function(error, stdout, stderr) {
20 if (error) {
21 console.error(stderr);
22 return;
23 }
24 console.log(stdout);
25 console.log('DONE. Don\'t forget to optimize your images!');
26 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698