Using:
- Vite for hot reloading and bundling.
- TypeScript for type safety (loosely enforced by default so you can use JavaScript if you want).
- Custom plugins to make working with CEP easier.
-
- CEP-Symlink to work outside of the Adobe extensions folder
-
- rollup-plugin-import-extendscript to import ExtendScript files into your project.
-
- rollup-plugin-zxp to sign your extension and create a
.zxpfile.
- rollup-plugin-zxp to sign your extension and create a
-
- rollup-plugin-bundle-cep-manifest to automatically bundle our CSXS folder.
Optional: There is also a Svelte branch
Better use BOLT-CEP if you are:
- Already comfortable with web development and want to get started with CEP quickly.
- Already using frameworks like React, Vue or Svelte and want to use them in your extension.
Otherwise, you might find this setup more suitable for your current skillset.
Also you might ask yourself: Why do I need a template?
- you need to enable PlayerDebugMode on your machine.
- If you are using Windows, save yourself some headache and configure VSCode to always run as administrator. (Right click on VSCode > Properties > Compatibility > Run this program as administrator)
-
Clone this repo to your local machine and open the folder in VSCode.
-
Open a terminal and run
npm installto install all dependencies. -
Search & Replace all instances of:
com.developername.toolname.panelwith your extension ID (For example:com.goodboyninja.skew.panel)%TOOLNAME%with your extension name (For example:Skew)
-
in
/CSXS/manifest.xmlyou will find a commented list of apps that your extension supports. Uncomment the ones you want to support (By default we support After-Effects 22.0 and later). -
From the same terminal, run
npm run symlinkand chooseSymlink "%TOOLNAME%" (start developing). -
Restart your Adobe app so it can find the symlinked extension for the first time.
Now that everything is set up, follow the steps below to start developing your extension.
- With your project open in VSCode, open a terminal and run
npm run devto start the dev server. - Open your Adobe app and go to
Window > Extensions > Your extension nameto open your extension.
Note: If Vite launches the dev server on a port other than
5173you will have to go to/index-dev.htmland change the port number to match the one vite is using.
That's it!
Head down to src/index.ts to write your first lines of code. Every time you save a file, Vite will automatically reload your extension in the Adobe app.
Building is as easy as running
npm run buildin the terminal.
This will create a .zxp file in /dist/%TOOLNAME%.zxp.
However, creating a .zxp file involves a process called code signing. For this to work, you need to fill in some details first:
- If you haven't already, create a
.envfile in the root of your project and add the following lines:
CERT_COUNTRY=YOURCONTRY
CERT_PROVINCE=YOURCONTRY
CERT_ORG=YOURORGNAME
CERT_NAME=YOURNAME
CERT_PASSWORD=YOURPASSWORD
CERT_EMAIL=YOUREMAIL
- Change the values to match your own information (Note that
CERT_COUNTRYandCERT_PROVINCEare two letter codes, for exampleUSandCA. Not following this format can cause your build to fail). - Save the
.envfile.
If you've done everything correctly, you should now be able to open a terminal in VSCode and run npm run build to build your extension.
/dist folder are rewritten every time you run npm run build.
If you are releasing your .zxp file to the public (are just want to keep it safe) you should move it somewhere else, such as /zxp/%VERSION% (note: this folder is not ignored by git).
- Run
npm run symlinkand chooseSymlink "dist" (test your build). - Restart your Adobe app and open your extension. If everything went well, you should see your extension running with the latest build.
When you want to go back to development mode, run npm run symlink and choose Symlink "%TOOLNAME%" (start developing).
Generally speaking, there shouldn't be any difference between the symlinked version and the ZXP version. However, before releasing your extension, it's a good idea to test your ZXP file to make sure it works as expected.
- Run
npm run symlinkand chooseRemove Symlink(⚠️ IMPORTANT!) - install your
.zxpusing the ZXP installer, or manually.
Unlike scripts, extensions can grow big quite easily. Please use git and github and sync often. Dropbox, or other backup solutions can be life savers.
Learn how to use this template to its full potential:
- Using TypeScript and ES Modules
- Including entire JSX (ExtendScript) files
- Adding Icons
- Debugging (Using the console and the debugger while developing)
- Folder Structure
- All available symlink options (and what the hell is a symlink anyway?)
- Exclude irrelevant files from VSCode search
You may also be wondering about:
- What's the deal with index-dev.html and index.html?
- How does this template handle signing my extension?
If you are new to CEP, I wrote a little opinionated guide on what to learn first.
CSInterfaceandmanifest.xmlare files provided by Adobe. Future versions of CEP may deprecate them in the future.
