Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitub actions #84

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,16 @@
"no-prototype-builtins": 1,
"no-caller": 1,
"indent": [2, 4, { "SwitchCase": 1, "VariableDeclarator": 1, "outerIIFEBody": 1 }]
},
"env": {
"node": true,
"mocha": true,
"amd": true
},
"globals": {
"L": true,
"sinon": true,
"chai": true,
"happen": true
}
}
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
pull_request:
push:
branches:
- master
release:
types:
- created
schedule:
- cron: '0 2 * * *'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 12
cache: 'npm'
- run: npm ci
- run: npm run lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '14', '16' ]
name: Node ${{ matrix.node }} unit test
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm install leaflet togeojson --no-save
- run: npm test

publish:
needs: [lint, test]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ Check out the [demo](http://makinacorpus.github.io/Leaflet.FileLayer/) !

For GPX and KML files, it currently depends on [Tom MacWright's togeojson.js](https://github.com/tmcw/togeojson).

[![Build Status](https://travis-ci.org/makinacorpus/Leaflet.FileLayer.png?branch=master)](https://travis-ci.org/makinacorpus/Leaflet.FileLayer)
![Build Status](https://github.com/makinacorpus/Leaflet.FileLayer/actions/workflows/ci.yml/badge.svg)

Install
-----
In order to use this plugin in your app you can either:
* install it via your favorite package manager:
* `npm i leaflet-filelayer`
* `bower install git://github.com:makinacorpus/Leaflet.FileLayer.git`

```shell
npm i leaflet-filelayer
bower install git://github.com:makinacorpus/Leaflet.FileLayer.git
```

* download the repository and import the `leaflet.filelayer.js` file in your app.

Dependencies and compatibilities
Expand Down Expand Up @@ -118,7 +122,7 @@ Changelog
Authors
-------

[![Makina Corpus](http://depot.makina-corpus.org/public/logo.gif)](http://makinacorpus.com)
[![Makina Corpus](https://github.com/makinacorpus.png)](https://www.makina-corpus.com)

Contributions

Expand Down
6 changes: 3 additions & 3 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.1.0/dist/leaflet.css">
<link rel="stylesheet" href="../node_modules/leaflet/dist/leaflet.css">
<style>
.icon {
max-width: 70%;
Expand All @@ -17,8 +17,8 @@
<body>
<div id="map" style="width: 100vw; height: 100vh;"></div>
</body>
<script src="https://unpkg.com/leaflet@1.1.0/dist/leaflet.js"></script>
<script src="https://unpkg.com/togeojson@0.14.2"></script>
<script src="../node_modules/leaflet/dist/leaflet.js"></script>
<script src="../node_modules/togeojson/togeojson.js"></script>
<script src="../src/leaflet.filelayer.js"></script>
<script>
(function (window) {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1>Leaflet Filelayer plugin</h1>
<div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a></div>
</footer>
</body>
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaflet.css is still in 1.2.0, we should stay on the same version as the .js

I can't comment on the line itself but there it is :

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css">

<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/[email protected]"></script>
<script src="menu.js"></script>
Expand Down
Loading