summaryrefslogtreecommitdiff
path: root/tools/test-helper/package.json
blob: 0f806eb96bcbbfb373a28cdd1ea3708543faf5f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
  "name": "test-helper",
  "publisher": "typst",
  "displayName": "Typst Test Helper",
  "description": "Helps to run, compare and update Typst tests.",
  "version": "0.0.1",
  "engines": {
    "vscode": "^1.71.0"
  },
  "categories": [
    "Other"
  ],
  "activationEvents": [
    "onCommand:Typst.test-helper.openFromSource",
    "onCommand:Typst.test-helper.refreshFromSource",
    "onCommand:Typst.test-helper.refreshFromPreview",
    "onCommand:Typst.test-helper.runFromSource",
    "onCommand:Typst.test-helper.runFromPreview",
    "onCommand:Typst.test-helper.updateFromSource",
    "onCommand:Typst.test-helper.updateFromPreview",
    "onCommand:Typst.test-helper.copyImageFilePathFromPreviewContext"
  ],
  "main": "./extension.js",
  "contributes": {
    "commands": [
      {
        "command": "Typst.test-helper.openFromSource",
        "title": "Open test output",
        "category": "Typst.test-helper",
        "icon": "$(plus)"
      },
      {
        "command": "Typst.test-helper.refreshFromSource",
        "title": "Refresh preview",
        "category": "Typst.test-helper",
        "icon": "$(refresh)"
      },
      {
        "command": "Typst.test-helper.refreshFromPreview",
        "title": "Refresh preview",
        "category": "Typst.test-helper",
        "icon": "$(refresh)"
      },
      {
        "command": "Typst.test-helper.runFromSource",
        "title": "Run test",
        "category": "Typst.test-helper",
        "icon": "$(debug-start)",
        "enablement": "!Typst.test-helper.disableRunTestButton"
      },
      {
        "command": "Typst.test-helper.runFromPreview",
        "title": "Run test",
        "category": "Typst.test-helper",
        "icon": "$(debug-start)",
        "enablement": "!Typst.test-helper.disableRunTestButton"
      },
      {
        "command": "Typst.test-helper.updateFromSource",
        "title": "Update reference image",
        "category": "Typst.test-helper",
        "icon": "$(save)"
      },
      {
        "command": "Typst.test-helper.updateFromPreview",
        "title": "Update reference image",
        "category": "Typst.test-helper",
        "icon": "$(save)"
      },
      {
        "command": "Typst.test-helper.copyImageFilePathFromPreviewContext",
        "title": "Copy image file path"
      }
    ],
    "menus": {
      "editor/title": [
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.openFromSource",
          "group": "navigation@1"
        },
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.refreshFromSource",
          "group": "navigation@2"
        },
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.runFromSource",
          "group": "navigation@3"
        },
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.updateFromSource",
          "group": "navigation@4"
        },
        {
          "when": "activeWebviewPanelId == Typst.test-helper.preview",
          "command": "Typst.test-helper.refreshFromPreview",
          "group": "navigation@1"
        },
        {
          "when": "activeWebviewPanelId == Typst.test-helper.preview",
          "command": "Typst.test-helper.runFromPreview",
          "group": "navigation@2"
        },
        {
          "when": "activeWebviewPanelId == Typst.test-helper.preview",
          "command": "Typst.test-helper.updateFromPreview",
          "group": "navigation@3"
        }
      ],
      "webview/context": [
        {
          "command": "Typst.test-helper.copyImageFilePathFromPreviewContext",
          "when": "webviewId == Typst.test-helper.preview && (webviewSection == png || webviewSection == ref)"
        }
      ]
    }
  },
  "devDependencies": {
    "@types/vscode": "^1.53.0",
    "@types/node": "^12.11.7"
  }
}