Skip to content

Commit

Permalink
Merge branch 'release/1.3.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Sep 15, 2020
2 parents 1b039db + 96b937d commit 3a501e5
Show file tree
Hide file tree
Showing 42 changed files with 7,474 additions and 5,669 deletions.
8 changes: 2 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
module.exports = {
extends: [
'@studiometa/eslint-config/vue',
],
extends: ['@studiometa/eslint-config'],
settings: {
'import/resolver': {
alias: {
map: [
[ '@', './src/' ],
],
map: [['@', './src/']],
},
},
},
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: NPM Publish

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Code Quality & Tests
on: [push, pull_request]

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm install, and lint
run: |
npm ci
npm run lint
env:
CI: true
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm install, build, and test
run: |
npm ci
npm run build
npm test
env:
CI: true
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@studiometa/prettier-config');
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following components are available:
| [MapboxMap](https://vue-mapbox-gl.meta.fr/components/MapboxMap) | Display a map with the given style. ||
| [MapboxMarker](https://vue-mapbox-gl.meta.fr/components/MapboxMarker) | Display a simple or custom marker. ||
| [MapboxCluster](https://vue-mapbox-gl.meta.fr/components/MapboxCluster) | Display a GeoJSON as clusters. ||
| [MapboxGeocoder](https://vue-mapbox-gl.meta.fr/components/MapboxGeocoder) | Display a geocoder search input with the [@mapbox/mapbox-gl-geocoder](https://github.com/mapbox/mapbox-gl-geocoder) plugin. | |
| [MapboxGeocoder](https://vue-mapbox-gl.meta.fr/components/MapboxGeocoder) | Display a geocoder search input with the [@mapbox/mapbox-gl-geocoder](https://github.com/mapbox/mapbox-gl-geocoder) plugin. | |
| [MapboxImage](https://vue-mapbox-gl.meta.fr/components/MapboxImage) | Load an image to be used on the map. ||
| [MapboxImages](https://vue-mapbox-gl.meta.fr/components/MapboxImages) | Load multiple images to be used on the map. ||
| [MapboxLayer](https://vue-mapbox-gl.meta.fr/components/MapboxLayer) | Display a layer on the map. ||
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module.exports = {
},
],
],
plugins: [ '@babel/plugin-proposal-export-default-from' ],
plugins: ['@babel/plugin-proposal-export-default-from'],
};
472 changes: 358 additions & 114 deletions dist/VueMapboxGl.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueMapboxGl.common.js.map

Large diffs are not rendered by default.

472 changes: 358 additions & 114 deletions dist/VueMapboxGl.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueMapboxGl.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueMapboxGl.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueMapboxGl.umd.min.js.map

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions docs/.vuepress/components/MapboxGeocoderDemo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<template>
<mapbox-map
style="margin-top: 1em; height: 400px;"
:access-token="MAPBOX_API_KEY"
map-style="mapbox://styles/mapbox/streets-v11">
<mapbox-geocoder
@mb-loading="onloading"
@mb-results="onresults"
@mb-result="onresult"
@mb-error="onerror" />
</mapbox-map>
</template>

<script>
require('@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css')
export default {
name: 'MapboxGeocoderDemo',
methods: {
onloading(query) {
console.log('onloading', query);
},
onresults(results) {
console.log('onresults', results);
},
onresult(result) {
console.log('onresult', result);
},
onerror(error) {
console.log('onerror', error);
},
}
};
</script>
41 changes: 41 additions & 0 deletions docs/.vuepress/components/MapboxGeocoderDemoWithoutMap.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<template>
<div class="preview">
<mapbox-geocoder
:access-token="MAPBOX_API_KEY"
:reverse-geocode="reverseGeocode"
@mb-loading="log('loading', $event)"
@mb-results="log('results', $event)"
@mb-result="log('result', $event)"
@mb-error="log('error', $event)" />
</div>
</template>

<script>
import '@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css';
export default {
name: 'MapboxGeocoderDemoWithoutMap',
props: {
reverseGeocode: {
type: Boolean,
default: false,
},
},
methods: {
log: console.log,
},
};
</script>

<style>
.preview {
z-index: 999;
position: relative;
display: flex;
align-items: center;
justify-content: center;
padding: 3em;
background-color: #eee;
border-radius: 6px;
}
</style>
27 changes: 27 additions & 0 deletions docs/.vuepress/components/MapboxGeolocateControlDemo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<mapbox-geolocate-control
@mb-trackuserlocationstart="ontrackuserlocationstart()"
@mb-trackuserlocationend="ontrackuserlocationend()"
@mb-geolocate="ongeolocate()"
@mb-error="onerror()" />
</template>

<script>
export default {
name: 'GeolocateControlDemo',
methods: {
ontrackuserlocationend() {
console.log('MapboxGeolocateControl - trackuserlocationend');
},
ontrackuserlocationstart() {
console.log('MapboxGeolocateControl - trackuserlocationstart');
},
ongeolocate() {
console.log('MapboxGeolocateControl - geolocate');
},
onerror() {
console.log('MapboxGeolocateControl - error');
},
},
};
</script>
26 changes: 8 additions & 18 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,13 @@ module.exports = {
chainWebpack: (config) => {
// Update babel-loader config to use the same configuration
// as the project (especially the plugins).
config.module
.rule('js')
.test(/\.js$/)
.use('babel-loader')
.loader('babel-loader')
.options({
configFile: true,
});
config.module.rule('js').test(/\.js$/).use('babel-loader').loader('babel-loader').options({
configFile: true,
});

config.plugin('env').use(webpack.EnvironmentPlugin, [ 'MAPBOX_API_KEY' ]);
config.plugin('env').use(webpack.EnvironmentPlugin, ['MAPBOX_API_KEY']);

config.resolve.alias.set(
'@studiometa/vue-mapbox-gl',
resolve(__dirname, '../../src')
);
config.resolve.alias.set('@studiometa/vue-mapbox-gl', resolve(__dirname, '../../src'));
},
themeConfig: {
nav: [
Expand All @@ -36,13 +28,11 @@ module.exports = {
{ text: 'MapboxMarker', link: '/components/MapboxMarker' },
{ text: 'MapboxCluster', link: '/components/MapboxCluster' },
{ text: 'MapboxGeocoder', link: '/components/MapboxGeocoder' },
{ text: 'MapboxGeolocateControl', link: '/components/MapboxGeolocateControl' },
{ text: 'MapboxImage', link: '/components/MapboxImage' },
{ text: 'MapboxImages', link: '/components/MapboxImages' },
{ text: 'MapboxLayer', link: '/components/MapboxLayer' },
{
text: 'MapboxNavigationControl',
link: '/components/MapboxNavigationControl',
},
{ text: 'MapboxNavigationControl', link: '/components/MapboxNavigationControl' },
{ text: 'MapboxPopup', link: '/components/MapboxPopup' },
{ text: 'MapboxSource', link: '/components/MapboxSource' },
],
Expand All @@ -51,7 +41,7 @@ module.exports = {
],
},
markdown: {
toc: { includeLevel: [ 2 ] },
toc: { includeLevel: [2] },
},
plugins: [
[
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Check the detailed documentation on each components for a more advanced usage:
| [MapboxImages](./components/MapboxImages.md) | Load multiple images to be used on the map. |
| [MapboxLayer](./components/MapboxLayer.md) | Display a layer on the map. |
| [MapboxNavigationControl](./components/MapboxNavigationControl.md) | Display the map's navigation controls |
| [MapboxGeolocateControl](./components/MapboxGeolocateControl.md) | Display the map's geolocation control |
| [MapboxPopup](./components/MapboxPopup.md) | Display a popup on the map |
| [MapboxSource](./components/MapboxSource.md) | Load a source of data to be used on the map |

Expand Down
Loading

0 comments on commit 3a501e5

Please sign in to comment.