Skip to content

Devel #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"presets": [
"es2015-node4"
"es2015"
],
"plugins": [
"syntax-async-functions",
"transform-async-to-generator",
"transform-object-rest-spread"
"transform-regenerator",
"transform-object-rest-spread",
"transform-async-to-generator"
]
}
9 changes: 5 additions & 4 deletions .eslintrc.json → .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"node": true,
"browser": true
},

"rules": {
"strict": 0
"strict": 0,
"import/no-extraneous-dependencies": 0,
"no-underscore-dangle": 0
},

"parserOptions": {
Expand All @@ -19,6 +21,5 @@
"sourceType": "module"
},

"extends": [ "eslint:recommended" ]

"extends": "airbnb"
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lib/
node_modules/
coverage/
npm-debug.log
yarn.lock
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Contributing to GraphQL Accounts
# Contributing to Accounts

**TL;DR; Tests, coverage, linting, changelog** (See Pull Request Requirements, below).

The GraphQL Accounts project was intended - since it's inception - to be a commmunity maintained project. We'd love to see you get involved (especially long time contributors from the Meteor community who we've worked with before).
The GraphQL Accounts project was intended - since it's inception - to be a community maintained project. We'd love to see you get involved (especially long time contributors from the Meteor community who we've worked with before).

## Getting started

1. Fork the project on Github (top right on the project page)
1. `git clone [email protected]:yourname/graphql-accounts`
1. `git clone [email protected]:yourname/accounts`
1. `git checkout devel`
1. `git checkout -b proposed-feature`

Most packages in the project are self contained with their own tests. But if you want to use your devel copy in a project, use `npm link`:

1. In your cloned directory: `sudo npm link`
1. In your app / project: `npm link graphql-accounts`
1. In your app / project: `npm start` followed by `npm link @accounts/accounts`

## Pull Requests

Expand Down
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
# graphql-accounts
# accounts

*Fullstack authentication and accounts-management for GraphQL*
*Fullstack authentication and accounts-management for GraphQL and REST*

[![npm](https://img.shields.io/npm/v/graphql-accounts.svg?maxAge=2592000)](https://www.npmjs.com/package/graphql-accounts) [![Circle CI](https://circleci.com/gh/graphql-accounts/graphql-accounts.svg?style=shield)](https://circleci.com/gh/graphql-accounts/graphql-accounts) [![Coverage Status](https://coveralls.io/repos/github/graphql-accounts/graphql-accounts/badge.svg?branch=master)](https://coveralls.io/github/graphql-accounts/graphql-accounts?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
[![npm](https://img.shields.io/npm/v/js-accounts.svg?maxAge=2592000)](https://www.npmjs.com/package/graphql-accounts) [![Circle CI](https://circleci.com/gh/graphql-accounts/graphql-accounts.svg?style=shield)](https://circleci.com/gh/graphql-accounts/graphql-accounts) [![Coverage Status](https://coveralls.io/repos/github/graphql-accounts/graphql-accounts/badge.svg?branch=master)](https://coveralls.io/github/graphql-accounts/graphql-accounts?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)

Copyright (c) 2016 by Gadi Cohen & Tim Mikeladze. Released under the MIT license.

## Getting Started

Install the core package.

```
npm i -S @accounts/accounts
```

Next install the package based on the the type of transport you are using. We support GraphQL and REST.

```
npm i -S @accounts/graphql
npm i -S @accounts/rest
```

Finally you'll need a data store adapter. We support the following data stores.

- [ ] Mongo
- [ ] MySQL

```
npm i -S @accounts/mongo
npm i -S @accounts/sql
```
8 changes: 3 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
machine:

machine:
node:
version: 4.2.6

version: "4.2.6"
test:
post:
- npm run coveralls
- "npm run coveralls"
40 changes: 27 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "graphql-accounts",
"name": "@accounts/accounts",
"version": "1.0.0",
"description": "Fullstack authentication and accounts-management for GraphQL",
"description": "Fullstack authentication and accounts-management",
"main": "lib/index.js",
"scripts": {
"compile": "babel -d lib/ src/",
"prepublish": "npm run compile",
"start": "webpack -p --config --progress --watch",
"compile": "webpack -p --config --progress",
"prepublish": "yarn run compile",
"test": "mocha --compilers js:babel-core/register \"src/**/*.spec.js\"",
"lint": "eslint src",
"coverage": "istanbul cover _mocha -- --compilers js:babel-core/register \"src/**/*.spec.js\" -R spec",
Expand All @@ -16,34 +17,47 @@
"url": "https://github.com/graphql-accounts/graphql-accounts"
},
"keywords": [
"rest",
"graphql",
"passport",
"grant",
"auth",
"autentication",
"authentication",
"accounts",
"users"
],
"author": "Gadi Cohen & Tim Mikeladze",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-core": "^6.17.0",
"babel-eslint": "^7.0.0",
"babel-cli": "^6.18.0",
"babel-core": "^6.18.0",
"babel-eslint": "^7.1.0",
"babel-loader": "^6.2.7",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-async-to-generator": "^6.16.0",
"babel-plugin-transform-object-rest-spread": "^6.16.0",
"babel-plugin-transform-regenerator": "^6.16.1",
"babel-preset-es2015": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2015-node4": "^2.1.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"coveralls": "^2.11.14",
"eslint": "^3.7.1",
"eslint-plugin-react": "^6.3.0",
"eslint": "^3.9.0",
"eslint-config-airbnb": "^12.0.0",
"eslint-config-airbnb-base": "^9.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^3.1.0",
"lodash": "^4.16.4",
"mocha": "^3.1.2",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0"
"sinon-chai": "^2.8.0",
"webpack": "^1.13.3",
"webpack-node-externals": "^1.5.4",
"yarn": "^0.16.1"
},
"dependencies": {
"redux": "^3.6.0"
}
}
19 changes: 19 additions & 0 deletions src/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const packages = ['', '@accounts/rest'];
const client = packages.reduce((prev, curr) => {
let requiredPackage = prev;
try {
if (!prev && require.resolve(curr)) {
//eslint-disable-next-line
requiredPackage = require(curr).default;
}
} catch (exception) { // eslint-disable-line no-empty

}
return requiredPackage;
}, false);

if (!client) {
throw new Error('Please install on a client adapter for accounts.');
}

export default client;
11 changes: 0 additions & 11 deletions src/client/.babelrc

This file was deleted.

Loading