From 01f247b336c44ceb107f4fd46b1a6cda31253b45 Mon Sep 17 00:00:00 2001 From: cehan-Chloe Date: Thu, 21 Mar 2024 14:20:21 -0400 Subject: [PATCH] swapi typescript dependency --- examples/swapi/Makefile | 5 +++++ examples/swapi/package.json | 8 ++++++-- examples/swapi/tsconfig.json | 9 +++++++++ examples/swapi/yarn.lock | 5 +++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 examples/swapi/tsconfig.json diff --git a/examples/swapi/Makefile b/examples/swapi/Makefile index 6a0d020..2896b10 100644 --- a/examples/swapi/Makefile +++ b/examples/swapi/Makefile @@ -5,9 +5,14 @@ node_modules: package.json swapi-loaders.js: node ../../lib/index.js --config swapi.dataloader-config.yaml --output swapi-loaders.js +.PHONY: swapi-loaders-ts.ts +swapi-loaders-ts.ts: + node ../../lib/index.js --config swapi.dataloader-config-ts.yaml --output swapi-loaders-ts.ts + flow-typed: node_modules yarn flow-typed install .PHONY: build build: node_modules yarn babel *.js -d build + yarn build diff --git a/examples/swapi/package.json b/examples/swapi/package.json index 15dedda..025a84c 100644 --- a/examples/swapi/package.json +++ b/examples/swapi/package.json @@ -4,7 +4,8 @@ "@babel/node": "^7.7.0", "@babel/preset-flow": "^7.0.0", "flow-bin": "0.123.0", - "flow-typed": "^2.6.2" + "flow-typed": "^2.6.2", + "typescript": "^5.4.3" }, "dependencies": { "dataloader": "^2.0.0", @@ -13,5 +14,8 @@ }, "engines": { "node": ">=10" + }, + "scripts": { + "build": "tsc" } -} +} \ No newline at end of file diff --git a/examples/swapi/tsconfig.json b/examples/swapi/tsconfig.json new file mode 100644 index 0000000..6aba306 --- /dev/null +++ b/examples/swapi/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "outDir": "./build", + "rootDir": "./", + "strict": true + } +} \ No newline at end of file diff --git a/examples/swapi/yarn.lock b/examples/swapi/yarn.lock index 333bee5..41281df 100644 --- a/examples/swapi/yarn.lock +++ b/examples/swapi/yarn.lock @@ -2190,6 +2190,11 @@ typescript@^3.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d" integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg== +typescript@^5.4.3: + version "5.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" + integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"