GitXplorerGitXplorer
h

adobe-uxp-types-crawler

public
17 stars
1 forks
1 issues

Commits

List of commits on branch main.
Verified
47726cf60657e744bc34d2b2fe806dcdc9a523ec

Add uxp types

hhansottowirtz committed 3 years ago
Verified
ad8c33e579b54e03590adf336e6b7a3736de2c37

v0.0.7-beta.0

hhansottowirtz committed 3 years ago
Verified
438e367ce3c7de46942d40a17591453fbe09bc9e

Update crawler to support 2022 entrypoints, update entrypoints

hhansottowirtz committed 3 years ago
Verified
8898493a0b7f9a2e6e971bc428b57d91fddc855e

Core modules update, with some official types

hhansottowirtz committed 3 years ago
Verified
c770c9430cc8bb6b12ea7e14cb2b35bd24093085

Bump to v0.0.6-beta.1

hhansottowirtz committed 3 years ago
Verified
433de77c1cbee4bee26ba16c619be421c98190a7

Fix the messaging interface to comply with Photoshop C++ Plugin SDK

iintegral-llc 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.