Skip to main content
Inspiring
Dec 22, 2021 7:38 AM UTC
Question

Divide js / jsx into several files with inclusion (include)

Hi,

writing a Exstension that will be running in Indesign, Illustrator, Photoshop an Premiere Pro.

Eveything working correct, but to get a little nicer structure, I thought I would split the code in different files... Great surprise waited for me !

Illustrator & Indesign can handle inclusion with,

//@include 'json2.js';
//@include 'logutils.js';
//@include 'collectData.jsx';
//@include 'collectAllImagesOnPage.jsx';

but not Photoshop ... 

My "workaround" is to have all code in one .jsx file, then all products works like a charm....

 

Anyone else who has had the same experience, and is there a solution to it?

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

erinferinferinf
Adobe Employee
Adobe Employee
Jan 5, 2022 9:55 PM UTC

When you say it didn't work in Photoshop, are you on an M1 Mac? Photoshop running natively on M1 no longer runs CEP... 

Translate
Inspiring
Feb 24, 2022 12:13 PM UTC

Thank you for Your answer, no i'm not running on M1 

2,6 GHz 6-Core Intel Core i7

 

My work around was to add all code in same file, for now....

 

ps, any news in Photoshop M1 CEP support ? (and why that isnt supported ?) 

Translate