Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/builder/lib/lbt/resources/ModuleInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ModuleInfo {
* global scope. If a module declares global variables, all of them will be exported
* with additional code of the form:
*
* ```
* ```js
* this["name"] = name;
* ```
*
Expand Down
3 changes: 2 additions & 1 deletion packages/builder/lib/lbt/utils/JSTokenizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
*
* Contains functions to consume tokens on an input string.
*
* @example
* ```js
* sap.ui.require(["sap/base/util/JSTokenizer"], function(JSTokenizer){
* JSTokenizer().parseJS("{test:'123'}"); // {test:'123'}
* });
* ```
*
* @class sap/base/util/JSTokenizer
* @since 1.58
Expand Down
2 changes: 1 addition & 1 deletion packages/builder/lib/processors/bundlers/moduleBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const log = getLogger("builder:processors:bundlers:moduleBundler");
* Excludes should be marked with a leading exclamation mark '!'. The order of filters is relevant; a later
* exclusion overrides an earlier inclusion, and vice versa.
* <caption>List of modules as glob patterns that should be in- or excluded</caption>
* ```
* ```js
* // Includes everything from "some/path/to/module/",
* // but excludes the subfolder "some/path/to/module/to/be/excluded/"
* const section = {
Expand Down
4 changes: 2 additions & 2 deletions packages/builder/lib/processors/nonAsciiEscaper.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const escapeNonAscii = function(string) {
/**
* Escapes non ASCII characters with unicode escape sequences.
*
* @example
* ```js
* const encoding = nonAsciiEscaper.getEncodingFromAlias("ISO-8859-1");
* nonAsciiEscaper({resources, options: {encoding}});
*
* ```
*
* @public
* @function default
Expand Down
5 changes: 3 additions & 2 deletions packages/builder/lib/processors/versionInfoGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ function getTimestamp() {
* @typedef {Object<string, {lazy: boolean}>} ManifestLibraries
*
* sample:
* @example
* ```json
* {
* "sap.chart": {
* "lazy": true
* },
* "sap.f": { }
* }
* ```
*/

/**
Expand Down Expand Up @@ -366,7 +367,7 @@ const processLibraryInfo = async (libraryInfo) => {
* @param {module:@ui5/builder/processors/versionInfoGenerator~LibraryInfo[]} parameters.options.libraryInfos Array of
* objects representing libraries,
* e.g.
* ```
* ```json
* {
* name: "lib.x",
* version: "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/builder/lib/tasks/generateResourcesJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function getCreatorOptions(projectName) {
* </p>
*
* <caption>sample resources.json</caption>
* ```
* ```js
* const resourcesJson = {
* "_version": "1.1.0",
* "resources": [
Expand Down
3 changes: 2 additions & 1 deletion packages/fs/lib/AbstractReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ class AbstractReader {
/**
* Locates resources by matching glob patterns.
*
* @example
* ```js
* byGlob("**‏/*.{html,htm}");
* byGlob("**‏/.library");
* byGlob("/pony/*");
* ```
*
* @public
* @param {string|string[]} virPattern glob pattern as string or array of glob patterns for
Expand Down
3 changes: 2 additions & 1 deletion packages/fs/lib/WriterCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ class WriterCollection extends AbstractReaderWriter {
* @param {object.<string, @ui5/fs/AbstractReaderWriter>} parameters.writerMapping
* Mapping of virtual base paths to writers. Path are matched greedy
*
* @example
* ```js
* new WriterCollection({
* name: "Writer Collection",
* writerMapping: {
* "/": writerA,
* "/my/path/": writerB,
* }
* });
* ```
*/
constructor({name, writerMapping}) {
super(name);
Expand Down
3 changes: 2 additions & 1 deletion packages/fs/lib/readers/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const log = getLogger("resources:readers:Link");
/**
* A reader that allows for rewriting paths segments of all resources passed through it.
*
* @example
* ```js
* import Link from "@ui5/fs/readers/Link";
* const linkedReader = new Link({
* reader: sourceReader,
Expand All @@ -20,6 +20,7 @@ const log = getLogger("resources:readers:Link");
* // The following resolves with a @ui5/fs/ResourceFacade of the resource
* // located at "/resources/my-app-name/Component.js" in the sourceReader
* const resource = await linkedReader.byPath("/app/Component.js");
* ```
*
* @public
* @class
Expand Down
3 changes: 2 additions & 1 deletion packages/fs/lib/resourceFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export function createFilterReader(parameters) {
* Create a [Link-Reader]{@link @ui5/fs/readers/Filter} with the given reader.
* The provided path mapping allows for rewriting paths segments of all resources passed through it.
*
* @example
* ```js
* import {createLinkReader} from "@ui5/fs/resourceFactory";
* const linkedReader = createLinkReader({
* reader: sourceReader,
Expand All @@ -218,6 +218,7 @@ export function createFilterReader(parameters) {
* targetPath: `/resources/my-app-name/`
* }
* });
* ```
*
* // The following resolves with a @ui5/fs/ResourceFacade of the resource
* // located at "/resources/my-app-name/Component.js" in the sourceReader
Expand Down
9 changes: 6 additions & 3 deletions packages/project/lib/ui5Framework/AbstractResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,15 @@ class AbstractResolver {
/**
* Library metadata entry
*
* @example
* ```js
* const libraryMetadataEntry = {
* "id": "@openui5/sap.ui.core",
* "version": "1.75.0",
* "path": "~/.ui5/framework/packages/@openui5/sap.ui.core/1.75.0",
* "dependencies": [],
* "optionalDependencies": []
* };
* ```
*
* @public
* @typedef {object} @ui5/project/ui5Framework/AbstractResolver~LibraryMetadataEntry
Expand All @@ -150,7 +151,7 @@ class AbstractResolver {
/**
* Install result
*
* @example
* ```js
* const resolverInstallResult = {
* "libraryMetadata": {
* "sap.ui.core": {
Expand All @@ -161,6 +162,7 @@ class AbstractResolver {
* }
* }
* };
* ```
*
* @public
* @typedef {object} @ui5/project/ui5Framework/AbstractResolver~ResolverInstallResult
Expand All @@ -171,7 +173,7 @@ class AbstractResolver {
/**
* Installs the provided libraries and their dependencies
*
* @example
* ```js
* const resolver = new Sapui5Resolver({version: "1.76.0"});
* // Or for OpenUI5:
* // const resolver = new Openui5Resolver({version: "1.76.0"});
Expand All @@ -181,6 +183,7 @@ class AbstractResolver {
* }).catch((err) => {
* // Handle installation errors
* });
* ```
*
* @public
* @param {string[]} libraryNames List of library names to be installed
Expand Down
3 changes: 2 additions & 1 deletion packages/server/lib/middleware/MiddlewareUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ class MiddlewareUtil {
/**
* MIME Info
*
* @example
* ```js
* const mimeInfo = {
* "type": "text/html",
* "charset": "utf-8",
* "contentType": "text/html; charset=utf-8"
* };
* ```
*
* @public
* @typedef {object} MimeInfo
Expand Down