Skip to content

Commit

Permalink
project init
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankYang0529 committed Nov 20, 2018
0 parents commit c70eca2
Show file tree
Hide file tree
Showing 7 changed files with 1,725 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Dependency directories
node_modules/

lib

### macOS ###
# General
.DS_Store
37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "graphql-rbac",
"version": "1.0.0",
"description": "GraphQL RBAC middleware",
"main": "index.js",
"scripts": {
"clean": "rimraf lib",
"lint": "tslint --force --format verbose \"src/**/*.ts\" \"test/*\"",
"build": "npm run clean && npm run lint && echo Using TypeScript && tsc --version && tsc -p ./tsconfig.release.json --pretty",
"test": "mocha --timeout 100000 --compilers ts:ts-node/register --recursive \"test/**/*.spec.ts\"",
"coverage": "nyc npm run test"
},
"keywords": [
"rbac",
"graphql"
],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/graphql": "^14.0.3",
"@types/mocha": "^5.2.5",
"@types/node": "^10.12.9",
"chai": "^4.2.0",
"graphql": "^14.0.2",
"graphql-middleware": "^2.0.2",
"graphql-tools": "^4.0.3",
"mocha": "^5.2.0",
"nyc": "^13.1.0",
"ts-node": "^7.0.1",
"typescript": "^3.1.6"
},
"dependencies": {
"graphql-shield": "^4.1.0",
"lodash": "^4.17.11"
}
}
4 changes: 4 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
bracketSpacing: false,
singleQuote: true
};
15 changes: 15 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es6", "dom"], /* Specify library files to be included in the compilation. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
"removeComments": true, /* Do not emit comments to output. */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
},
"include": ["src/**/*.ts", "docs/**/*.ts", "test/*"],
"exclude": ["./node_modules"]
}
9 changes: 9 additions & 0 deletions tsconfig.release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": ["src/**/*.ts"],
"exclude": ["test/**/*.ts"]
}
32 changes: 32 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"exclude": ["node_modules", "lib"],
"extends": ["tslint:latest"],
"rules": {
"ordered-imports": [
true,
{
"import-sources-order": "any",
"named-imports-order": "any"
}
],
"semicolon": [true, "always", "strict-bound-class-methods"],
"quotemark": [true, "single"],
"no-implicit-dependencies": [true, "dev"],
"no-submodule-imports": false,
"object-literal-sort-keys": false,
"trailing-comma": [
true,
{
"multiline": {
"objects": "always",
"arrays": "always",
"functions": "always",
"typeLiterals": "always"
},
"esSpecCompliant": true
}
],
"arrow-parens": [true, "ban-single-arg-parens"],
"interface-name": [true, "never-prefix"]
}
}
Loading

0 comments on commit c70eca2

Please sign in to comment.