1.0.1 • Published 3 years ago
bright-sky-api v1.0.1
This project was created using themetalfleece/nodejs-typescript-template
A Node.js API client for BrightSkyAPI
This library provides a Node.js API interface to BrightSkyAPI.
Install
- Install node.js.
- Clone this repository, and using a terminal navigate to its directory.
- Run
npm cito install the dependencies.
Build & Run
- Run
npm buildto build the files. - Run
npm testto test the library.
Usage
import BrightSkyAPI from 'bright-sky-api'
import fetch from 'node-fetch'
const api = BrightSkyAPI({ fetch })
const weather = await api.currentWeather({ lat: '50.51', lon: '13.42' })Developing
Visual Studio Code
- Installing the Eslint (
dbaeumer.vscode-eslint) and Prettier - Code formatter (esbenp.prettier-vscode) extensions is recommended.
Linting & Formatting
- Run
npm lintto lint the code. - Run
npm formatto format the code.
Testing
- Run
npm testto execute all tests. - Run
npm run test:watchto run tests in watch (loop) mode. - Run
npm run test:coverageto see the tests coverage report.