GitXplorerGitXplorer
h

adobe-uxp-types-crawler

public
17 stars
1 forks
1 issues

Commits

List of commits on branch main.
Verified
ae445e12e267849be1a912ef4b94230b256cc047

Bump to 0.0.7

hhansottowirtz committed 3 years ago
Verified
f79892713a2b39b7d4795b0d5c340e93e74488d0

Fix batchPlay signature

hhansottowirtz committed 3 years ago
Verified
ce9cc2f820e1fc3b84b7074e7d08c9242799d0ad

Fix optionals, photoshop dependency on uxp

hhansottowirtz committed 3 years ago
Verified
8e618e041293bd4411d7b04d325e4386b04aaf45

Move npm packages to @adobe-uxp-types

hhansottowirtz committed 3 years ago
Verified
a058e97b1e01eba7f814f2bb7a9e0e2ac3e8792a

Bump to 0.0.7-beta.1

hhansottowirtz committed 3 years ago
Verified
d3e98a9646f3e75c8cd6de0875b1ca4ceadd8ac8

Fix type bugs, add type tests

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.