From 647e7e1ffa3a2cef53f516503e2ee16dc4ba1cdd Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Mon, 5 Sep 2016 12:26:04 -0700 Subject: [PATCH] * Initial setup --- .gitignore | 6 +++ .npmignore | 6 +++ package.json | 54 +++++++++++++++++++ tsconfig.json | 19 +++++++ tslint.json | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ typings.json | 14 +++++ 6 files changed, 242 insertions(+) create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 package.json create mode 100644 tsconfig.json create mode 100644 tslint.json create mode 100644 typings.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..236654f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.idea +node_modules +dist +coverage +typings +npm-debug.log diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..14895afc --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +src +node_modules +typings +tsconfig.json +typings.json +tslint.json diff --git a/package.json b/package.json new file mode 100644 index 00000000..18f00b9c --- /dev/null +++ b/package.json @@ -0,0 +1,54 @@ +{ + "name": "graphql-redis-subscriptions", + "version": "1.0.0", + "description": "A graphql-subscriptions PubSub Engine using redis", + "main": "dist/index.js", + "repository": { + "type": "git", + "url": "https://github.com/davidyaha/graphql-redis-subscriptions.git" + }, + "keywords": [ + "graphql", + "redis", + "apollo", + "subscriptions" + ], + "author": "David Yahalomi", + "license": "MIT", + "bugs": { + "url": "https://github.com/davidyaha/graphql-redis-subscriptions/issues" + }, + "homepage": "https://github.com/davidyaha/graphql-redis-subscriptions", + "scripts": { + "compile": "tsc", + "typings": "typings install", + "pretest": "npm run compile", + "test": "npm run testonly --", + "posttest": "npm run lint", + "lint": "tslint ./src/**/*.ts", + "watch": "tsc -w", + "testonly": "mocha --reporter spec --full-trace ./dist/test/*.js ", + "coverage": "node ./node_modules/istanbul/lib/cli.js cover _mocha -- --full-trace ./dist/test/tests.js", + "postcoverage": "remap-istanbul --input coverage/coverage.raw.json --type lcovonly --output coverage/lcov.info" + }, + "dependencies": { + "async": "^2.0.1", + "graphql-subscriptions": "../graphql-subscriptions", + "redis": "^2.6.2" + }, + "devDependencies": { + "chai": "^3.5.0", + "chai-as-promised": "^5.3.0", + "graphql": "^0.6.2", + "istanbul": "1.0.0-alpha.2", + "mocha": "^3.0.0", + "remap-istanbul": "^0.6.4", + "tslint": "^3.13.0", + "typescript": "^2.0.0", + "typings": "^1.3.2" + }, + "typings": "dist/index.d.ts", + "typescript": { + "definition": "dist/index.d.ts" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..c2713aa8 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "noImplicitAny": false, + "rootDir": "./src", + "outDir": "./dist", + "allowSyntheticDefaultImports": true, + "pretty": true, + "removeComments": true, + "declaration": true + }, + "exclude": [ + "node_modules", + "dist" + ] +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 00000000..75d938be --- /dev/null +++ b/tslint.json @@ -0,0 +1,143 @@ +{ + "rules": { + "align": [ + false, + "parameters", + "arguments", + "statements" + ], + "ban": false, + "class-name": true, + "curly": true, + "eofline": true, + "forin": true, + "indent": [ + true, + "spaces" + ], + "interface-name": false, + "jsdoc-format": true, + "label-position": true, + "label-undefined": true, + "max-line-length": [ + true, + 140 + ], + "member-access": true, + "member-ordering": [ + true, + "public-before-private", + "static-before-instance", + "variables-before-functions" + ], + "no-any": false, + "no-arg": true, + "no-bitwise": true, + "no-conditional-assignment": true, + "no-consecutive-blank-lines": false, + "no-console": [ + true, + "log", + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-constructor-vars": true, + "no-debugger": true, + "no-duplicate-key": true, + "no-duplicate-variable": true, + "no-empty": true, + "no-eval": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-null-keyword": false, + "no-require-imports": false, + "no-shadowed-variable": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unreachable": true, + "no-unused-expression": true, + "no-unused-variable": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "no-var-requires": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-finally", + "check-whitespace" + ], + "quotemark": [ + true, + "single", + "avoid-escape" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "switch-default": true, + "trailing-comma": [ + true, + { + "multiline": "always", + "singleline": "never" + } + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef": [ + false, + "call-signature", + "parameter", + "arrow-parameter", + "property-declaration", + "variable-declaration", + "member-variable-declaration" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + }, + { + "call-signature": "space", + "index-signature": "space", + "parameter": "space", + "property-declaration": "space", + "variable-declaration": "space" + } + ], + "use-strict": [ + false + ], + "variable-name": [ + true, + "check-format", + "allow-leading-underscore", + "ban-keywords", + "allow-pascal-case" + ], + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ] + } +} diff --git a/typings.json b/typings.json new file mode 100644 index 00000000..64aa7a5a --- /dev/null +++ b/typings.json @@ -0,0 +1,14 @@ +{ + "globalDependencies": { + "es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504", + "graphql": "github:nitintutlani/typed-graphql", + "mocha": "registry:dt/mocha#2.2.5+20160720003353", + "node": "registry:dt/node#6.0.0+20160818175514" + }, + "dependencies": { + "async": "registry:npm/async#2.0.1+20160815105832", + "chai": "registry:npm/chai#3.5.0+20160723033700", + "chai-as-promised": "registry:npm/chai-as-promised#5.1.0+20160310030142", + "redis": "registry:npm/redis#2.6.0+20160901110043" + } +}