Export your sketch layer for code usage
以代码的形式导出sketch中的图层
-
Choose the layer you want to export
选择你想要导出的图层 -
Use shortcut
command(⌘) + `to export your code immediately
使用快捷键command(⌘) + `立即导出代码
-
Support PNG and SVG image type
支持PNG和SVG图片格式 -
Provide multiple templates for different usage, including code in html(innerHtml), css background and css mask.
提供多种代码使用场景模板,包括在html中嵌入的代码(innerHtml), css background或css mask -
Auto save your last copy preference
自动保存你上一次复制的选项 -
Compress SVG file widh svgo
使用svgo压缩SVG文件
-
Un-zip
解压 -
Double-click on imagecodeexporter.sketchplugin
双击imagecodeexporter.sketchplugin
Thanks to these project to give me some ideas about how to make this plugin
-
svgo-compressor sketch plugin of compressing svg while export svg file
-
sketch-image-compressor sketch plugin of compressing image
This plugin was created using skpm. For a detailed explanation on how things work, checkout the skpm Readme.
Install the dependencies
npm installOnce the installation is done, you can run some commands inside the project folder:
npm run buildTo watch for changes:
npm run watch