@ui5/project/specifications/Project

@ui5/project/specifications/Project

Project

Extends

Methods

getCustomConfiguration() → {object}

Description:
  • Get the project's customConfiguration
Source:
Returns:
Custom Configuration
Type
object

getKind() → {string}

Description:
  • Get the kind of this specification, for example project or extension
Source:
Overrides:
Returns:
Specification kind
Type
string

getName() → {string}

Description:
  • Get the name of this specification
Source:
Overrides:
Returns:
Specification name
Type
string

getNamespace() → {string|null}

Description:
  • Get the project namespace. Returns `null` for projects that have none or multiple namespaces, for example Modules or Theme Libraries.
Source:
Returns:
Project namespace in slash notation (e.g. my/project/name) or null
Type
string | null

getReader(optionsopt) → {@ui5/fs/ReaderCollection}

Description:
  • Get a ReaderCollection for accessing all resources of the project in the specified "style":
    • buildtime: Resource paths are always prefixed with /resources/ or /test-resources/ followed by the project's namespace
    • runtime: Access resources the same way the UI5 runtime would do
    • flat: No prefix, no namespace
    Resource readers always use POSIX-style.
Source:
Parameters:
Name Type Attributes Description
options object <optional>
Properties
Name Type Attributes Default Description
style string <optional>
buildtime Path style to access resources. Can be "buildtime", "runtime" or "flat" This parameter might be ignored by some project types
Returns:
Reader collection allowing access to all resources of the project
Type
@ui5/fs/ReaderCollection

getRootPath() → {string}

Description:
  • Get the specification's file system path. This might not be POSIX-style on some platforms
Source:
Overrides:
Returns:
Project root path
Type
string

getRootReader(parametersopt) → {@ui5/fs/ReaderCollection}

Description:
  • Get a ReaderCollection for the root directory of the specification. Resource readers always use POSIX-style
Source:
Overrides:
Parameters:
Name Type Attributes Description
parameters object <optional>
Parameters
Properties
Name Type Attributes Default Description
useGitignore object <optional>
true Whether to apply any excludes defined in an optional .gitignore in the root directory
Returns:
Reader collection
Type
@ui5/fs/ReaderCollection

getSourcePath() → {string}

Description:
  • Get the path of the project's source directory. This might not be POSIX-style on some platforms. Projects with multiple source paths will throw an error. For example Modules.
Source:
Throws:
In case a project has multiple source directories
Type
Error
Returns:
Absolute path to the source directory of the project
Type
string

getSpecVersion() → {@ui5/project/specifications/SpecificationVersion}

Description:
  • Returns an instance of a helper class representing a Specification Version
Source:
Overrides:
Returns:
Type
@ui5/project/specifications/SpecificationVersion

getType() → {string}

Description:
  • Get the type of this specification, for example application or library in case of projects, and task or server-middleware in case of extensions
Source:
Overrides:
Returns:
Specification type
Type
string

getVersion() → {string}

Description:
  • Get the specification's generic version, as typically defined in a package.json
Source:
Overrides:
Returns:
Project version
Type
string

getWorkspace() → {@ui5/fs/DuplexCollection}

Description:
  • Get a DuplexCollection for accessing and modifying a project's resources. This is always of style buildtime.
Source:
Returns:
DuplexCollection
Type
@ui5/fs/DuplexCollection

isFrameworkProject() → {boolean}

Description:
  • Check whether the project is a UI5-Framework project
Source:
Returns:
True if the project is a framework project
Type
boolean