Skip to content

Commit

Permalink
slight styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivo Lukacovic committed Oct 25, 2018
1 parent 1e41360 commit c224572
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
![](https://www.windy.com/img/logo201802/logo-full-windycom-gray-v3.svg)
<p align="center"><img src="https://www.windy.com/img/logo201802/logo-full-windycom-gray-v3.svg"></p>

This repository acts as an documentation, playground and **boilerplate** for your own **Windy plugin**.

Therefore always **fork this repository** before editing it.

Plugins are written in Javascript and published as npm package, so you already know how to create them

# Getting started
### Getting started
Fork this repository and then clone it
```sh
git clone https://github.com/yourUsername/windy-plugins
Expand All @@ -20,9 +20,9 @@ Then open your browser at [www.windy.com/dev](https://www.windy.com/dev) to test

If it fails, make sure that your plugin is correctly built and accessible with your browser at [https://localhost:9999/plugin.js](https://localhost:9999/plugin.js).

![](https://www.windy.com/img/windy-plugins/tutorial2.gif)
<p align="center"><img src="https://www.windy.com/img/windy-plugins/tutorial2.gif" width="80%"></p>

# Tutorials
### Tutorials
- [Hello World](01-hello-world)
- [Left side window](02-window-on-left-side)
- [Right side window](03-window-on-right-side)
Expand All @@ -32,17 +32,17 @@ If it fails, make sure that your plugin is correctly built and accessible with y
- [Working with multiple files](07-multiple-files-plugin)
- [Display CSV, GPX, KML, WKT and other](08-display-csv-gpx-kml-formats)

# Other resources
### Other resources
- [How Windy Plugin work](docs/WINDY_PLUGIN.md)
- [Windy API documentation](docs/WINDY_API.md)
- [Leaflet 0.7.7 documentation](https://leafletjs.com/reference-0.7.7.html)
- [List of Leaflet Plugins](https://leafletjs.com/plugins.html)
- [Windy Plugins technical forum](https://community.windy.com/category/21/windy-plugins)

# Compiling your plugin
### Compiling your plugin
Our custom [Windy Plugin Compiler](docs/PLUGIN_COMPILER.md) does all the job for you. Just run `npm start` to launch it or `npm run start-dev` to skip beginner's prompt.

# Publishing your plugin
### Publishing your plugin
1) Make sure, that your `package.json` is updated, and that:
+ name, is unique name of your plugin
+ description, describes what your plugin does
Expand All @@ -53,39 +53,37 @@ Our custom [Windy Plugin Compiler](docs/PLUGIN_COMPILER.md) does all the job for
5) Let [us know in our community](https://community.windy.com/category/21/windy-plugins) about your new achievement
6) Commit your work and pull your repository back to GitHub. Rename your repository to reflect name of your plugin.

# Conditions
### Conditions
It is strictly prohibited to use plugin to:
- Modify user's setting without his consent
- Download any of user's settings, favorites or location to your server
- Download any meteorological data from Windy to your own server or use them in any other scope than inside your plugin
- Do any action that would harm our [privacy policy](https://www.windy.com/privacy)

# Enterprise use
### Enterprise use
We prepare **Windy Enterprise** project, that will enable to
1) Use private plugins (not published publicly)
2) Limit access to your data just to your invited users
3) Let us know if you want to be informed about this project

# Things to remember
### Things to remember
- While providing coordinates to Leaflet can be done via object `{ lat, lng }` with **lng** property, Windy supports `{ lat, lon }` with **lon** property.
- Using undocumented functions of Windy API can break your plugin, when we decide to upgrade our codes. If you miss something, rather [let us know here](https://community.windy.com/category/21/windy-plugins) and ask us to document and expose other features.

# Technical support
### Technical support
Drop a line in our [Windy Plugins section](https://community.windy.com/category/21/windy-plugins) of our Community forum.

# ROADMAP
### ROADMAP
- Initial release
- Extend Windy API on a basis users requests
- Create gallery of the most useful plugins
- Create system so anyone can publish its own forecast/climatological model on Windy

# CHANGELOG
### CHANGELOG
* 0.1.1
- Initial version of this repo

-----------

This is default readme - please do not remove this line
<small>This is default readme - please do not remove this line</small>



14 changes: 7 additions & 7 deletions docs/WINDY_PLUGIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

<!-- tocstop -->

# How Windy Plugin works
### How Windy Plugin works
Windy plugin is piece of `js`, `css` and `html` that is compiled together into single `plugin.js` file.

The file is then published as `npm` package, and upon user's selection, loaded into Windy.com to be launched upon user's action.

## Name of your plugin
### Name of your plugin
Most important configuration variable is name of your plugin, which is `name` of your `package.json` (since the name of your plugin must be the same as the name of your npm package).

The name of your plugin, and your npm package must have form `windy-plugin-anyName`

## Source files
### Source files
Your `src/` directory should look like this:
```sh
config.js
Expand All @@ -35,7 +35,7 @@ plugin.less // <-- optional
otherFiles.mjs // <-- optional
```

### plugin.html
**plugin.html**
Similar to vue, svelte or riot tag, contains html, and also js code of your plugin.

```html
Expand All @@ -55,7 +55,7 @@ Similar to vue, svelte or riot tag, contains html, and also js code of your plug
</plugin>
```

### plugin.less
**plugin.less**
Your plugin will be wrapped inside `#windy-plugin-anyName` DIV. Whenever `.onwindy-plugin-anyName` class is applied to `<body>` of the page, you have chance to modify other styles on page.

```css
Expand All @@ -68,7 +68,7 @@ Your plugin will be wrapped inside `#windy-plugin-anyName` DIV. Whenever `.onwin
}
```

### config.js
**config.js**
Basic configuration of your plugin has node.js module syntax. Remember, that `name` of your plugin, `description` and `author` is defined in your `package.json`.

```js
Expand Down Expand Up @@ -104,7 +104,7 @@ module.exports = {
}
```

# The life cycle of the plugin
## The life cycle of the plugin
### Loading of the plugin
Whenever Windy loads your plugin, following actions will happen:
1) You `plugin.js` is loaded into Windy, and function `W.loadPlugin` is executed.
Expand Down

0 comments on commit c224572

Please sign in to comment.