-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.3.0' into master
- Loading branch information
Showing
42 changed files
with
7,474 additions
and
5,669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@studiometa/prettier-config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
41
docs/.vuepress/components/MapboxGeocoderDemoWithoutMap.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.