Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Builder: Add excludes option #254

Merged
merged 9 commits into from
Jun 3, 2019
13 changes: 11 additions & 2 deletions lib/builder/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,17 @@ module.exports = {

const projectType = typeRepository.getType(project.type);
const resourceCollections = resourceFactory.createCollectionsForTree(project, {
useNamespaces: true,
virtualReaders: projectWriters
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({
Expand Down
239 changes: 200 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@
"url": "[email protected]:SAP/ui5-builder.git"
},
"dependencies": {
"@ui5/fs": "^1.0.2",
"@ui5/fs": "^1.1.0",
"@ui5/logger": "^1.0.1",
"cheerio": "^0.22.0",
"escodegen": "^1.11.1",
"escope": "^3.6.0",
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"globby": "^7.1.1",
"globby": "^9.2.0",
"graceful-fs": "^4.1.15",
"jsdoc": "3.5.5",
"less-openui5": "^0.6.0",
Expand Down
14 changes: 14 additions & 0 deletions test/expected/build/application.g/excludes/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"_version": "1.1.0",
"sap.app": {
"_version": "1.1.0",
"id": "application.g",
"type": "application",
"applicationVersion": {
"version": "${version}"
},
"embeds": ["embedded"],
"title": "{{title}}"
},
"customCopyrightString": "${copyright}"
}
Loading