Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drone/drone-js
Javascript client for the Drone API
https://github.com/drone/drone-js
Last synced: 3 months ago
JSON representation
Javascript client for the Drone API
- Host: GitHub
- URL: https://github.com/drone/drone-js
- Owner: drone
- License: other
- Created: 2017-08-29T18:45:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-15T02:01:39.000Z (over 6 years ago)
- Last Synced: 2024-07-10T06:39:30.918Z (4 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 23
- Watchers: 10
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Example usage:
```js
import DroneClient from 'drone-js';// drone server and credentials
const server = "https://drone.company.com";
const token = "...";// creates the drone client
const client = new DroneClient(server, token);// fetches the repository list
client.getRepoList().then((repos) => {});
```Configure the client from the window:
```js
window.DRONE_SERVER = "https://drone.company.com";
window.DRONE_TOKEN = "...";const client = DroneClient.fromWindow();
```Configure the client from the environment:
```js
process.env.DRONE_SERVER = "https://drone.company.com";
process.env.DRONE_TOKEN = "...";const client = DroneClient.fromEnviron();
```Package commands:
```sh
npm run lint # lint the codebase
npm run format # format the codebase
npm run test # runs the unit tests
npm run build # generate the bundle
```