Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7999

Use external libraries in XS Engine

$
0
0

I'm trying to use third party Javascript libraries for my projects in the XS Engine. Let's assume I'm writing a script that has two direct dependencies:

 

my-app.js
 |-- dependency-a.js  |-- dependency-b.js        |-- subdependency-b1.js        |-- subdependency-b2.js

 

How can I make dependency-a.js and dependency-b.js (including their dependencies) available for my-app.js in the XS Engine?

 

Does the XS Engine support some kind of package management / module system (like CommonJS)?

 

Currently the only method I found for one Javascript file to depend on another is to make the dependency an *.xsjslib file and import it. This isn't a feasible solution in my scenario, because:

1. Pretty much all server-side libraries I want to use are modules based on CommonJS (mainly written for Node.js), and would have to be adapted

2. Not all libraries I use have been validated by JSLint, so HANA doesn't actually allow me to activate them till they are (is there a way to disable JSLint?)


Viewing all articles
Browse latest Browse all 7999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>