@ui5/builder
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -5,25 +5,9 @@ # Changelog | ||
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v0.0.1...HEAD). | ||
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v0.0.2...HEAD). | ||
<a name="v0.0.1"></a> | ||
## v0.0.1 - 2018-06-06 | ||
<a name="v0.0.2"></a> | ||
## v0.0.2 - 2018-06-20 | ||
### Bug Fixes | ||
- Restore default component preload [`a09bec2`](https://github.com/SAP/ui5-builder/commit/a09bec2f57f45a1c5d74681b3bdec4f7fdc45343) | ||
- **Builders:** Do not bundle debug files [`19800a1`](https://github.com/SAP/ui5-builder/commit/19800a16689210c13495bc1bd0949896500cfc52) | ||
### Features | ||
- Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7) | ||
### Internal Changes | ||
- Prepare npm release [`8947863`](https://github.com/SAP/ui5-builder/commit/8947863f6339d34aff801679e0338fe32c042194) | ||
- Update .editorconfig [`1f66211`](https://github.com/SAP/ui5-builder/commit/1f66211e3f7b82085caf90c341cee2c4c671fb8a) | ||
- Add chglog config + npm release scripts [`c82dc4e`](https://github.com/SAP/ui5-builder/commit/c82dc4e52c95260ba6e2c2f6423ce18ba9330267) | ||
- Update sap-ui-core bundle excludes [`d9d7a7a`](https://github.com/SAP/ui5-builder/commit/d9d7a7a75711c8f797c479dbd60b7c7aa2d984ea) | ||
- Update dependencies [`f852eb8`](https://github.com/SAP/ui5-builder/commit/f852eb87f98e0f1feb18fbe2b0306781f8ae52f1) | ||
- Add travis CI badge [`d34a3b2`](https://github.com/SAP/ui5-builder/commit/d34a3b264006dfacbd31cbb5ed2ef929fa8076b5) | ||
- Fix links to CONTRIBUTING.md file [`a3cc348`](https://github.com/SAP/ui5-builder/commit/a3cc3482cbb8c88b6e3dce6d46143473a66ce3e0) | ||
- **ESLint:** Activate no-console [`f8bd991`](https://github.com/SAP/ui5-builder/commit/f8bd99159c5359edf7bb53425c1650ee46fa0663) | ||
- **ESLint:** Activate no-var rule [`88c7950`](https://github.com/SAP/ui5-builder/commit/88c79501c3db9b579521a88d57a0e8a2742088bb) | ||
- **Readme:** Fix urls under Type and Processor section [`d1794bd`](https://github.com/SAP/ui5-builder/commit/d1794bd7026a9008b0b67870c91141f66511877a) | ||
- **Travis:** Add node.js 10 to test matrix [`ce91dd1`](https://github.com/SAP/ui5-builder/commit/ce91dd17e4e28932a838ec743a489ff6495d21a9) | ||
@@ -13,14 +13,16 @@ const dbg = require("../processors/debugFileCreator"); | ||
*/ | ||
module.exports = function({workspace, options}) { | ||
return workspace.byGlob(options.pattern) | ||
.then((allResources) => { | ||
return dbg({ | ||
resources: allResources | ||
}); | ||
}) | ||
.then((processedResources) => { | ||
return Promise.all(processedResources.map((resource) => { | ||
return workspace.write(resource); | ||
})); | ||
}); | ||
module.exports = async function({workspace, options}) { | ||
let allResources; | ||
if (workspace.byGlobSource) { // API only available on duplex collections | ||
allResources = await workspace.byGlobSource(options.pattern); | ||
} else { | ||
allResources = await workspace.byGlob(options.pattern); | ||
} | ||
return dbg({ | ||
resources: allResources | ||
}).then((processedResources) => { | ||
return Promise.all(processedResources.map((resource) => { | ||
return workspace.write(resource); | ||
})); | ||
}); | ||
}; |
@@ -25,3 +25,2 @@ const AbstractBuilder = require("../AbstractBuilder"); | ||
"replaceVersion", | ||
"createDebugFiles", | ||
"generateFlexChangesBundle", | ||
@@ -32,2 +31,3 @@ "generateManifestBundle", | ||
"generateBundle", | ||
"createDebugFiles", | ||
"uglify", | ||
@@ -57,12 +57,2 @@ "generateVersionInfo" | ||
this.addTask("createDebugFiles", () => { | ||
const createDebugFiles = tasks.createDebugFiles; | ||
return createDebugFiles({ | ||
workspace: resourceCollections.workspace, | ||
options: { | ||
pattern: "/**/*.js" | ||
} | ||
}); | ||
}); | ||
this.addTask("generateFlexChangesBundle", () => { | ||
@@ -143,2 +133,12 @@ const generateFlexChangesBundle = tasks.generateFlexChangesBundle; | ||
this.addTask("createDebugFiles", () => { | ||
const createDebugFiles = tasks.createDebugFiles; | ||
return createDebugFiles({ | ||
workspace: resourceCollections.workspace, | ||
options: { | ||
pattern: "/**/*.js" | ||
} | ||
}); | ||
}); | ||
this.addTask("uglify", () => { | ||
@@ -145,0 +145,0 @@ const uglify = tasks.uglify; |
@@ -25,3 +25,2 @@ const AbstractBuilder = require("../AbstractBuilder"); | ||
"replaceVersion", | ||
"createDebugFiles", | ||
"generateComponentPreload", | ||
@@ -31,2 +30,3 @@ "generateBundle", | ||
"buildThemes", | ||
"createDebugFiles", | ||
"uglify" | ||
@@ -57,12 +57,2 @@ ]; | ||
this.addTask("createDebugFiles", () => { | ||
const createDebugFiles = tasks.createDebugFiles; | ||
return createDebugFiles({ | ||
workspace: resourceCollections.workspace, | ||
options: { | ||
pattern: "/resources/**/*.js" | ||
} | ||
}); | ||
}); | ||
const componentPreload = project.builder && project.builder.componentPreload; | ||
@@ -126,2 +116,12 @@ if (componentPreload) { | ||
this.addTask("createDebugFiles", () => { | ||
const createDebugFiles = tasks.createDebugFiles; | ||
return createDebugFiles({ | ||
workspace: resourceCollections.workspace, | ||
options: { | ||
pattern: "/resources/**/*.js" | ||
} | ||
}); | ||
}); | ||
this.addTask("uglify", () => { | ||
@@ -128,0 +128,0 @@ const uglify = tasks.uglify; |
{ | ||
"name": "@ui5/builder", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "UI5 Build and Development Tooling - Builder", | ||
@@ -34,3 +34,4 @@ "author": "SAP SE (https://www.sap.com)", | ||
"postversion": "git push --follow-tags", | ||
"release-note": "git-chglog -c .chglog/release-config.yml v$npm_package_version" | ||
"release-note": "git-chglog -c .chglog/release-config.yml v$npm_package_version", | ||
"report-coveralls": "nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
@@ -85,2 +86,13 @@ "ava": { | ||
}, | ||
"greenkeeper": { | ||
"commitMessages": { | ||
"initialBadge": "[INTERNAL] Greenkeeper: Add badge", | ||
"initialDependencies": "[INTERNAL] Greenkeeper: Update dependencies", | ||
"initialBranches": "[INTERNAL] Greenkeeper: Whitelist greenkeeper branches", | ||
"dependencyUpdate": "[INTERNAL] Greenkeeper: Update ${dependency} to version ${version}", | ||
"devDependencyUpdate": "[INTERNAL] Greenkeeper: Update ${dependency} (dev-dependency) to version ${version}", | ||
"dependencyPin": "[FIX] Greenkeeper: Pin ${dependency} to ${oldVersion}", | ||
"devDependencyPin": "[FIX] Greenkeeper: Pin ${dependency} to ${oldVersion}" | ||
} | ||
}, | ||
"repository": { | ||
@@ -111,2 +123,3 @@ "type": "git", | ||
"chai-fs": "^2.0.0", | ||
"coveralls": "^3.0.1", | ||
"cross-env": "^5.1.1", | ||
@@ -113,0 +126,0 @@ "docdash": "^0.4.0", |
@@ -8,5 +8,9 @@ ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-tooling/master/docs/images/UI5_logo_wide.png) | ||
[![Travis CI Build Status](https://travis-ci.org/SAP/ui5-builder.svg?branch=master)](https://travis-ci.org/SAP/ui5-builder) | ||
[![npm Package Version](https://img.shields.io/npm/v/@ui5/builder.svg)](https://www.npmjs.com/package/@ui5/builder) | ||
[![npm Package Version](https://badge.fury.io/js/%40ui5%2Fbuilder.svg)](https://www.npmjs.com/package/@ui5/builder) | ||
[![Coverage Status](https://coveralls.io/repos/github/SAP/ui5-builder/badge.svg)](https://coveralls.io/github/SAP/ui5-builder) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/SAP/ui5-builder.svg)](https://greenkeeper.io/) | ||
[![Dependency Status](https://david-dm.org/SAP/ui5-builder/master.svg)](https://david-dm.org/SAP/ui5-builder/master) | ||
[![devDependency Status](https://david-dm.org/SAP/ui5-builder/master/dev-status.svg)](https://david-dm.org/SAP/ui5-builder/master#info=devDependencies) | ||
**This is a Pre-Alpha release!** | ||
**This is an alpha release!** | ||
**The UI5 Build and Development Tooling described here is not intended for productive use yet. Breaking changes are to be expected.** | ||
@@ -13,0 +17,0 @@ |
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
"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"}})}); | ||
}, | ||
"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"}})}); | ||
@@ -7,0 +5,0 @@ }, |
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
"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"}})}); | ||
}, | ||
"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"}})}); | ||
@@ -7,0 +5,0 @@ }, |
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
"application/g/subcomponentB/Component-dbg.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.subcomponentB.Component",{metadata:{manifest:"json"}})}); | ||
}, | ||
"application/g/subcomponentB/Component.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.subcomponentB.Component",{metadata:{manifest:"json"}})}); | ||
@@ -7,0 +5,0 @@ }, |
@@ -9,3 +9,3 @@ const {test} = require("ava"); | ||
test("test.js: dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -20,6 +20,5 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return workspace.write(resource).then(() => { | ||
return sourceAdapter.write(resource).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -29,3 +28,3 @@ pattern: "/**/*.js" | ||
}).then(() => { | ||
return workspace.byPath("/test-dbg.js").then((resource) => { | ||
return sourceAdapter.byPath("/test-dbg.js").then((resource) => { | ||
if (!resource) { | ||
@@ -44,3 +43,3 @@ t.fail("Could not find /test-dbg.js in target"); | ||
test("test.view.js: dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -55,6 +54,5 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return workspace.write(resource).then(() => { | ||
return sourceAdapter.write(resource).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -64,3 +62,3 @@ pattern: "/**/*.js" | ||
}).then(() => { | ||
return workspace.byPath("/test-dbg.view.js").then((resource) => { | ||
return sourceAdapter.byPath("/test-dbg.view.js").then((resource) => { | ||
if (!resource) { | ||
@@ -79,3 +77,3 @@ t.fail("Could not find /test-dbg.view.js in target"); | ||
test("test.controller.js: dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -90,6 +88,5 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return workspace.write(resource).then(() => { | ||
return sourceAdapter.write(resource).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -99,3 +96,3 @@ pattern: "/**/*.js" | ||
}).then(() => { | ||
return workspace.byPath("/test-dbg.controller.js").then((resource) => { | ||
return sourceAdapter.byPath("/test-dbg.controller.js").then((resource) => { | ||
if (!resource) { | ||
@@ -114,3 +111,3 @@ t.fail("Could not find /test-dbg.controller.js in target"); | ||
test("test.fragment.js: dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -125,6 +122,5 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return workspace.write(resource).then(() => { | ||
return sourceAdapter.write(resource).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -134,3 +130,3 @@ pattern: "/**/*.js" | ||
}).then(() => { | ||
return workspace.byPath("/test-dbg.fragment.js").then((resource) => { | ||
return sourceAdapter.byPath("/test-dbg.fragment.js").then((resource) => { | ||
if (!resource) { | ||
@@ -149,3 +145,3 @@ t.fail("Could not find /test-dbg.fragment.js in target locator"); | ||
test("test-dbg.js: dbg-dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -160,6 +156,5 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return workspace.write(resource).then(() => { | ||
return sourceAdapter.write(resource).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -169,3 +164,3 @@ pattern: "/**/*.js" | ||
}).then(() => { | ||
return workspace.byPath("/test-dbg-dbg.js").then((resource) => { | ||
return sourceAdapter.byPath("/test-dbg-dbg.js").then((resource) => { | ||
if (!resource) { | ||
@@ -184,3 +179,3 @@ t.fail("Could not find /test-dbg-dbg.js in target locator"); | ||
test("test.xml: *no* dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -195,6 +190,5 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return workspace.write(resource).then(() => { | ||
return sourceAdapter.write(resource).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -204,3 +198,3 @@ pattern: "/**/*.js" | ||
}).then(() => { | ||
return workspace.byPath("/test-dbg.xml").then((resource) => { | ||
return sourceAdapter.byPath("/test-dbg.xml").then((resource) => { | ||
if (!resource) { | ||
@@ -217,3 +211,3 @@ t.pass("Could not find /test-dbg.xml in target locator as it is not a JavaScript file"); | ||
test("test1.js, test2.js: dbg file creation", (t) => { | ||
const sourceReader = resourceFactory.createAdapter({ | ||
const sourceAdapter = resourceFactory.createAdapter({ | ||
virBasePath: "/" | ||
@@ -234,8 +228,7 @@ }); | ||
const workspace = resourceFactory.createWorkspace({reader: sourceReader}); | ||
return Promise.all(resources.map((resource) => { | ||
return workspace.write(resource); | ||
return sourceAdapter.write(resource); | ||
})).then(() => { | ||
return tasks.createDebugFiles({ | ||
workspace: workspace, | ||
workspace: sourceAdapter, | ||
options: { | ||
@@ -246,4 +239,4 @@ pattern: "/**/*.js" | ||
return Promise.all([ | ||
workspace.byPath("/test1-dbg.js"), | ||
workspace.byPath("/test2-dbg.js") | ||
sourceAdapter.byPath("/test1-dbg.js"), | ||
sourceAdapter.byPath("/test2-dbg.js") | ||
]).then((resources) => { | ||
@@ -250,0 +243,0 @@ if (!resources || !resources[0] || !resources[1]) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
267
57
303423
15
7546