SAP / ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
https://sap.github.io/ui5-tooling
Apache License 2.0
466 stars 69 forks source link

Question: can you please provide us with a code example? #49

Closed jfilak closed 6 years ago

jfilak commented 6 years ago

I apologize for ignoring your issue template.

I don't know how to install and use @openui5 modules. I tried this:

npm install @openui5/sap.ui.core
echo "require('@openui5/sap.ui.core')" | node

and I got this:

module.js:549
    throw err;
    ^

Error: Cannot find module '@openui5/sap.ui.core'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at [stdin]:1:1
    at ContextifyScript.Script.runInThisContext (vm.js:50:33)
    at Object.runInThisContext (vm.js:139:38)
    at Object.<anonymous> ([stdin]-wrapper:6:22)
    at Module._compile (module.js:652:30)
    at evalScript (bootstrap_node.js:466:27)
matz3 commented 6 years ago

We use npm mainly to distribute our client-side code, but we don't provide an entry which can be used directly from node.

The UI5 Tooling will lookup your npm dependencies and find the UI5 projects / libraries. Then it can e.g. provide a local development server or run a build based on the content of those npm packages.

We also have use cases to run UI5 within Node.js, but we're not quite there, yet. This is mainly because of hard dependencies to the browser and no full AMD compliance of our modules.

matz3 commented 6 years ago

Code examples and documentation of UI5 can be found here: https://openui5.hana.ondemand.com/

You might also checkout our sample app: https://github.com/SAP/openui5-sample-app/tree/ui5-tooling