Sketch Measure 最新版本使用教程

Sketch Measure 最新版本使用教程

sketch-measure-latestThis is the fork to fix the original Sketch Measure with many features added. This initiated as a fix for v52 but I further added some features which you can see below in the log. Follow the plugin's author here:项目地址:https://gitcode.com/gh_mirrors/sk/sketch-measure-latest

1. 项目的目录结构及介绍

sketch-measure-latest/
├── README.md
├── sketch-measure.sketchplugin
│   ├── Contents
│   │   ├── Resources
│   │   │   ├── icons
│   │   │   └── ...
│   │   └── Sketch
│   │       ├── manifest.json
│   │       ├── my-command.js
│   │       └── ...
│   └── ...
└── ...
  • README.md: 项目说明文件,包含项目的基本信息和使用方法。
  • sketch-measure.sketchplugin: Sketch 插件的主要文件夹。
    • Contents/Resources: 包含插件所需的资源文件,如图标等。
    • Contents/Sketch: 包含插件的核心代码和配置文件。
      • manifest.json: 插件的清单文件,定义了插件的名称、版本、命令等。
      • my-command.js: 插件的具体功能实现代码。

2. 项目的启动文件介绍

插件的启动文件主要是 manifest.json,它定义了插件的基本信息和启动命令。以下是 manifest.json 的部分内容:

{
  "name": "Sketch Measure",
  "description": "Make it a fun to create spec for developers and teammates",
  "author": "UTOM",
  "homepage": "https://github.com/ellunium/sketch-measure-latest",
  "version": "2.8.1",
  "identifier": "com.utom.sketch-measure",
  "commands": [
    {
      "name": "Spec Export",
      "identifier": "spec-export",
      "script": "my-command.js",
      "handler": "onRun"
    }
  ],
  "menu": {
    "title": "Sketch Measure",
    "items": [
      "spec-export"
    ]
  }
}
  • name: 插件的名称。
  • description: 插件的描述。
  • author: 插件的作者。
  • version: 插件的版本。
  • identifier: 插件的唯一标识符。
  • commands: 定义了插件的命令,每个命令包含名称、标识符、脚本文件和处理函数。
  • menu: 定义了插件在 Sketch 菜单中的显示方式。

3. 项目的配置文件介绍

插件的配置文件主要是 manifest.json,它包含了插件的所有配置信息。以下是 manifest.json 的部分内容:

{
  "name": "Sketch Measure",
  "description": "Make it a fun to create spec for developers and teammates",
  "author": "UTOM",
  "homepage": "https://github.com/ellunium/sketch-measure-latest",
  "version": "2.8.1",
  "identifier": "com.utom.sketch-measure",
  "commands": [
    {
      "name": "Spec Export",
      "identifier": "spec-export",
      "script": "my-command.js",
      "handler": "onRun"
    }
  ],
  "menu": {
    "title": "Sketch Measure",
    "items": [
      "spec-export"
    ]
  }
}
  • name: 插件的名称。
  • description: 插件的描述。
  • author: 插件的作者。
  • version: 插件的版本。
  • identifier: 插件的唯一标识符。
  • commands: 定义了插件的命令,每个命令包含名称、标识符、脚本文件和处理函数。
  • menu: 定义了插件在 Sketch 菜单中的显示方式。

通过 manifest.json 文件,可以配置插件的基本信息、命令和菜单显示方式,从而实现插件的自定义和扩展。

sketch-measure-latestThis is the fork to fix the original Sketch Measure with many features added. This initiated as a fix for v52 but I further added some features which you can see below in the log. Follow the plugin's author here:项目地址:https://gitcode.com/gh_mirrors/sk/sketch-measure-latest

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

方苹奕

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值