klustre / extender Goto Github PK
View Code? Open in Web Editor NEWA modern starter for writing Adobe Extendscript
License: MIT License
A modern starter for writing Adobe Extendscript
License: MIT License
Support importing any binary file as a string
in this case, _arrayIsArray()
not defined
let str = "Hello";
alert( [...str] ); // H,e,l,l,o
if any JSON.parse or JSON.stringify in the src, run release task will fail
Follow these steps to use Extender on Windows:
npm install
run npm install cross-env -D
package.json
replace line 11 and 12 with:
"start": "cross-env NODE_ENV=development npm-run-all build",
"release": "cross-env NODE_ENV=production run-s build jsxbin",
scripts/build.js
comment out line 22 to 24src/main.js
replace line 10 with:
const greetings = [expression]
npm start
The resulting Babel code is somehow transformed after the plugin ran.
I have been trying to figure out the problem but haven't found the solution yet. The relevant test ternary statement is
const a = false ? false ? 1 : 2 : 3
. Afteresbuild-plugin-babel
'sonLoad
is called and the content is transformed, I log the results in theonLoad
callback and getvar a = false ? (false ? 1 : 2) : 3;
for that line—which is good. I also double checked withbabel.transform
to make sure the extendscript preset works well.But when I check the final esbuild output file, the brackets disappeared. I am somewhat aware that the plugins for esbuild aren't the last line of bundling process, so it probably modified the babel output and removed the brackets. I am not too familiar with what goes on in esbuild between calling the plugins and writing to output, but it would be helpful if you might know the answer.
See fusepilot/babel-preset-extendscript#15
Possible solution: evanw/esbuild#1010 (comment)
hi, I am very new with es6, why this code not work with extender?
let salaries = {
"John": 100,
"Pete": 3100,
"Mary": 2150
};
function topS (obj) {
return Object.values(obj).sort((a,b) => b-a)[0];
}
alert(topS(salaries));
reduce() is compiled, but running with an error message
const array1 = [1, 2, 3, 4];
// 0 + 1 + 2 + 3 + 4
const initialValue = 0;
const sumWithInitial = array1.reduce(
(previousValue, currentValue) => previousValue + currentValue,
initialValue
);
alert(array1);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.