mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
8d2bbe5b0d
no-issue * Upgrade to latest content api * Removed unused closeAuth * Removed auto close of popup and wait for event * Added globals to top of file |
||
---|---|---|
.. | ||
test | ||
.eslintrc.js | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md |
Members Layer 2
Install
npm install @tryghost/members-layer2 --save
or
yarn add @tryghost/members-layer2
Usage
<script src="members-layer2.lib.js"></script>
<script>
// Sets up binding the elements to the login/logout state
Members.init().then(function ({getToken}) {
// can getToken etc...
});
</script>
Or with a module loader
const Members = require('@tryghost/members-layer2');
// Sets up binding the elements to the login/logout state
Members.init().then(function ({getToken}) {
// can get token etc...
});
fetch('/ghost/api/v2/content/posts/<id>', { credentials: 'same-origin' });
Develop
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests
Copyright & License
Copyright (c) 2018-2019 Ghost Foundation - Released under the MIT license.