@domoinc/ryuu-angular v3.0.0
Ryuu Angular
BYOA (Bring Your Own App)
Does domo init not give you enough of what you’re used to for starting new projects? If you have a generator or starter kit you’re partial to, you can still use it. All you have to do is update your local development server to handle requests for data from Domo. Here is an example of how you can leverage the ryuu-proxy module to turn any existing Angular application into a Domo App.
Prerequisites
You'll need the Angular CLI installed in order to run the ng add command.
Installation
Create a new project
$ ng new domo-app
$ cd domo-appAdd Ryuu Angular
$ ng add @domoinc/ryuu-angularThis will add the following:
- Domo
manifest.jsonandthumbnail.pngto a newdomodirectory at the root of the project extra-webpack.config.jsat the root of the project that configures a local proxy.domo:uploadhelper script topackage.jsonto upload to Domo.
Local development
In order for the proxy to work in local development you need to have uploaded your app at least once.
$ npm run domo:uploadAfter this you should be able to run ng serve like normal and you'll be able to proxy domo requests in your local development.
Publishing
To publish, simply do:
npm run build
npm publishTesting
To test locally, install @angular-devkit/schematics-cli globally and use the schematics command line tool. That tool acts the same as the generate command of the Angular CLI, but also has a debug mode.
Check the documentation with
schematics --helpCreate new project and link the schematic to the project.
ng new test-project
ng add @domoinc/ryuu-angular || npm link @domoinc/ryuu-angular
# To Run the schematic
ng generate @domoinc/ryuu-angular:ng-addTODO List
- Add da_ng to the public repo in order to be able to apply manifest Overrides
- Add the
domo/manifestOverrides.jsonto the Project src folder - Make sure to add the required scripts to the package.json
"prestart": "da_ng apply-manifest start",
"postbuild": "da_ng apply-manifest build",
"postbuild:prod": "da_ng apply-manifest build",