How to use the @ui5/builder.tasks function in @ui5/builder

To help you get started, we’ve selected a few @ui5/builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / ui5-project / lib / projectPreprocessor.js View on Github external
handleTask(extension) {
		if (!extension.metadata && !extension.metadata.name) {
			throw new Error(`Task extension ${extension.id} is missing 'metadata.name' configuration`);
		}
		if (!extension.task) {
			throw new Error(`Task extension ${extension.id} is missing 'task' configuration`);
		}
		const taskRepository = require("@ui5/builder").tasks.taskRepository;

		const taskPath = path.join(extension.path, extension.task.path);
		const task = require(taskPath); // throws if not found

		taskRepository.addTask(extension.metadata.name, task);
	}
github SAP / ui5-project / test / lib / extensions.js View on Github external
return projectPreprocessor.processTree(tree).then((parsedTree) => {
		t.deepEqual(parsedTree.dependencies.length, 0, "Application project has no dependencies");
		const taskRepository = require("@ui5/builder").tasks.taskRepository;
		t.truthy(taskRepository.getTask("task.a"), "task.a has been added to the task repository");
	});
});

@ui5/builder

UI5 Tooling - Builder

Apache-2.0
Latest version published 3 months ago

Package Health Score

89 / 100
Full package analysis

Popular @ui5/builder functions