This plugin is useful in photoshop, which resize photos to standard printable photo size.
First, make sure that npm
is installed on your system.
After you ensure that your terminal is in the root of this project, use npm
to install the various dependencies needed:
npm install
If you prefer to use yarn
, after you generate the package-lock.json
file you can run the following line to import dependencies to a yarn.lock
file:
yarn import
There are two ways to build the plugin for use in Photoshop:
yarn watch
(ornpm watch
) will build a development version of the plugin, and recompile everytime you make a change to the source files. The result is placed indist
folder.yarn build
(ornpm build
) will build a production version of the plugin and place it indist
folder. It will not update every time you make a change to the source files.
You must run either
watch
orbuild
prior to trying to use within Photoshop!
You can use the UXP Developer Tools to load the plugin into Photoshop.
If the plugin hasn't already been added to your workspace in the UXP Developer Tools, you can add it by clicking "Add Plugin...". You can either add the manifest.json
file in the dist
folder or the plugin
folder.
- If you add the one in the
plugin
folder, then you need to update the relative path to the plugin build folder (dist
) by clicking the ••• button > "Options" > "Advanced" > "Plugin build folder". - During development, it is recommended to build the plugin using
yarn watch
and load themanifest.json
in the (plugin build)dist
folder.
Once added, you can load it into Photoshop by clicking the ••• button on the corresponding row, and clicking "Load". Switch to Photoshop and you should see the starter panels.
If you're getting errors with npm install
, we can reinstall the project dependencies. Let's first make sure to delete node_modules/*
from the template
folder as well as the package-lock.json
and yarn.lock
file. Staying in the template
directory, run npm install
again and this will regenerate your package-lock.json
file.
PS Version : 22.2.0 or higher UXP Version : 5.6 or higher