Skip to content

Commit 9ce91a4

Browse files
committed
build(ts): added basic ts compiler and build process
1 parent 69240f0 commit 9ce91a4

File tree

6 files changed

+121
-2
lines changed

6 files changed

+121
-2
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# GraphQL Code Generator
2+
3+
## Overview
4+
5+
## Installation
6+
7+
## Usage
8+
9+
## Contributing
10+
11+
## License
12+
13+
MIT

package.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"description": "GraphQL types and code generator based on schema",
55
"main": "dist/index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"clean": "rimraf ./dist",
8+
"precompile": "npm run clean",
9+
"compile": "tsc",
10+
"start": "npm run compile",
11+
"test": ""
812
},
913
"repository": {
1014
"type": "git",
@@ -28,5 +32,9 @@
2832
"bugs": {
2933
"url": "https://github.com/dotansimha/graphql-codegen/issues"
3034
},
31-
"homepage": "https://github.com/dotansimha/graphql-codegen#readme"
35+
"homepage": "https://github.com/dotansimha/graphql-codegen#readme",
36+
"devDependencies": {
37+
"rimraf": "^2.5.4",
38+
"typescript": "^2.0.10"
39+
}
3240
}

src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("test");

tsconfig.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"experimentalDecorators": true,
4+
"module": "es2015",
5+
"target": "es5",
6+
"lib": ["es6", "dom"],
7+
"noImplicitAny": false,
8+
"suppressImplicitAnyIndexErrors": true,
9+
"moduleResolution": "node",
10+
"emitDecoratorMetadata": true,
11+
"sourceMap": true,
12+
"declaration": true,
13+
"outDir": "./dist",
14+
"rootDir": "./src"
15+
},
16+
"files": [
17+
"typings.d.ts",
18+
"src/index.ts"
19+
],
20+
"exclude": [
21+
"node_modules"
22+
]
23+
}

typings.d.ts

Whitespace-only changes.

yarn.lock

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
balanced-match@^0.4.1:
6+
version "0.4.2"
7+
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
8+
9+
brace-expansion@^1.0.0:
10+
version "1.1.6"
11+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
12+
dependencies:
13+
balanced-match "^0.4.1"
14+
concat-map "0.0.1"
15+
16+
17+
version "0.0.1"
18+
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
19+
20+
fs.realpath@^1.0.0:
21+
version "1.0.0"
22+
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
23+
24+
glob@^7.0.5:
25+
version "7.1.1"
26+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
27+
dependencies:
28+
fs.realpath "^1.0.0"
29+
inflight "^1.0.4"
30+
inherits "2"
31+
minimatch "^3.0.2"
32+
once "^1.3.0"
33+
path-is-absolute "^1.0.0"
34+
35+
inflight@^1.0.4:
36+
version "1.0.6"
37+
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
38+
dependencies:
39+
once "^1.3.0"
40+
wrappy "1"
41+
42+
inherits@2:
43+
version "2.0.3"
44+
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
45+
46+
minimatch@^3.0.2:
47+
version "3.0.3"
48+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
49+
dependencies:
50+
brace-expansion "^1.0.0"
51+
52+
once@^1.3.0:
53+
version "1.4.0"
54+
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
55+
dependencies:
56+
wrappy "1"
57+
58+
path-is-absolute@^1.0.0:
59+
version "1.0.1"
60+
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
61+
62+
rimraf@^2.5.4:
63+
version "2.5.4"
64+
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
65+
dependencies:
66+
glob "^7.0.5"
67+
68+
typescript@^2.0.10:
69+
version "2.1.1"
70+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.1.1.tgz#41c2b64472f529331b2055c0424862b44ce58d42"
71+
72+
wrappy@1:
73+
version "1.0.2"
74+
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"

0 commit comments

Comments
 (0)