Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
openui5_connect task: support "lessOptions"
Browse files Browse the repository at this point in the history
Pass "lessOptions" to "connect-openui5" middleware.
  • Loading branch information
matz3 committed Apr 25, 2016
1 parent 6248c55 commit a8c1280
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ Type: `object`

Options for [connect-openui5 proxy](https://github.com/SAP/connect-openui5#proxyoptions).

#### lessOptions

Type: `object`

Options for [connect-openui5 less](https://github.com/SAP/connect-openui5#lessoptions).


### Usage Examples

#### App
Expand Down
9 changes: 5 additions & 4 deletions tasks/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ module.exports = function(grunt, config) {
testresources: [],
cors: null,
proxypath: null,
proxyOptions: null
proxyOptions: null,
lessOptions: null
});

// normalize strings to arrays for "resources" options
Expand Down Expand Up @@ -138,9 +139,9 @@ module.exports = function(grunt, config) {
options.testresources.forEach(mountStatic('/test-resources'));

// compile themes on-the-fly using openui5 less middleware
mountMiddleware(openui5.connect.less({
rootPaths: options.resources
}), '/resources');
options.lessOptions = options.lessOptions || {};
options.lessOptions.rootPaths = options.resources;
mountMiddleware(openui5.connect.less(options.lessOptions), '/resources');

// mount a generic proxy
if (options.proxypath) {
Expand Down

0 comments on commit a8c1280

Please sign in to comment.