Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zuludao/izulu

A weather widget component, that can be installed using npm and used with your webapp.
https://github.com/zuludao/izulu

geolocation location npm-package package react-module weather

Last synced: about 2 months ago
JSON representation

A weather widget component, that can be installed using npm and used with your webapp.

Awesome Lists containing this project

README

        

# Izulu (Weather)

Izulu meaning weather / heaven in the african language of ZULU.
A weather widget to display weather conditions for any city in the world.

### Prerequisites

[Open Weather API](https://openweathermap.org/)
[React](https://reactjs.org)
[Node](https://nodejs.org)

### Default Configuration
```typescript
apiKey: "YOUR OPEN WEATHER API KEY",
parentClassName: String default "weather",
autoRefresh: Boolean default true,
isBackroundImageEnabled: Boolean default true,
backgroundColor: Boolean default false,
isUserConfig: Boolean default true, //Experimental
defualtCity: String default "New York",
refreshInterval: Number default 30000 /ms,
```

## Simple Installation

Use the cdn to add weather.vanilla.js and style.css.

```bash
https://gitcdn.link/cdn/zuludao/izulu/master/weather.vanilla.js
https://gitcdn.link/cdn/zuludao/izulu/master/style.css
```

### Exmaple

```xml



Weather Today




setTimeout(function() {<!-- setTimeout is Required to ensure all JS loads -->
Weather.init({
isUserConfig : true,
apiKey: "YOUR OPEN WEATHER API KEY", <!-- apiKey is Required-->
...
});
})

```
##
## React Installation

NB Ensure your react app is up and running.

you can create a new React app with the command below.

```
npx create-react-app YOUR-APP-NAME
```

Use the __npm__ or __yarn__ to install.

```bash
npm i izulu-react-package --save-dev
```

### Usage

```javascript
import IzuluReact from "izulu-react-package";

function App() {
return (



isBackroundImageEnabled={true}
isUserConfig={false}
/>

);
}

export default App;
```

### Run Tests

All tests are located inside __test__ folder using Mocha & Chai or Jest.

```bash
npm test
```
### Run Build

All tests are located inside __test__ folder using Mocha & Chai or Jest.

```bash
npm run build-lib
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[GPLv3 see license file or, Click here](https://choosealicense.com/licenses/agpl-3.0/)