Skip to content

Commit dbb9efc

Browse files
committed
Merge 'origin/master' into generate-h2-depcache-files
2 parents 0d00d2f + 83703bc commit dbb9efc

File tree

12 files changed

+88
-83
lines changed

12 files changed

+88
-83
lines changed

.chglog/RELEASE.tpl.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@
2424

2525
{{ if .Tag.Previous }}
2626
### All changes
27-
<a name="{{ .Tag.Previous.Name }}...{{ .Tag.Name }}"></a>
28-
`[{{ .Tag.Previous.Name }}...{{ .Tag.Name }}]``
27+
[`{{ .Tag.Previous.Name }}...{{ .Tag.Name }}`]
2928
{{ end }}
3029

3130
{{ if .Tag.Previous -}}
32-
[{{ .Tag.Previous.Name }}...{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
31+
[`{{ .Tag.Previous.Name }}...{{ .Tag.Name }}`]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
3332
{{ end -}}
3433
{{ end -}}

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,22 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
44

5-
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v0.0.1...HEAD).
5+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v0.0.2...HEAD).
6+
7+
<a name="v0.0.2"></a>
8+
## [v0.0.2] - 2018-06-21
9+
### Bug Fixes
10+
- **Builders:** Do not bundle debug files [`19800a1`](https://github.com/SAP/ui5-builder/commit/19800a16689210c13495bc1bd0949896500cfc52)
11+
12+
### Internal Changes
13+
- Add coveralls [`434b675`](https://github.com/SAP/ui5-builder/commit/434b67512444f279288359bf990895b607254075)
14+
- Add and update badges [`9c33b04`](https://github.com/SAP/ui5-builder/commit/9c33b047d9211e59f23e5fcbc76e66e5fd143150)
15+
- Have greenkeeper-lockfile amend any greenkeeper commit [`641817b`](https://github.com/SAP/ui5-builder/commit/641817b4e4f618aab6bbe3bde55ae01a942b93f8)
16+
- Prepare Greenkeeper installation [`fe9cbbf`](https://github.com/SAP/ui5-builder/commit/fe9cbbf0fbe3dd5bd8748adece8137797ae46795)
17+
- **Greenkeeper:** Add badge [`167cca9`](https://github.com/SAP/ui5-builder/commit/167cca9d038b4403fd282897b353db796fc0f7d9)
18+
- **Greenkeeper:** Add config file [`891339e`](https://github.com/SAP/ui5-builder/commit/891339e9493e8d0e609483891c476dea9c041d4e)
19+
- **README:** Pre-Alpha -> Alpha [`33c8190`](https://github.com/SAP/ui5-builder/commit/33c81906358d38b634099acbf8aafa234cc504db)
20+
621

722
<a name="v0.0.1"></a>
823
## v0.0.1 - 2018-06-06
@@ -26,3 +41,4 @@ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-buil
2641
- **Travis:** Add node.js 10 to test matrix [`ce91dd1`](https://github.com/SAP/ui5-builder/commit/ce91dd17e4e28932a838ec743a489ff6495d21a9)
2742

2843

44+
[v0.0.2]: https://github.com/SAP/ui5-builder/compare/v0.0.1...v0.0.2

lib/lbt/bundle/Builder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ class BundleBuilder {
152152
// when decorateBootstrapModule is set to false, we don't write the optimized flag
153153
// and don't write the try catch wrapper
154154
this.shouldDecorate = this.options.decorateBootstrapModule &&
155-
(((this.optimizedSources && !this.options.debugMode) || this.optimize) && resolvedModule.containsGlobal);
155+
(((this.optimizedSources && !this.options.debugMode) || this.optimize) &&
156+
this.targetBundleFormat.shouldDecorate(resolvedModule));
156157
// TODO is the following condition ok or should the availability of jquery.sap.global.js be configurable?
157158
this.jqglobalAvailable = !resolvedModule.containsGlobal;
158159
this.openModule(resolvedModule.name);

lib/tasks/createDebugFiles.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ const dbg = require("../processors/debugFileCreator");
1010
* @param {string} [parameters.options.pattern] Pattern to locate the files to be processed
1111
* @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
1212
*/
13-
module.exports = function({workspace, options}) {
14-
return workspace.byGlob(options.pattern)
15-
.then((allResources) => {
16-
return dbg({
17-
resources: allResources
18-
});
19-
})
20-
.then((processedResources) => {
21-
return Promise.all(processedResources.map((resource) => {
22-
return workspace.write(resource);
23-
}));
24-
});
13+
module.exports = async function({workspace, options}) {
14+
let allResources;
15+
if (workspace.byGlobSource) { // API only available on duplex collections
16+
allResources = await workspace.byGlobSource(options.pattern);
17+
} else {
18+
allResources = await workspace.byGlob(options.pattern);
19+
}
20+
return dbg({
21+
resources: allResources
22+
}).then((processedResources) => {
23+
return Promise.all(processedResources.map((resource) => {
24+
return workspace.write(resource);
25+
}));
26+
});
2527
};

lib/types/application/ApplicationBuilder.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class ApplicationBuilder extends AbstractBuilder {
2222
this.availableTasks = [
2323
"replaceCopyright",
2424
"replaceVersion",
25-
"createDebugFiles",
2625
"generateFlexChangesBundle",
2726
"generateManifestBundle",
2827
"generateComponentPreload",
2928
"generateStandaloneAppBundle",
3029
"generateBundle",
30+
"createDebugFiles",
3131
"uglify",
3232
"generateVersionInfo"
3333
];
@@ -52,16 +52,6 @@ class ApplicationBuilder extends AbstractBuilder {
5252
});
5353
});
5454

55-
this.addTask("createDebugFiles", () => {
56-
const createDebugFiles = tasks.createDebugFiles;
57-
return createDebugFiles({
58-
workspace: resourceCollections.workspace,
59-
options: {
60-
pattern: "/**/*.js"
61-
}
62-
});
63-
});
64-
6555
this.addTask("generateFlexChangesBundle", () => {
6656
const generateFlexChangesBundle = tasks.generateFlexChangesBundle;
6757
return generateFlexChangesBundle({
@@ -137,6 +127,16 @@ class ApplicationBuilder extends AbstractBuilder {
137127
});
138128
}
139129

130+
this.addTask("createDebugFiles", () => {
131+
const createDebugFiles = tasks.createDebugFiles;
132+
return createDebugFiles({
133+
workspace: resourceCollections.workspace,
134+
options: {
135+
pattern: "/**/*.js"
136+
}
137+
});
138+
});
139+
140140
this.addTask("uglify", () => {
141141
const uglify = tasks.uglify;
142142
return uglify({

lib/types/library/LibraryBuilder.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ class LibraryBuilder extends AbstractBuilder {
2222
this.availableTasks = [
2323
"replaceCopyright",
2424
"replaceVersion",
25-
"createDebugFiles",
2625
"generateComponentPreload",
2726
"generateBundle",
2827
"generateLibraryPreload",
2928
"buildThemes",
29+
"createDebugFiles",
3030
"uglify"
3131
];
3232

@@ -52,16 +52,6 @@ class LibraryBuilder extends AbstractBuilder {
5252
});
5353
});
5454

55-
this.addTask("createDebugFiles", () => {
56-
const createDebugFiles = tasks.createDebugFiles;
57-
return createDebugFiles({
58-
workspace: resourceCollections.workspace,
59-
options: {
60-
pattern: "/resources/**/*.js"
61-
}
62-
});
63-
});
64-
6555
const componentPreload = project.builder && project.builder.componentPreload;
6656
if (componentPreload) {
6757
const generateComponentPreload = tasks.generateComponentPreload;
@@ -120,6 +110,16 @@ class LibraryBuilder extends AbstractBuilder {
120110
});
121111
});
122112

113+
this.addTask("createDebugFiles", () => {
114+
const createDebugFiles = tasks.createDebugFiles;
115+
return createDebugFiles({
116+
workspace: resourceCollections.workspace,
117+
options: {
118+
pattern: "/resources/**/*.js"
119+
}
120+
});
121+
});
122+
123123
this.addTask("uglify", () => {
124124
const uglify = tasks.uglify;
125125
return uglify({

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ui5/builder",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "UI5 Build and Development Tooling - Builder",
55
"author": "SAP SE (https://www.sap.com)",
66
"license": "Apache-2.0",

test/expected/build/application.g/dest/Component-preload.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
sap.ui.require.preload({
2-
"application/g/Component-dbg.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.Component",{metadata:{manifest:"json"}})});
3-
},
42
"application/g/Component.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.Component",{metadata:{manifest:"json"}})});
53
},
64
"application/g/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}'

test/expected/build/application.g/dest/subcomponentA/Component-preload.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
sap.ui.require.preload({
2-
"application/g/subcomponentA/Component-dbg.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.subcomponentA.Component",{metadata:{manifest:"json"}})});
3-
},
42
"application/g/subcomponentA/Component.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.subcomponentA.Component",{metadata:{manifest:"json"}})});
53
},
64
"application/g/subcomponentA/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g.subcomponentA","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}'

0 commit comments

Comments
 (0)