mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Makes vs/nls.availableLanguages work for AMD again.
Some checks are pending
CI / CI (push) Waiting to run
Some checks are pending
CI / CI (push) Waiting to run
This commit is contained in:
parent
f6187471ca
commit
2713684d6c
5 changed files with 97 additions and 19 deletions
|
|
@ -268,16 +268,18 @@ export function readFiles(
|
|||
});
|
||||
|
||||
const base = options.base;
|
||||
return files.map((file) => readFile(file, base));
|
||||
}
|
||||
|
||||
export function readFile(file: string, base: string = '') {
|
||||
const baseLength = base === '' ? 0 : base.endsWith('/') ? base.length : base.length + 1;
|
||||
return files.map((file) => {
|
||||
const fullPath = path.join(REPO_ROOT, file);
|
||||
const contents = fs.readFileSync(fullPath);
|
||||
const relativePath = file.substring(baseLength);
|
||||
return {
|
||||
path: relativePath,
|
||||
contents
|
||||
};
|
||||
});
|
||||
const fullPath = path.join(REPO_ROOT, file);
|
||||
const contents = fs.readFileSync(fullPath);
|
||||
const relativePath = file.substring(baseLength);
|
||||
return {
|
||||
path: relativePath,
|
||||
contents
|
||||
};
|
||||
}
|
||||
|
||||
export function writeFiles(files: IFile[], dest: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue