mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Create generated directory if necessary (fixes #2807)
This commit is contained in:
parent
86cff74999
commit
6b2f528d9f
1 changed files with 4 additions and 4 deletions
|
|
@ -50,10 +50,10 @@ function generateTestSamplesTask() {
|
||||||
const prefix =
|
const prefix =
|
||||||
'//This is a generated file via `npm run simpleserver`\ndefine([], function() { return';
|
'//This is a generated file via `npm run simpleserver`\ndefine([], function() { return';
|
||||||
const suffix = '; });';
|
const suffix = '; });';
|
||||||
fs.writeFileSync(
|
|
||||||
path.join(REPO_ROOT, 'test/manual/generated/all-samples.js'),
|
const destination = path.join(REPO_ROOT, 'test/manual/generated/all-samples.js');
|
||||||
prefix + JSON.stringify(samples, null, '\t') + suffix
|
ensureDir(path.dirname(destination));
|
||||||
);
|
fs.writeFileSync(destination, prefix + JSON.stringify(samples, null, '\t') + suffix);
|
||||||
|
|
||||||
/** @type {{ chapter: string; name: string; id: string; path: string; }[]} */
|
/** @type {{ chapter: string; name: string; id: string; path: string; }[]} */
|
||||||
const PLAY_SAMPLES = require(path.join(WEBSITE_GENERATED_PATH, 'all.js')).PLAY_SAMPLES;
|
const PLAY_SAMPLES = require(path.join(WEBSITE_GENERATED_PATH, 'all.js')).PLAY_SAMPLES;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue