Accelerating JavaScript Development

Accelerating JavaScript Development

  

From what I've found, the best practice OS recommends is to include your .js file as a resource and set it to "Deploy to Target Directory". It works, however, there are a couple problems. Testing that js code requires 1-Click Publishing the entire code base, which is unnecessary and time consuming for .js files. You have to SHIFT-REFRESH the page to get the latest version of the file. It requires a Merge and Publish if anyone else has made changes. "Changing" the resource also requires several clicks before you can publish.

I'm curious what others are doing to solve these issues. I'm sure the solutions might also apply to a CSS file or Images. Anything static.

Hi,

I believe you can use Chrome's DevTools to achieve what you want.

Instead of publishing a new version each time there's a problem with your js code or you want to make some changes to it, you can debug your application, change the js code at runtime and verify if it's what you want or not.

Check the link below for more information regarding DevTools:

https://developers.google.com/web/tools/chrome-devtools/javascript/


Best regards,

Davide Résio

Normally I would simply use javascript in a webblock, so I have also some syntax-highlighting.

Even with 3rd party-js-files.


That said, you should not have to change javascript a lot.

if that is the case, I would probably be leaning towards putting the file on github, include that url on development.

when it's stable it would integrate it back into outsystems