Skip to content

N1cE-me/weather-widget

Repository files navigation

Weather Widget

main settings

Usage

<weather-widget />
<script type="text/javascript" src="/path/to/weather-widget.js"></script>

Features

  • Get weather data from Current weather data
  • Implement Geocoding API for prevent deprecation options
  • One time settings page
    • Add city
    • Remove city
    • Order city
  • Save data to localStorage
  • On initial opening, request the current user’s location and display the weather in their city.
  • FSD
  • ESLint
  • Prettier
  • Vue router
  • Vueuse
  • Pinia

Dew point not implemented (available only on One Call API 3.0)

Develop

  1. Clone & install deps
bun i
  1. Create .env file based on example .env.example

  2. Run dev script

bun dev
  1. Go to localhost:5173

Build

You can build as regular vue app or Web Component

bun run build:
bun run build:wc

In dist folder you will get single js file.

For chunks splitting need change to false inlineDynamicImports option in vite.config.* files