docs: Update documentation for browser imports

fixes:  #679
This commit is contained in:
Justin Dalrymple 2020-04-06 16:28:34 +02:00 committed by GitHub
parent 67f20821c7
commit fed7d3854e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,14 +94,11 @@ const { Gitlab } = require('@gitbeaker/node');
**Browser**
```javascript
// ES6 (>=node 10.16.0 LTS)
import { Gitlab } from '@gitbeaker/browser'; // All Resources
import { Projects } from '@gitbeaker/browser'; // Just the Project Resource
//...etc
// ES5, assuming native or polyfilled Promise is available
const { Gitlab } = require('@gitbeaker/browser');
```html
<script src="node_modules/@gitbeaker/browser/dist/index.js" />
<script>
const { Gitlab } = gitbeaker;
...
```
Instantiate the library using a basic token created in your [Gitlab Profile](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html)