Trigger SCSS compile on save

Is it possible to trigger an external program when a file is saved in KomodoIDE? I’m thinking it would be nice to automatically compile SCSS or minify JS when a file is saved.

It seems like a userscript item, but I never wrote a userscript. Can you point me to a code snippet that looks something like an event listener for onSave?

-Clark

Hey @cdcmicro,

You mean like this? https://gist.github.com/megaman821/1782403
There is also an addon that was written by @babobski: http://komodoide.com/packages/addons/sass-compiler/

Let us know if you need a hand with those.

  • Carey

OK, this is a good start. Was hoping for JS, but I can probably adapt the Python. @babobski’s addon looks promising. Thank you very much for the pointers.

The second link @careyh gives shows sample javascript that you can use in a userscript (macro).

1 Like

Got it. Looks good. The addon itself gets me good SASS compiler support.

you could also consider using https://www.npmjs.com/package/grunt-contrib-sass combined with another grunt serve/monitor task that will monitor files for changes and compile.

@cdcmicro added a enhancement request for the minify on save option