Search code examples
cordovaintel-xdk

Is it possible to launch a custom script while building Cordova app in intel XDK?


I need to perform some actions with my project's js-files (replacing, copying, formating etc) before the app will be builded in XDK.

Of cource, I can do it manually or write a .bat script and run it every time before starting building process. But can I integrate my scripts into the building process? So, I want my actions will be done just after I pressed "build" button in XDK. Is it possible?


Solution

  • There is no such mechanism in place at this time to automatically launch a script. There might be a way to do it if you are using an external editor. See this Sublime Plugin for the Intel XDK for some ideas that might allow you to do what you want from within your editor (you can use an external editor with the XDK, that's what I usually do, it works faster and provides more flexibility).

    That plugin hasn't been updated in a while, so I'm not sure if it still works properly, but if it does, it seems like you could use it as a starting point to build something similar for your favorite editor and use it to kick off the build process from within your editor, by first doing the stuff you want to do before the build.

    Of course, there's a dramatically new build system (see the recent EA release) which will probably break that plugin...