Gathering detailed insights and metrics for less-openui5
Gathering detailed insights and metrics for less-openui5
Gathering detailed insights and metrics for less-openui5
Gathering detailed insights and metrics for less-openui5
npm install less-openui5
97.6
Supply Chain
99.2
Quality
81.5
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
29 Stars
572 Commits
13 Forks
21 Watching
11 Branches
604 Contributors
Updated on 24 Nov 2024
JavaScript (67.01%)
CSS (32.54%)
Less (0.45%)
Cumulative downloads
Total Downloads
Last day
-0.4%
25,686
Compared to previous day
Last week
-1.1%
143,638
Compared to previous week
Last month
6.6%
605,122
Compared to previous month
Last year
5.6%
6,302,596
Compared to previous year
3
7
Build OpenUI5 themes with Less.js.
npm install less-openui5
1var lessOpenUI5 = require('less-openui5'); 2 3// Create a builder instance 4var builder = new lessOpenUI5.Builder(); 5 6// Build a theme 7builder.build({ 8 lessInput: '@var: #ffffff; .class { color: @var; float: left }' 9}) 10.then(function(result) { 11 12 console.log(result.css); // => regular css 13 /* 14 .class { 15 color: #ffffff; 16 float: left; 17 } 18 */ 19 20 console.log(result.cssRtl); // => mirrored css for right-to-left support 21 /* 22 .class { 23 color: #ffffff; 24 float: right; 25 } 26 */ 27 28 console.log(result.variables); // => less variables with their values (only global ones) 29 /* 30 { var: "#ffffff" } 31 */ 32 33 console.log(result.imports); // => paths to files imported via @import directives 34 /* 35 [] 36 */ 37 38 // Clear builder cache when finished to cleanup memory 39 builder.clearCache(); 40 41});
Creates a new Builder
instance.
It caches build results to only rebuild a theme when related files have been changed.
This is mainly relevant when building themes as part of a server middleware like connect-openui5
.
Type: Node.js fs
interface
By default, all file system access is done via the standard Node.js file system ("fs"). With this option an alternative file system can be passed and will be used for all file system operations.
Returns a Promise resolving with a result
object.
Required (either lessInput
or lessInputPath
, not both)
Type: string
Input less content.
Required (either lessInput
or lessInputPath
, not both)
Type: string
Path to input less file.
When rootPaths
is given this must be a relative path inside one of the provided rootPaths
, otherwise just a regular filesystem path.
Type: boolean
Default: true
Create mirrored css for right-to-left support.
Type boolean
Default: false
Create files for experimental CSS Variables support (cssSkeleton
, cssSkeletonRtl
, cssVariablesSource
, cssVariables
).
Type: array
of string
Root paths to use for import directives.
This option differs from the less compiler.paths
option.
It is useful if less files are located in separate folders but referenced as they would all be in one.
1rootPaths: [ './lib1', './lib2' ]
Folder structure
lib1
my
themes
foo
foo.less
lib2
my
themes
bar
bar.less
lib2/my/themes/bar/bar.less
1@import "../foo/foo.less"; /* lib1/my/themes/foo/foo.less will be imported */
Type: object
Options for the less parser (less.Parser
).
Note
relativeUrls
option is changed from false
to true
.javascriptEnabled
has been removed. JavaScript is always disabled and cannot be enabled.Type object
Options for the less compiler (tree.toCss
).
Note: The options sourceMap
and cleancss
are not supported. An exception will be thrown when used.
Type string
Dot-separated name of the corresponding library.
It will be used to inline the variables
JSON as data-uri which can be retrieved at runtime.
Type object
Scope options to be set when not using a .theming file. The available settings are:
selector
embeddedFilePath
embeddedCompareFilePath
baseFilePath
Those settings correspond to the aScopes property of the .theming file. When using this options all four settings have to be set.
Example:
1scope: { 2 selector: "scopeSelector", 3 embeddedFilePath: "src/themes/theme_to_be_embedded.less", 4 embeddedCompareFilePath: "src/themes/basetheme_to_compare_embedded_theme_to.less", 5 baseFilePath: "src/themes/basetheme_to_compare_embedded_theme_to.less" 6}
Type: string
Regular css output.
Type: string
Mirrored css for right-to-left support (if rtl option was enabled).
Type: object
Key-value map of global less variables (without @ prefix) defined by files within the same folder as the input file. This excludes variables imported from a different path, as those are usually shared across multiple themes.
Type: object
Key-value map of all global less variables (without @ prefix).
Type: array
Paths to files imported via import directives.
Type: string
Only available when options.cssVariables
is set to true
CSS with references to CSS Variables.
Type: string
Only available when options.cssVariables
and options.rtl
are set to true
Mirrored (right-to-left) CSS with references to CSS Variables (if rtl
option was enabled).
Type: string
Only available when options.cssVariables
is set to true
Source file used to compile the cssVariables
output.
Type: string
Only available when options.cssVariables
is set to true
Definition of CSS Variables based on LESS variables.
Clears all cached build results.
Use this method to prevent high memory consumption when building many themes within the same process.
See CONTRIBUTING.md.
See CHANGELOG.md.
The latest stable version of the package.
Stable Version
1
6.3/10
Summary
Processing untrusted theming resources might execute arbitrary code (ACE)
Affected Versions
< 0.10.0
Patched Versions
0.10.0
Reason
27 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
0 existing vulnerabilities detected
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 1/17 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More