Skip to content

Commit 450ab6c

Browse files
committed
Test UI5 Tooling Task Extensibility Feature
Under development. Depends on: SAP/ui5-project#64 SAP/ui5-builder#106
1 parent fa013b9 commit 450ab6c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/tasks/ponyInserter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ const stringReplacer = require("@ui5/builder").processors.stringReplacer;
1212
* @returns {Promise<undefined>} Promise resolving with undefined once data has been written
1313
*/
1414
module.exports = function({workspace, options}) {
15-
const pattern = new RegExp(options.configuration.pattern || "the");
15+
const pattern = options.configuration.pattern || "the";
1616

17-
return workspace.byGlob("/**/*.{js,json}")
17+
return workspace.byGlob("/**/*.{js,json,html}")
1818
.then((processedResources) => {
1919
return stringReplacer({
2020
resources: processedResources,
2121
options: {
22-
pattern,
23-
replacement: "the pony and the "
22+
pattern: new RegExp(pattern),
23+
replacement: "pony"
2424
}
2525
});
2626
})

ui5.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ builder:
77
- name: ponyInserter
88
beforeTask: uglify
99
configuration:
10-
color: blue
11-
----
10+
pattern: the
11+
---
1212
specVersion: "0.1"
1313
kind: extension
1414
type: task

0 commit comments

Comments
 (0)