Skip to content

Commit 0694969

Browse files
committed
Initial commit
0 parents  commit 0694969

File tree

8 files changed

+168
-0
lines changed

8 files changed

+168
-0
lines changed

.circleci/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
- image: circleci/node:latest
11+
12+
# Specify service dependencies here if necessary
13+
# CircleCI maintains a library of pre-built images
14+
# documented at https://circleci.com/docs/2.0/circleci-images/
15+
# - image: circleci/mongo:3.4.4
16+
17+
working_directory: ~/repo
18+
19+
steps:
20+
- checkout
21+
22+
# Download and cache dependencies
23+
- restore_cache:
24+
keys:
25+
- v1-dependencies-{{ checksum "package.json" }}
26+
# fallback to using the latest cache if no exact match is found
27+
- v1-dependencies-
28+
29+
- run: yarn install
30+
31+
- save_cache:
32+
paths:
33+
- node_modules
34+
key: v1-dependencies-{{ checksum "package.json" }}
35+
36+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
package-lock.json
4+
yarn.lock

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src
2+
.circleci

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 SuperGraph
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# graphql-cli-gramps ![npm](https://img.shields.io/npm/v/graphql-cli-gramps.svg?style=for-the-badge)
2+
![CircleCI](https://img.shields.io/circleci/project/github/supergraphql/graphql-cli-gramps.svg?style=for-the-badge)![David](https://img.shields.io/david/supergraphql/graphql-cli-gramps.svg?style=for-the-badge)
3+
Plugin for [`graphql-cli`](https://github.com/graphql-cli/graphql-cli). Adds the [`gramps-cli`](https://github.com/gramps-graphql/gramps-cli) to `graphql-cli`.
4+
5+
## Installation
6+
7+
Install `graphql-cli-gramps` either globally (recommended) or locally using your favorite package manager:
8+
```shell
9+
$ yarn [global] add graphql-cli-gramps
10+
$ npm install graphql-cli-gramps [--global]
11+
```
12+
13+
## Usage
14+
```
15+
graphql gramps dev
16+
17+
run a GraphQL gateway for local development
18+
19+
Choose data source(s) for local development:
20+
--data-source, --data-sources, -d path to one or more data sources [array]
21+
22+
Choose a GraphQL gateway to run the data sources:
23+
--gateway, -g path to a GraphQL gateway start script [string]
24+
25+
Choose real or mock data:
26+
--live, -l run GraphQL with live data
27+
--mock, -m run GraphQL offline with mock data
28+
29+
Turn Babel on or off:
30+
--no-transpile
31+
32+
Options:
33+
--dotenv Path to .env file [string]
34+
-p, --project Project name [string]
35+
--transpile don’t transpile data sources (point to a build dir)
36+
[boolean] [default: true]
37+
-h, --help Show help [boolean]
38+
-v, --version Show version number [boolean]
39+
```
40+
<hr>
41+
<p align="center">
42+
<img src="https://img.shields.io/badge/built-with_love-blue.svg?style=for-the-badge"/><a href="https://github.com/kbrandwijk" target="-_blank"><img src="https://img.shields.io/badge/by-kim_brandwijk-blue.svg?style=for-the-badge"/></a>
43+
</p>

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "graphql-cli-gramps",
3+
"version": "0.1.0",
4+
"description": "Link library to add gramps-cli to graphql-cli",
5+
"main": "dist/index.js",
6+
"typings": "dist/index.d.ts",
7+
"scripts": {
8+
"prepublish": "npm run build",
9+
"build": "tsc -d",
10+
"pretest": "npm run build",
11+
"lint": "tslint src/**/*.ts"
12+
},
13+
"author": "Kim Brandwijk <kim.brandwijk@gmail.com>",
14+
"license": "MIT",
15+
"dependencies": {
16+
"@gramps/cli": "^1.0.0-beta.4",
17+
"@gramps/gramps": "^1.1.0",
18+
"reify": "^0.13.5"
19+
},
20+
"devDependencies": {
21+
"@types/node": "^8.5.1",
22+
"tslint": "^5.8.0",
23+
"typescript": "^2.6.2"
24+
}
25+
}

src/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require('reify')
2+
3+
import * as dev from '@gramps/cli/bin/dev'
4+
5+
export const command = 'gramps'
6+
7+
export const describe = 'gramps'
8+
9+
export const builder = args => args
10+
.command({
11+
command: dev.command,
12+
description: dev.description,
13+
builder: dev.builder,
14+
handler: dev.handler
15+
})

tsconfig.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"preserveConstEnums": true,
4+
"strictNullChecks": true,
5+
"sourceMap": true,
6+
"target": "es5",
7+
"outDir": "dist",
8+
"moduleResolution": "node",
9+
"lib": [
10+
"es2017",
11+
"esnext.asynciterable",
12+
"dom"
13+
]
14+
},
15+
"exclude": [
16+
"node_modules",
17+
"dist"
18+
],
19+
"include": [
20+
"./src/**/*.ts"
21+
]
22+
}

0 commit comments

Comments
 (0)