| Index: third_party/WebKit/Source/devtools/scripts/assemble_spritesheet.js
|
| diff --git a/third_party/WebKit/Source/devtools/scripts/assemble_spritesheet.js b/third_party/WebKit/Source/devtools/scripts/assemble_spritesheet.js
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..516217df4cee9c6c2d12bd8477e8dbdce14496f7
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/devtools/scripts/assemble_spritesheet.js
|
| @@ -0,0 +1,26 @@
|
| +#!/usr/bin/env node
|
| +
|
| +var path = require('path');
|
| +var exec = require('child_process').exec;
|
| +var writeSVGAndDescriptors = require('./spritesheet_assembler');
|
| +
|
| +// Write new spritesheet.
|
| +var frontendFolder = path.join(__dirname, '..', 'front_end');
|
| +var iconsFolder = path.join(frontendFolder, 'Images', 'icons');
|
| +var outputSVGPath = path.join(frontendFolder, 'Images', 'src', 'icons_spritesheet.svg');
|
| +var outputJSPath = path.join(frontendFolder, 'ui', 'GeneratedIconDescriptors.js');
|
| +writeSVGAndDescriptors(iconsFolder, 1, outputSVGPath, outputJSPath);
|
| +
|
| +// Convert SVG to PNG.
|
| +var convertScript = 'convert_svg_images_to_png.py';
|
| +var convertScriptPath = path.join(__dirname, convertScript);
|
| +var cmd = 'python ' + convertScriptPath;
|
| +console.log('Running ' + convertScript);
|
| +exec(cmd, function(error, stdout, stderr) {
|
| + if (error) {
|
| + console.error(stderr);
|
| + return;
|
| + }
|
| + console.log(stdout);
|
| + console.log('DONE. Don\'t forget to optimize your images!');
|
| +});
|
|
|