mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 12:54:45 +00:00
node: added fileloader to LoadData. (#6530)
This commit is contained in:
parent
f8f1d468a0
commit
fe596179da
4 changed files with 103 additions and 0 deletions
|
@ -247,6 +247,11 @@ export interface LoadFileOptions {
|
|||
* Sets library paths used for looking up `@library` imports to the specified map of library names to paths.
|
||||
*/
|
||||
libraryPaths?: Record<string, string>;
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
fileLoader?: (path: string) => string;
|
||||
}
|
||||
|
||||
type LoadData =
|
||||
|
@ -285,6 +290,9 @@ function loadSlint(loadData: LoadData): Object {
|
|||
if (typeof options.libraryPaths !== "undefined") {
|
||||
compiler.libraryPaths = options.libraryPaths;
|
||||
}
|
||||
if (typeof options.fileLoader !== "undefined") {
|
||||
compiler.fileLoader = options.fileLoader;
|
||||
}
|
||||
}
|
||||
|
||||
const definitions =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue