Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/zuludao/izulu
- Owner: zuludao
- License: mit
- Created: 2022-07-25T11:32:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T19:49:08.000Z (over 2 years ago)
- Last Synced: 2024-11-01T15:47:51.592Z (2 months ago)
- Topics: geolocation, location, npm-package, package, react-module, weather
- Language: JavaScript
- Homepage: https://zuludao.github.io/izulu
- Size: 429 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 InstallationNB 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 BuildAll 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/)