Skip to content

Commit 2d55f53

Browse files
committed
feat: build d.ts of sketch v60
1 parent a1df7e7 commit 2d55f53

File tree

3 files changed

+2351
-49215
lines changed

3 files changed

+2351
-49215
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# sketchapp-types
22

3-
<div align="center">
4-
TypeScript declaration files for Sketch App.
3+
TypeScript declaration files for Sketch v60.
54

65
![preview](resources/gif.gif)
7-
</div>
86

97
## Known issues
108

src/generate.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const extraSymbols = [
3737
'_MSImmutableHotspotLayer', '_MSAssetContainer'
3838
]
3939

40-
function generate (context: SketchContext) {
40+
export default function generate (context: SketchContext) {
4141
try {
42-
const output = String(context.scriptPath).replace(/\/[^/]*\/[^/]*\/[^/]*\/[^/]*\/[^/]*$/, '/types/sketch.d.ts')
42+
const output = String(context.scriptPath).replace(/\/[^/]*\/[^/]*\/[^/]*\/[^/]*$/, '/types/sketch.d.ts')
4343
generateDo(context, /^_?MS/, output)
4444
} catch (e) {
4545
context.document.showMessage(e.message || String(e))
@@ -243,7 +243,3 @@ function writeFile (path: string, content: string) {
243243
const string = NSString.stringWithFormat('%@', content)
244244
return string.writeToFile_atomically(path, true)
245245
}
246-
247-
export {
248-
generate,
249-
}

0 commit comments

Comments
 (0)