Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
chore: refactor yarn scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Feb 7, 2019
1 parent 19f5bce commit 32eb724
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions packages/graphqlgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
"gg": "dist/index.js"
},
"scripts": {
"clean": "rm -rf ./src/tests/**/tmp && rm -rf ./src/tests/**/generated",
"prepublishOnly": "rm -rf example/node_modules && yarn test && yarn build",
"clean": "rm -rf ./src/tests/**/tmp && rm -rf ./src/tests/**/generated && rm -rf ./dist",
"prepublishOnly": "rm -rf example/node_modules && yarn checks && yarn test && yarn build",
"postpublish": "yarn clean",
"benchmarks": "ts-node benchmarks",
"build": "yarn clean && yarn lint && tsc --declaration",
"build": "yarn clean && tsc --declaration",
"watch": "tsc --watch",
"lint": "tslint --project tsconfig.json {src,test}/**/*.ts",
"test": "jest",
"check:types": "yarn tsc --noEmit",
"check:lint": "tslint --project tsconfig.json {src,test}/**/*.ts",
"checks": "yarn check:types && yarn check:lint",
"test": "jest",
"test:watch": "jest --watch",
"test:ci": "yarn lint && jest --maxWorkers 4",
"test:ci": "yarn check:lint && jest --maxWorkers 4",
"gen": "ts-node --files src/index.ts"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/graphqlgen/src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export function parseSchema(schemaPath: string): GraphQLTypes {
// We can assume absolute path is cwd prefixed because
// gg currently only works when run in a directory with the
// graphqlgen manifest.
const absoluteFilePath = Path.join(process.cwd(), filePath)
const absoluteFilePath =
filePath[0] == '/' ? filePath : Path.join(process.cwd(), filePath)

if (!fs.existsSync(absoluteFilePath)) {
console.error(
Expand Down

0 comments on commit 32eb724

Please sign in to comment.