// Encrypt with VS Code ExtendScript Extension// Requires Gulp 4 & Electron// See here for more info: https://marketplace.visualstudio.com/items?itemName=Adobe.extendscript-debug#export-to-jsxbinconstfs=require('fs');constpath=require('path');constexecSync=require('child_process').execSync;// Encrypt with VS Code Extendscript Extensiongulp.task('turboEncrypt',(done)=>{constsrc=path.join('path','to','file.jsx');constdst=path.join('path','to','file.jsxbin');constvsE=path.join(os.homedir(),'.vscode','extensions');constfold=fs.readdirSync(vsE).filter(x=>x.indexOf('adobe.extendscript-debug')>-1);if(fold.length>0){constjsxbinExporter=path.join(vsE,fold.pop(),'public-scripts','exportToJSX.js');execSync('electron "'+jsxbinExporter+'" -n "'+src+'"',{encoding:'UTF-8'});fs.renameSync(src+'bin',dst);console.log('### JSXBIN Created Successfully');}else{thrownewError('### VS Code ExtendScript Extension not Installed');}done();});
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.