GitXplorerGitXplorer
h

adobe-uxp-types-crawler

public
17 stars
1 forks
1 issues

Commits

List of commits on branch main.
Verified
0957d644c209872fe4d7a8c208c6c14b001a4d71

Bump to 0.0.9

hhansottowirtz committed 3 years ago
Verified
78996cbd5971f656aab69e25b01e338470f75abf

Remove Photoshop LayerTypes type

hhansottowirtz committed 3 years ago
Verified
61c4b787c6b155e99b4405d31ea12308c5cc648e

Fix uxp types that were not promisified

hhansottowirtz committed 3 years ago
Verified
9518fd147ae7a69dbf8f4d7fb35ef53a2da35bd4

Update readme

hhansottowirtz committed 3 years ago
Verified
160e5d7983f2a9345d05758a8cb291003812f016

Bump to 0.0.8

hhansottowirtz committed 3 years ago
Verified
dfa43cf836df92cf64b9dbaae7131532cffaafd7

Fix extending array, change all enums to type unions

hhansottowirtz committed 3 years ago

README

The README file for this repository.

Adobe UXP Types Crawler

Currently includes types for Adobe Photoshop and UXP.

This project crawls the Adobe UXP documentation and generates Typescript declaration files, merging them with manually created types.

Usage

npm i -D @adobe-uxp-types/photoshop
npm i -D @adobe-uxp-types/uxp
// tsconfig.json
{
  "compilerOptions": {
    "typeRoots": ["node_modules/@types", "node_modules/@adobe-uxp-types"],
    "types": ["photoshop", "uxp", /* other types */] // this field is optional
  }
}

Looking for GroupLayer or layerTree? These were removed in newer versions of the UXP API. For Photoshop, make sure your manifest.json has host.data.apiVersion set to 2!

Warning: These typings are not thoroughly tested and will contain a lot of bugs! Please open an issue if you find any inconsistencies.

The @adobe-uxp-types organization is not an official Adobe project

Intro

Currently only includes types for Photoshop and UXP

This project is a quickly hacked together Typescript .d.ts generator for Adobe UXP (for Photoshop). It uses Puppeteer to crawl https://www.adobe.io/photoshop/uxp/ps_reference/ and subpages, and dts-dom to stitch together the typings files.

See res/entrypoints.jsonc for configuration and overrides of the crawler.

Crawling

(minimum Node version: 14)

npm i
npx ts-node src/index.ts --entrypoints res/entrypoints.jsonc --templates-path res/templates --out-path tmp/out --cache-path tmp/cache

Publishing

This project is managed with a very basic Lerna setup.

npx ts-node src/index.ts --entrypoints res/entrypoints.jsonc --templates-path res/templates --out-path packages/photoshop --cache-path tmp/cache

Bumping package versions:

npx lerna version <version> --no-git-tag-version

Then commit. Git tags are added by Github Actions.

Publishing to npm is currently done in Github Actions., based on the Lerna version. See .github/workflows/build-and-publish.yml.

Manually publishing:

npx lerna publish from-package

Credits

This project started from AdobeXD/typings, which did not include types for Photoshop. Descriptor enums and interfaces were taken from simonhenke/photoshop-types.Other types were taken from @types/photoshop. A missing interface was taken from bbb999/Types-For-Adobe. The common UXP typings were taken from thejustinwalsh/uxp-types.