-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Builder: Add handling for custom task configurations
As per RFC0004: SAP/ui5-tooling#54
- Loading branch information
1 parent
e960468
commit f0d4429
Showing
7 changed files
with
174 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const tasks = { | ||
replaceCopyright: require("./replaceCopyright"), | ||
replaceVersion: require("./replaceVersion"), | ||
createDebugFiles: require("./createDebugFiles"), | ||
uglify: require("./uglify"), | ||
buildThemes: require("./buildThemes"), | ||
generateLibraryManifest: require("./generateLibraryManifest"), | ||
generateVersionInfo: require("./generateVersionInfo"), | ||
generateManifestBundle: require("./bundlers/generateManifestBundle"), | ||
generateFlexChangesBundle: require("./bundlers/generateFlexChangesBundle"), | ||
generateComponentPreload: require("./bundlers/generateComponentPreload"), | ||
generateStandaloneAppBundle: require("./bundlers/generateStandaloneAppBundle"), | ||
generateBundle: require("./bundlers/generateBundle"), | ||
generateLibraryPreload: require("./bundlers/generateLibraryPreload") | ||
}; | ||
|
||
function getTask(taskName) { | ||
const task = tasks[taskName]; | ||
|
||
if (!task) { | ||
throw new Error(`taskRepository: Unkown Task ${taskName}`); | ||
} | ||
return task; | ||
} | ||
|
||
function addTask(name, task) { | ||
if (tasks[name]) { | ||
throw new Error(`taskRepository: Task ${name} already registered`); | ||
} | ||
tasks[name] = task; | ||
} | ||
|
||
function getAllTasks() { | ||
return tasks; | ||
} | ||
|
||
module.exports = { | ||
getTask: getTask, | ||
addTask: addTask, | ||
getAllTasks: getAllTasks | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters