File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 2626 },
2727 "homepage" : " https://github.com/supergraphql/graphql-cli-prepare#readme" ,
2828 "devDependencies" : {
29+ "@types/fs-extra" : " 5.0.0" ,
2930 "@types/inquirer" : " 0.0.36" ,
3031 "@types/node" : " 8.5.2" ,
3132 "@types/yargs" : " 10.0.0" ,
4041 },
4142 "dependencies" : {
4243 "chalk" : " 2.3.0" ,
44+ "fs-extra" : " 5.0.0" ,
4345 "graphql-import" : " 0.1.9" ,
4446 "graphql-static-binding" : " 0.2.1" ,
4547 "lodash" : " 4.17.4"
Original file line number Diff line number Diff line change 11import chalk from 'chalk'
2- import * as fs from 'fs'
2+ import * as fs from 'fs-extra '
33import { Context } from 'graphql-cli'
44import { GraphQLProjectConfig } from 'graphql-config'
55import { importSchema } from 'graphql-import'
@@ -223,9 +223,7 @@ export class Prepare {
223223 )
224224 }
225225
226- if ( ! fs . existsSync ( path . dirname ( outputPath ) ) ) {
227- throw new Error ( `Output path '${ path . dirname ( outputPath ) } ' does not exist.` )
228- }
226+ fs . ensureDirSync ( path . dirname ( outputPath ) )
229227 return outputPath
230228 }
231229}
Original file line number Diff line number Diff line change 7373 version "0.6.0"
7474 resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.6.0.tgz#383f456b26bc96c7889f0332079f4358b16c58dc"
7575
76+ " @types/fs-extra@^5.0.0 " :
77+ version "5.0.0"
78+ resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.0.tgz#d3e225b35eb5c6d3a5a782c28219df365c781413"
79+ dependencies :
80+ " @types/node" " *"
81+
7682" @types/graphql@0.11.7 " :
7783 version "0.11.7"
7884 resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.11.7.tgz#da39a2f7c74e793e32e2bb7b3b68da1691532dd5"
You can’t perform that action at this time.
0 commit comments