Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package.json's for yarn > v1 support #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vespakoen
Copy link
Contributor

Basically, references don't seem to work when using yarn berry (might also not work with other PnP implementations)

But using the "types" field in the package.json makes things work, so this PR includes a package.json in all folder so they can be included without references (see the tsconfig.json in the example below)

# create new folder
mkdir my-script
cd my-script

# install types-for-adobe
npm install -g yarn
yarn init -y
yarn set version berry
yarn add -D typescript types-for-adobe@https://github.com/vespakoen/Types-For-Adobe

# create tsconfig.json
printf '{"compilerOptions":{"module":"none","noLib":true, "types": ["types-for-adobe/shared", "types-for-adobe/AfterEffects/18.0"]}}' > tsconfig.json

# create index.ts and change reference types to Adobe product you're targeting
printf 'alert(String(app));\n' > index.ts

# compile typescript files
yarn tsc

@vespakoen vespakoen mentioned this pull request Sep 9, 2021
@zlovatt
Copy link
Member

zlovatt commented Dec 13, 2023

@vespakoen Is this still needed / a useful change?

@vespakoen
Copy link
Contributor Author

I am not doing CEP development anymore since a year or 2, but I remember this being useful for me, so I'd say that yes, this was & probably is still a welcome change.
All the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants