Currently, I've been working diligently on developing a system that allows me to export my swatches from Illustrator as a JSON object. This will greatly simplify the process of updating my App. By utilizing the illustrator scripting API, I've successfully looped through all my swatches and generated an object.
My next step is to take this data and create a JSON file. The purpose of this file is to instantly update everything in my App whenever I make color adjustments in Illustrator and run the script. To aid in this process, I have been referring to the Adobe Documentation and a user-friendly site called Jongware.
If you're interested in viewing the code altogether, you can check it out on JSFiddle. The specific line of code causing some uncertainty revolves around generating a new file without direct API usage. While they appear to use the same JS engine as a browser, I'm not entirely convinced. Any suggestions or guidance would be highly appreciated!
var file = new File('filename.txt');
file.saveAs('txt');
The primary inquiry here is how I could locally produce a new file capable of storing the created object. As the API lacks clarity regarding crafting a basic text file from the provided data, I welcome any insights or direction on this matter.