I've been working with greasemonkey scripts for a while now, but haven't really stopped to think much about workflow in that time and that got me wondering: Am I missing some best practices that other script writers may be utilizing?
The triggering thought was the realization that my main public script is now pushing 5000 lines in 150+ functions and I'm finding a desire to modularize it so I can reuse functions in other scripts and maintain those functions in one place. Out side of the code I've written, there are 12 or so different scripts/styles pulled in through @require and other @resources as well. My main process right now involves: 1. Open the main userscript file in AppData/Roaming/Mozilla/Firefox/Profiles/xxxxxx.default/gm_scripts/myuserscript 2. Edit the myuserscript.user.js file, save, refresh browser, and test the change. 3. Once I'm satisfied with a grouping of changes I move the new version to the official downloadURL location to let the update disseminate to the users. (I later added a github step to the project, but it's not consequential to my current workflow) If there is regular editing of @resource or @require files (for example if I were to break out and encapsulate some main userscript functions into separate files), this simple flow doesn't work as well. I can edit the @resource/require files in the gm_scripts folder, but until these files are moved to the final resting place(@resource url) I can accidentally blow away my changes if I decide to edit anything in the metadata block (it will trigger a redownload of the older version on the server). Likewise I can edit the @resource file in the source URL location (dropbox in my case), but the changes are not expressed until: - a. I change something in my @resource url, or - b. I do a full manual reinstall of my script which has the potential to blow away any uncommitted changes in my main userscript file. So all I ask is what are other people's workflows? Does anyone go through more formal process that involves build and/or test steps, or is the greasemonkey crowd simply doing hacks and whatever way it gets done is good enough? Is this just a silly question? -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
