{"id":13695855,"url":"https://github.com/SAP-archive/grunt-openui5","last_synced_at":"2025-05-03T13:33:48.092Z","repository":{"id":21624741,"uuid":"24945242","full_name":"SAP-archive/grunt-openui5","owner":"SAP-archive","description":"Grunt tasks around OpenUI5","archived":true,"fork":false,"pushed_at":"2023-05-24T14:42:25.000Z","size":1304,"stargazers_count":90,"open_issues_count":0,"forks_count":34,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-08-03T18:20:00.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2014-10-08T14:45:55.000Z","updated_at":"2024-05-12T14:28:03.000Z","dependencies_parsed_at":"2023-02-19T19:35:32.045Z","dependency_job_id":null,"html_url":"https://github.com/SAP-archive/grunt-openui5","commit_stats":null,"previous_names":["sap/grunt-openui5"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fgrunt-openui5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fgrunt-openui5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fgrunt-openui5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fgrunt-openui5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-archive","download_url":"https://codeload.github.com/SAP-archive/grunt-openui5/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224364421,"owners_count":17299068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T18:00:34.103Z","updated_at":"2024-11-12T23:31:09.762Z","avatar_url":"https://github.com/SAP-archive.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"![OpenUI5](http://openui5.org/images/OpenUI5_new_big_side.png)\n\n[![REUSE status](https://api.reuse.software/badge/github.com/SAP/grunt-openui5)](https://api.reuse.software/info/github.com/SAP/grunt-openui5)\n[![Build Status](http://img.shields.io/travis/SAP/grunt-openui5.svg?style=flat)](https://travis-ci.org/SAP/grunt-openui5)\n[![NPM Version](http://img.shields.io/npm/v/grunt-openui5.svg?style=flat)](https://www.npmjs.org/package/grunt-openui5)\n\n# DEPRECATED\n\n**⚠️ This project has been deprecated in favor of [UI5 Tooling](https://sap.github.io/ui5-tooling/).**\n\n# grunt-openui5\n\n\u003e Grunt tasks around OpenUI5\n\n## Getting Started\nThis plugin requires Grunt `~0.4.5`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-openui5 --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-openui5');\n```\n\n## openui5_theme\n\n### Overview\n\nBuilds a theme and creates the following files in the dest directory of the specified less file\n - library.css (regular css)\n - library-RTL.css (mirrored css for right-to-left support)\n - library-parameters.json (key-value map of all global less variables)\n\n### Options\n\n#### rootPaths\nType: `array` of `string`\n\nRoot paths to use for import directives.\n\nThis option differs from the `parser.paths` option.  \nIt is useful if less files are located in separate folders but referenced as they would all be in one.  \nIf `rootPaths` are provided and a file can not be found, the `parser.paths` option will be used instead.\n\n#### parser\n\nType: `object`\n\nOptions for the [less](http://lesscss.org) parser (`less.Parser`).\n\n#### compiler\n\nType `object`\n\nOptions for the [less](http://lesscss.org) compiler (`tree.toCss`).\n\n**Note:** The options `sourceMap` and `cleancss` are not supported. An exception will be thrown when used.\n\n### Usage Examples\n\n#### Default Options\n\n```js\ngrunt.initConfig({\n  openui5_theme: {\n    library: {\n      files: [\n        {\n          expand: true,\n          cwd: 'lib1',\n          src: 'my/ui/lib/themes/foo/library.source.less',\n          dest: 'tmp'\n        }\n      ]\n    }\n  },\n});\n```\n\nCreates the following files\n- tmp/my/ui/lib/themes/foo/library.css\n- tmp/my/ui/lib/themes/foo/library-RTL.css\n- tmp/my/ui/lib/themes/foo/library-parameters.json\n\n#### Custom Options\n\nIf import directives are used to import files from other src folders, the root paths should be defined.  \nThe compress option can be used to minify the output css/json.\n\n```js\ngrunt.initConfig({\n  openui5: {\n    options: {\n      rootPaths: [\n        'lib1',\n        'lib2'\n      ],\n      compiler: {\n        compress: true\n      }\n    },\n    library: {\n      files: [\n        {\n          expand: true,\n          cwd: 'lib2',\n          src: 'my/ui/lib/themes/bar/library.source.less',\n          dest: 'tmp'\n        }\n      ]\n    }\n  },\n});\n```\n\nCreates the following files\n- tmp/my/ui/lib/themes/bar/library.css\n- tmp/my/ui/lib/themes/bar/library-RTL.css\n- tmp/my/ui/lib/themes/bar/library-parameters.json\n\n## openui5_preload\n\n### Overview\n\nTask to merge multiple files into one preload file.\n\n### Options\n\n#### resources\nType: `string` or `array` or `object`\n\nResources/files that should be used as source for preload files.\n\nType     | Result                             | Example\n-------- | ---------------------------------- | -------\n*String* | See `cwd`.                         | `'src'`\n*Array*  | Array of `string` and/or `object`. | `[ 'src', { cwd: 'webapp', prefix: 'my/app' } ]`\n*Object* | See `cwd`, `prefix` and `src`      | `{ cwd: 'webapp', prefix: 'my/app', src: '**' }`\n\n##### cwd\nType: `string`\n\nBase/root directory for finding resources.\n\n##### prefix\nType: `string`  \nDefault: ` `\n\nDirectory namespace prefix that should be prepended to all found paths. This is useful if the source folder structure is not the same as the module namespace.\n\nExample:  \n`{ cwd: 'webapp', prefix: 'my/app' }`  \n`webapp/foo.js` will be treated as `my/app/foo.js` instead of `foo.js`.\n\n##### src\nType: `string` or `array` of `string`  \nDefault:\n```\n[\n  '**/*.js',\n  '**/*.fragment.html',\n  '**/*.fragment.json',\n  '**/*.fragment.xml',\n  '**/*.view.html',\n  '**/*.view.json',\n  '**/*.view.xml',\n  '**/*.properties'\n]\n```\n\nGlob pattern(s) for finding relevant resources inside `cwd`. If set, the default patterns will be replaced.\n\n#### compatVersion\nType: `string`  \nDefault: `edge`\n\nSets the UI5 version used for compatibility mode in the format `\u003cmajor\u003e.\u003cminor\u003e`. Use this when building older UI5 releases to ensure full functionality.\n\nExample:  \nWhen building for UI5 target version 1.38.x, use `compatVersion: '1.38'`.\n\n#### dest\nType: `string`  \nDefault value: `.`\n\nPath to the dest folder in which the preload files should be created.\n\n#### compress\nType: `boolean` or `object`  \nDefault value: `true`\n\nOptional parameter to set compression/minification of the files or to provide\nadditional options.\n\n- JavaScript is minified using [terser](https://github.com/terser/terser)\n- XML is minified using [pretty-data](https://github.com/vkiryukhin/pretty-data)\n- JSON is parsed for correctness and to remove extra whitespace\n\nAn `object` can be used to provide options.  \nProvide a `terser` object with the options. `uglifyjs` is also supported for backwards compatibility reasons.\nThe given object will be passed to `minify` (see [here](https://github.com/terser/terser#format-options) for options) and merged with the defaults (see below).  \n\n```js\ncompress: {\n  terser: {\n    output: {\n      comments: /copyright|\\(c\\)|released under|license|\\u00a9/i\n    }\n  }\n}\n```\n\n#### components\n\n##### `boolean`\n\nEnable auto detection of Components. A preload file will be created for each `Component.js` file.\n\n```js\ncomponents: true\n```\n\n##### `string` / `array` of `string`\n\nNamespace path(s) to Component(s).\n\n```js\ncomponents: 'my/app',\ncomponents: [ 'my/app', 'my/component']\n```\n\n##### `object`\n\nMap with namespace path to Component as key and object as value.\n\n```js\ncomponents: {\n  'my/app': {\n    src: [\n      'my/app/**',\n      'my/app/!ignore.js'\n    ]\n  }\n}\n```\n\n##### src\nType: `string` / `array` of `string`  \nDefault: component namespace path + `/**` (e.g. `my/app/**`)\n\nGlob pattern(s) for files that should be included into the preload.  \nPatterns are based on all available resources (see [resources](#resources)).\n\n### libraries\n\nSee [components](#components). Auto mode is looking for `library.js` files.\n\n### Usage Examples\n\n#### Component\n\nCreates `dist/Component-preload.js`.\n\n```js\ngrunt.initConfig({\n\n  openui5_preload: {\n\n    component: {\n      options: {\n        resources: {\n          cwd: 'webapp',\n          prefix: 'my/app'\n        },\n        dest: 'dist'\n      },\n      components: 'my/app'\n    }\n\n  }\n\n});\n```\n\n#### Library\n\nCreates `dist/my/ui/lib/library-preload.json`.\n\n```js\ngrunt.initConfig({\n\n  openui5_preload: {\n    library: {\n      options: {\n        resources: 'src',\n        dest: 'dist'\n      },\n      libraries: 'my/ui/lib'\n    }\n  }\n\n});\n```\n\n## openui5_connect\n\n### Overview\n\nProvides middleware for the [grunt-contrib-connect](https://github.com/gruntjs/grunt-contrib-connect) task to run a web server.  \nThis task will configure the `connect` task target with the same name and invoke it with the provided arguments.  \nAs this task creates it's own middleware, the `connect` task's `base` option will not be respected. If you want to modify the middleware, provide a function callback as `middleware` option (see [here](https://github.com/gruntjs/grunt-contrib-connect#middleware)). The function will be called after the middleware has been created.\n\n### Options\n\n\u003e Note: This task provides options on top of the `connect` task. For general options, see [grunt-contrib-connect](https://github.com/gruntjs/grunt-contrib-connect#connect-task).\n\n#### contextpath\n\nType: `string`  \nDefault value: `/`  \n\nThe contextpath for all middlewares provided by this task.\n\n#### appresources\n\nType: `array` of `string`\n\nDirectories that should be served under the root `/` path.\n\nExample\n```js\nappresources: 'webapp'\n```\n```\nwebapp\n  - dir\n    - index.html\n```\n`http://localhost/contextpath/dir/index.html`\n\n#### resources\n\nType: `array` of `string`\n\nDirectories that should be served under the `/resources` path.\n\nExample\n```js\nresources: 'src'\n```\n```\nsrc\n  - my\n    - lib\n      - Button.js\n```\n`http://localhost/contextpath/resources/my/lib/Button.js`\n\n#### testresources\n\nType: `array` of `string`\n\nDirectories that should be served under the `/test-resources` path.\n\nExample\n```js\ntestresources: 'test'\n```\n```\ntest\n  - my\n    - lib\n      - Button.html\n```\n`http://localhost/contextpath/test-resources/my/lib/Button.html`\n\n#### cors\n\nType: `object`  \nDefault: `null`\n\nConfiguration for [node-cors](https://github.com/troygoode/node-cors/) to enable Cross Origin Resource Sharing (CORS).\n\nExample\n```js\ncors: {\n  origin: '*'\n}\n```\n\n#### proxypath\n\nType: `string`\n\nIf set, a generic proxy under the specified path will be provided to consume resources from other origins without causing CORS issues.\n\nURL-Format: `proxypath/{http|https}/{host}/{path}`\n\nExample\n```js\nproxypath: 'proxy'\n```\n`http://localhost/contextpath/proxy/http/example.com/foo`\n\n#### proxyOptions\n\nType: `object`\n\nOptions for [connect-openui5 proxy](https://github.com/SAP/connect-openui5#proxyoptions).\n\n#### lessOptions\n\nType: `object`\n\nOptions for [connect-openui5 less](https://github.com/SAP/connect-openui5#lessoptions).\n\n\n### Usage Examples\n\n#### App\n\nThis example will run a web server at `http://localhost:8000/`.  \nIt serves the `webapp` directory at root level and the openui5 resources at `http://localhost:8000/resources/*`.\n\n```js\nconnect: {\n  server: {\n    options: {\n      port: 8000\n    }\n  }\n},\n\nopenui5_connect: {\n  server: {\n    options: {\n      appresources: 'webapp',\n      resources: 'path/to/openui5/resources'\n    }\n  }\n}\n```\n\n#### Custom middleware\n\nThis example will add custom middleware before (unshift) and after (push) the middlewares created by this task.\n\n```js\nconnect: {\n  server: {\n    options: {\n      port: 8000,\n      middleware: function(connect, options, middlewares) {\n        middlewares.unshift(function(req, res, next) {\n          // before openui5 middleware\n        });\n        middlewares.push(function(req, res, next) {\n          // after openui5 middleware\n        });\n        return middlewares;\n      }\n    }\n  }\n},\n\nopenui5_connect: {\n  server: {\n    options: {\n      appresources: 'webapp',\n      resources: 'path/to/openui5/resources'\n    }\n  }\n}\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Release History\n\nSee [CHANGELOG.md](CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSAP-archive%2Fgrunt-openui5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSAP-archive%2Fgrunt-openui5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSAP-archive%2Fgrunt-openui5/lists"}