Giter VIP home page Giter VIP logo

dobby_photoshop's Introduction

React Starter Plugin

This plugin is a good place to get started when building a Photoshop plugin using React. It comes defined with all the dependencies that you'll need to get started. As this is a React project, you'll need to do some initial configuration before this will be usable in Photoshop.

Install dependencies

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

Build Process

There are two ways to build the plugin for use in Photoshop:

  • yarn watch (or npm watch) will build a development version of the plugin, and recompile everytime you make a change to the source files. The result is placed in dist folder.
  • yarn build (or npm build) will build a production version of the plugin and place it in dist folder. It will not update every time you make a change to the source files.

You must run either watch or build prior to trying to use within Photoshop!

Launching in 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 the manifest.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.

What this plugin does

This plugin doesn't do much, but does illustrate how to create two panels in Photoshop with entrypoints.setup, and how to create flyout menus. It also demonstrates the use of several Spectrum UXP widgets to create a simple color picker in the primary panel.

Common Issues

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 : 23.2.0 or higher UXP Version : 5.6 or higher

dobby_photoshop's People

Contributors

megachomba avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.