Skip to content

Commit 0787c67

Browse files
committed
add UI_TYPE to readme
1 parent 5110a4f commit 0787c67

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
Create CEP Extensions with no build configuration. Closely matches functionality from [Create React App](https://github.com/facebookincubator/create-react-app).
66

7-
* [Getting Started](#getting-started) – How to create a new app.
8-
* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/create-cep-extension-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
7+
- [Getting Started](#getting-started) – How to create a new app.
8+
- [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/create-cep-extension-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
99

1010
Create React App works on macOS, Windows, and Linux.<br>
1111
If something doesn’t work please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
@@ -120,31 +120,39 @@ You can then send the ZXP archive to your users to install using a ZXP installer
120120

121121
## Environment Variables
122122

123-
You can customize the name of the extension and multiple other variables by modifying the `.env` file.
123+
You can customize the name of the extension and multiple other variables by modifying the `.env` file.
124124

125-
````bash
125+
```bash
126126
NAME="My Extension"
127127
BUNDLE_ID="com.mycompany.myextension"
128-
````
128+
```
129129

130130
### Hosts
131131

132132
By default, the extension will target all known Adobe hosts. To target specific hosts, uncomment the `HOSTS` variable to `.env` and modify the list of the hosts you want to target.
133133

134134
For example, to target just Illustrator and After Effects, you would add this to your `.env` file:
135135

136-
````bash
136+
```bash
137137
HOSTS="ILST, AEFT"
138-
````
138+
```
139139

140140
And to target specific versions:
141141

142-
````bash
142+
```bash
143143
HOSTS="ILST, IDSN@*, PHXS@6.0, AEFT@[5.0,10.0]"
144-
````
144+
```
145145

146146
This will target all versions of Illustrator and In Design, Photoshop 6.0, and After Effects 5.0 - 10.0.
147147

148+
### Type
149+
150+
Sets the type of window. Options are `ModalDialog`, `Modeless`, `Panel` is default.
151+
152+
```bash
153+
UI_TYPE=ModalDialog
154+
```
155+
148156
### Icon
149157

150158
To add a custom panel icon, add all [icon files](https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_8.x/Documentation/CEP%208.0%20HTML%20Extension%20Cookbook.md#high-dpi-panel-icons) inside the `public` folder and set their paths inside your `.env` file:
@@ -176,43 +184,43 @@ There are few functions that you can import from the `cep-interface` package to
176184

177185
Loads and evaluates the specified file in the src/extendscript directory. Returns a promise with the result.
178186

179-
````javascript
180-
import { loadExtendscript } from 'cep-interface'
187+
```javascript
188+
import { loadExtendscript } from 'cep-interface';
181189

182-
loadExtendscript('index.jsx')
183-
````
190+
loadExtendscript('index.jsx');
191+
```
184192

185193
### `evalExtendscript(code: string): Promise`
186194

187195
Evaluates the specified code. Returns a Promise.
188196

189-
````javascript
190-
import { evalExtendscript } from 'cep-interface'
197+
```javascript
198+
import { evalExtendscript } from 'cep-interface';
191199

192-
evalExtendscript('$.writeln("Hello Foo");') // writes "Hello Foo" to the info panel
193-
````
200+
evalExtendscript('$.writeln("Hello Foo");'); // writes "Hello Foo" to the info panel
201+
```
194202

195203
If you return a JSON string using [json2](https://github.com/douglascrockford/JSON-js) or similar from Extendscript, you can get the parsed result.
196204

197-
````javascript
198-
import { evalExtendscript } from 'cep-interface'
205+
```javascript
206+
import { evalExtendscript } from 'cep-interface';
199207

200208
evalExtendscript('JSON.stringifiy({foo: "bar"});')
201209
.then(result => console.log(result)) // prints {foo: "bar"}
202-
.catch(error => console.warn(error))
203-
````
210+
.catch(error => console.warn(error));
211+
```
204212

205213
## Other functions
206214

207215
There are a few other functions available in addition.
208216

209217
### `openURLInDefaultBrowser(url: string)`
210218

211-
````javascript
212-
import { openURLInDefaultBrowser } from 'cep-interface'
219+
```javascript
220+
import { openURLInDefaultBrowser } from 'cep-interface';
213221

214-
openURLInDefaultBrowser('www.google.com')
215-
````
222+
openURLInDefaultBrowser('www.google.com');
223+
```
216224

217225
Opens the url in the default browser. Will also work when viewing outside the target application in a browser.
218226

@@ -222,6 +230,6 @@ We'd love to have your helping hand on `create-cep-extension`! See [CONTRIBUTING
222230

223231
## Todo
224232

225-
* Improve target host configuration per [#4](https://github.com/fusepilot/create-cep-extension/pull/4).
226-
* Create ````.jsxbin````'s automatically and smoothly. Adobe has made this nearly impossible to do on macOS, so not sure if its worth the trouble. Especially since .jsxbin doesn't really deter hackers.
227-
* Testing.
233+
- Improve target host configuration per [#4](https://github.com/fusepilot/create-cep-extension/pull/4).
234+
- Create `.jsxbin`'s automatically and smoothly. Adobe has made this nearly impossible to do on macOS, so not sure if its worth the trouble. Especially since .jsxbin doesn't really deter hackers.
235+
- Testing.

packages/create-cep-extension-scripts/scripts/cep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getSettings() {
2020
BUNDLE_ID: process.env.BUNDLE_ID || 'my.cep.extension',
2121
BUNDLE_VERSION: process.env.BUNDLE_VERSION || VERSION || '1.0.0',
2222
CEP_VERSION: process.env.CEP_VERSION || '',
23-
UI_TYPE: process.env.UI_TYPE || 'Panel',//Panel,ModalDialog,Modeless,default Panel.
23+
UI_TYPE: process.env.UI_TYPE || 'Panel',
2424
PANEL_WIDTH: process.env.PANEL_WIDTH || '500',
2525
PANEL_HEIGHT: process.env.PANEL_HEIGHT || '500',
2626
CEF_PARAMS: process.env.CEF_PARAMS || '',

packages/create-cep-extension-scripts/template/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
# HOSTS="PHXS, PHSP, IDSN, AICY, ILST, PPRO, AEFT, PRLD, FLPR, DRWV"
55

6+
# UI_TYPE=Panel
7+
68
# CERTIFICATE_COUNTRY="US"
79
# CERTIFICATE_PROVINCE="CA"
810
# CERTIFICATE_ORG="My Company"

0 commit comments

Comments
 (0)