fix(core): fix(core): fix(core): ensure dir when exporting dep-graph to json (#4893)
This commit is contained in:
parent
9d0a4c8542
commit
6dc7de4cb5
@ -2,7 +2,8 @@ import { exists, readFile, readFileSync, statSync, writeFileSync } from 'fs';
|
||||
import { copySync } from 'fs-extra';
|
||||
import * as http from 'http';
|
||||
import * as opn from 'opn';
|
||||
import { join, normalize, parse } from 'path';
|
||||
import { join, normalize, parse, dirname } from 'path';
|
||||
import { ensureDirSync } from 'fs-extra';
|
||||
import * as url from 'url';
|
||||
import {
|
||||
createProjectGraph,
|
||||
@ -238,6 +239,8 @@ export function generateGraph(
|
||||
} else if (ext === 'json') {
|
||||
filename = `${folder}/${filename}`;
|
||||
|
||||
ensureDirSync(dirname(filename));
|
||||
|
||||
writeFileSync(
|
||||
filename,
|
||||
JSON.stringify(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user