Skip to content

Instantly share code, notes, and snippets.

View vamitul's full-sized avatar
🤘

Vlad Vladila vamitul

🤘
View GitHub Profile
@vamitul
vamitul / rollup.config.mjs
Created April 2, 2026 18:14
Minimal Rollup config example for bundling UXPScripts, with sourcemap support in UDT
import path from 'node:path';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import sourcemaps from 'rollup-plugin-sourcemaps2';
/* global process */
const uxpCleanSourcemap = () => {
const projectRoot = process.cwd();
return {
//@include /c/Program%20Files/Adobe/Adobe%20InDesign%202021/Resources/CEP/extensions/com.adobe.ccx.sharesheet/host/lib/json3.js
var classes = $.dictionary.getClasses();
var dic = {};
for (var i = 0; i < classes.length; i++){
dic[classes[i]] = $.dictionary.getClass(classes[i]);
}
function replacer(key, val) {
if (val == null) {
return;
<content>
<fieldSet name="year" value="1983">
<section>
<context>
<p>Monty Python's The Meaning of Life <fieldRef name="year"/>)</p>
</context>
</section>
</content>
<!-- Resolves to: -->
@vamitul
vamitul / ConwayLife.jsx
Created April 21, 2021 10:56
An ExtendScript implementation of Conway's Game of Life designed to run inside Adobe Indesign
//Wrap everything in a IIF
//@targetengine 'Conway'
(function () {
/**
* PlayField Class
* A two-dimensional array of Cells,
* Keeps track of the current iteration, updates, instanciates etc.
*/
/**
<section>
<p type="Body">Some <style type="bold|italic|allCaps">bold, italic, and all caps</style> text.</p>
</section>