Skip to content
/ drone-js Public

Javascript client for the Drone API

License

Notifications You must be signed in to change notification settings

drone/drone-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example usage:

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:

window.DRONE_SERVER = "https://drone.company.com";
window.DRONE_TOKEN = "...";

const client = DroneClient.fromWindow();

Configure the client from the environment:

process.env.DRONE_SERVER = "https://drone.company.com";
process.env.DRONE_TOKEN = "...";

const client = DroneClient.fromEnviron();

Package commands:

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

About

Javascript client for the Drone API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published