Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulthink committed Feb 21, 2023
1 parent e956f30 commit 4151054
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ via a script-tag either from a CDN or from any other webserver.
</script>
```

See the examples in [./examples/html](./examples/html) for full examples on
See the examples in [./examples/html](./examples/html) for full examples on
how to use the library without a bundler.

### npm Installation (for now)
## Installation (for now)

When you're using a bundler and want to use an npm-module, you can install
it from the tarball [published here][npm-pack-url]:

npm install https://storage.ubidev.net/marker-api-playground/lib/ubilabs-google-maps-marker.tgz
npm install https://storage.ubidev.net/marker-api-playground/lib/googlemaps-marker.tgz

And use it in your project:

```javascript
import {Marker} from '@ubilabs/google-maps-marker';
import {Marker} from '@googlemaps/marker';

async function main() {
const {Map} = await google.maps.importLibrary('maps');
Expand Down Expand Up @@ -101,11 +101,7 @@ marker.color = 'lightblue';
marker.position = {lng: 34, lat: 23};

// dynamic attributes
marker.scale =
({map}) =>
({map}) =>
Math.max(1, Math.pow(1.45, map.zoom) / 64);

marker.scale = ({map}) => Math.max(1, Math.pow(1.45, map.zoom) / 64);
marker.color = ({data}) => (data.someValue > 10 ? 'red' : 'blue');
```

Expand Down
3 changes: 1 addition & 2 deletions examples/playground/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export default defineConfig(({mode}) => {
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
examples: resolve(__dirname, './examples.html')
main: resolve(__dirname, 'index.html')
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"server:docs": "http-server ./dist/docs",
"docs": "run-p watch:docs server:docs",
"deploy:playground": "cd examples/playground && npm run deploy",
"deploy:archive": "npm run clean && npm run build && npm pack --pack-destination ./dist && mv ./dist/ubilabs-google-maps-marker*.tgz ./dist/ubilabs-google-maps-marker.tgz && gsutil -m rsync -rc ./dist/ gs://storage.ubidev.net/marker-api-playground/lib/",
"deploy:archive": "npm run clean && npm run build && npm pack --pack-destination ./dist && mv ./dist/googlemaps-marker*.tgz ./dist/googlemaps-marker.tgz && gsutil -m rsync -rc ./dist/ gs://storage.ubidev.net/marker-api-playground/lib/",
"deploy": "run-s deploy:*"
},
"devDependencies": {
Expand Down

0 comments on commit 4151054

Please sign in to comment.