SAP / karma-ui5

A Karma plugin for UI5
Apache License 2.0
69 stars 26 forks source link

The paths defined in the ui5.yml is not detected automatically #56

Open zhangliangyi opened 5 years ago

zhangliangyi commented 5 years ago

Hi Colleague,

I am working on the migration of this plugin in SAP Successfactors.

I noticed the new version has imported some new configuration such as type and paths. And I found there is a method called autoDetectType which will scan the ui5.yaml in the module root path to get the module type. It is wonderful and I really like this.

I suppose that this auto detect mechanism would find the paths I defined in the .yaml file as well. But so far it seems only reading the type property.

Here is the ui5.yaml in my module,

specVersion: '0.1'
resources:
  configuration:
    paths:
      webapp: /src/main/uilib/sap/sf/todo/
metadata:
  name: au-todo-sap.sf.todo-web
type: application

Just wonder if this plugin can detect the paths defined in this way so that I don't need add the paths into karma configuration again.

matz3 commented 5 years ago

Yes, this is some missing part we currently have. It's planned that we are using the UI5 Tooling APIs to get all relevant information about the project (incl. ui5.yaml). Right now we are manually parsing the file, which was just a quick solution.

zhangliangyi commented 5 years ago

@matz3 Thanks for the quick response. I will keep track of this issue.

matz3 commented 5 years ago

karma v4.3.0 added support for plugins to be loaded async (https://github.com/karma-runner/karma/pull/3297). This might be helpful as most UI5 Tooling APIs are async. This is the reason some parts within this plugin are done manually (e.g. reading ui5.yaml).

matz3 commented 2 years ago

Reopening, as this hasn't been solved yet.