Skip to content

Commit

Permalink
fix: Fix typings and bin directory creation
Browse files Browse the repository at this point in the history
Fixes #184
  • Loading branch information
maticzav committed Nov 22, 2018
1 parent 194571a commit dba4098
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
},
"devDependencies": {
"@types/graphql": "14.0.3",
"@types/mkdirp": "^0.5.2",
"@types/node": "10.12.9",
"@types/yargs": "^12.0.1",
"apollo-link": "1.2.3",
"ava": "1.0.0-rc.2",
"graphql": "14.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ async function run(argv) {
: new Generator(args)
const code = generatorInstance.render()

mkdirp(path.dirname(outputBinding))
mkdirp.sync(path.dirname(outputBinding))
fs.writeFileSync(outputBinding, code)

if (outputTypedefs) {
mkdirp(path.dirname(outputTypedefs))
mkdirp.sync(path.dirname(outputTypedefs))
fs.writeFileSync(outputTypedefs, printSchema(schema.schema))
}

Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,28 @@
resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-14.0.3.tgz#389e2e5b83ecdb376d9f98fae2094297bc112c1c"
integrity sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==

"@types/mkdirp@^0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f"
integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==
dependencies:
"@types/node" "*"

"@types/node@*":
version "10.12.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.10.tgz#4fa76e6598b7de3f0cb6ec3abacc4f59e5b3a2ce"
integrity sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w==

"@types/node@10.12.9":
version "10.12.9"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.9.tgz#a07bfa74331471e1dc22a47eb72026843f7b95c8"
integrity sha512-eajkMXG812/w3w4a1OcBlaTwsFPO5F7fJ/amy+tieQxEMWBlbV1JGSjkFM+zkHNf81Cad+dfIRA+IBkvmvdAeA==

"@types/yargs@^12.0.1":
version "12.0.1"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.1.tgz#c5ce4ad64499010ae4dc2acd9b14d49749a44233"
integrity sha512-UVjo2oH79aRNcsDlFlnQ/iJ67Jd7j6uSg7jUJP/RZ/nUjAh5ElmnwlD5K/6eGgETJUgCHkiWn91B8JjXQ6ubAw==

JSONStream@^1.0.4:
version "1.3.3"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.3.tgz#27b4b8fbbfeab4e71bcf551e7f27be8d952239bf"
Expand Down

0 comments on commit dba4098

Please sign in to comment.