1

I'm writing a .jsx that will live in Photoshop's script folder. I'm including an external file:

 @include "scripts/json2.js"

For some reason, this is appearing in the script menu also! How can I prevent this from happening? The docs are atrocious.

Benjamin Allison
  • 2,134
  • 3
  • 30
  • 55
  • Just an untested, off-the-wall idea... if on macOS you could maybe try prefixing the filename with a dot, i.e. `scripts/.json2.js` – Mark Setchell Aug 26 '21 at 22:27
  • If you can't find a way then consider wrapping the code from the `json2.js` file in a IIFE that exists at the top of your main `.jsx` script - therefore negating the existence of the `json2.js` file. Refer to point _"2"_ in the last _"Edit"_ section of my answer [here](https://stackoverflow.com/questions/56375138/need-to-json-stringify-an-object-in-extendscript/56391294?%3Fr=SearchResults#56391294). – RobC Aug 27 '21 at 07:28
  • Just rename it to something non-js, like `json.lib` – Sergey Kritskiy Aug 28 '21 at 16:35

0 Answers0