How to use the @ui5/fs.resourceFactory.createCollectionsForTree function in @ui5/fs

To help you get started, we’ve selected a few @ui5/fs 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-builder / lib / builder / builder.js View on Github external
return depPromise.then(() => {
				if (projects[project.metadata.name]) {
					return Promise.resolve();
				} else {
					projects[project.metadata.name] = true;
				}
				buildLogger.startWork(`Building project ${project.metadata.name}`);

				const projectType = typeRepository.getType(project.type);
				const resourceCollections = resourceFactory.createCollectionsForTree(project, {
					virtualReaders: projectWriters,
					getVirtualBasePathPrefix: function({project, virBasePath}) {
						if (project.type === "application" && project.metadata.namespace) {
							return "/resources/" + project.metadata.namespace;
						}
					},
					getProjectExcludes: function(project) {
						if (project.builder && project.builder.resources) {
							return project.builder.resources.excludes;
						}
					}
				});

				const writer = new MemAdapter({
					virBasePath: "/"
				});