Skip to content

Commit d4bc844

Browse files
authored
Merge pull request #5 from Inventsable/master
Updating default paths to 2019, support for running typescript files
2 parents 05ad425 + b36a828 commit d4bc844

6 files changed

Lines changed: 57 additions & 5 deletions

File tree

lib/editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ const editor = {
1818
},
1919

2020
getPath(activeTextEditor) {
21-
return activeTextEditor.document.fileName;
21+
let str = activeTextEditor.document.fileName;
22+
return (/.*(?=\.ts)/.test(str)) ? str.replace(/\.ts$/, '.jsx') : str;
2223
},
2324

2425
save(activeTextEditor) {

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@
7878
},
7979
"adobeScriptRunner.winAfterFxExe": {
8080
"type": "string",
81-
"default": "C:/Program Files/Adobe/Adobe After Effects CC 2018/Support Files/AfterFX.exe",
81+
"default": "C:/Program Files/Adobe/Adobe After Effects CC 2019/Support Files/AfterFX.exe",
8282
"description": "Windows only: Path to Adobe After Effects executable (AfterFX.exe)."
8383
},
8484
"adobeScriptRunner.winIllustratorExe": {
8585
"type": "string",
86-
"default": "C:/Program Files/Adobe/Adobe Illustrator CC 2018/Support Files/Contents/Windows/Illustrator.exe",
86+
"default": "C:/Program Files/Adobe/Adobe Illustrator CC 2019/Support Files/Contents/Windows/Illustrator.exe",
8787
"description": "Windows only: Path to Adobe Illustrator executable (Illustrator.exe)."
8888
},
8989
"adobeScriptRunner.winPhotoshopExe": {
9090
"type": "string",
91-
"default": "C:/Program Files/Adobe/Adobe Photoshop CC 2018/Photoshop.exe",
91+
"default": "C:/Program Files/Adobe/Adobe Photoshop CC 2019/Photoshop.exe",
9292
"description": "Windows only: Path to Adobe Photoshop executable (Photoshop.exe)."
9393
}
9494
}
@@ -125,4 +125,4 @@
125125
"@types/node": "^7.0.43",
126126
"@types/mocha": "^2.2.42"
127127
}
128-
}
128+
}

test/test.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alert(app.name);

test/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alert(app.name);

test/tsconfig.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
// Compile your typescript file into .jsx in same folder on every save.
3+
//
4+
// This setup allows you to work in .ts files to use the very helpful auto-complete of app DOMs
5+
// and all the benefits of typescript while supporting using Adobe Script Runner commands.
6+
//
7+
// Preview: https://gfycat.com/ImpressiveFondGreatargus
8+
//
9+
// After saving this file into ./host/ (or any parent of or same folder as your scripts),
10+
// hit Ctrl+Shift+B, and choose 'tcs:watch (relative path to this file)' to run this task.
11+
//
12+
"compileOnSave": true,
13+
"compilerOptions": {
14+
// The output file can be explicitly defined
15+
"outFile": "./host.jsx",
16+
"allowJs": true,
17+
"noLib": true,
18+
"types": [
19+
// Once you've run `npm init -y`, `npm install pravdomil/types-for-adobe` in terminal
20+
// targeting your directory, paths to supported apps will be node_modules/...
21+
//
22+
"types-for-adobe/illustrator/2015.3"
23+
// "types-for-adobe/AfterEffects/2018"
24+
// "types-for-adobe/Photoshop/2015.5"
25+
// "types-for-adobe/Premiere/2018"
26+
// "types-for-adobe/InDesign/2018"
27+
// "types-for-adobe/Audition/2018"
28+
]
29+
},
30+
"files": [
31+
// The typescript file can be explicitly defined to prevent compiling multiple files
32+
"host.ts"
33+
],
34+
"exclude": [
35+
"node_modules"
36+
]
37+
}

0 commit comments

Comments
 (0)