From 4151054b2280a3a6249e773918d0b0d55b2f9a4c Mon Sep 17 00:00:00 2001 From: Martin Schuhfuss Date: Tue, 21 Feb 2023 21:09:51 +0100 Subject: [PATCH] chore: minor fixes --- README.md | 14 +++++--------- examples/playground/vite.config.js | 3 +-- package.json | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 40ea7f5..cc05add 100644 --- a/README.md +++ b/README.md @@ -41,20 +41,20 @@ via a script-tag either from a CDN or from any other webserver. ``` -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'); @@ -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'); ``` diff --git a/examples/playground/vite.config.js b/examples/playground/vite.config.js index 4cd9607..0e15983 100644 --- a/examples/playground/vite.config.js +++ b/examples/playground/vite.config.js @@ -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') } } }, diff --git a/package.json b/package.json index 2452fdc..03c21c2 100644 --- a/package.json +++ b/package.json @@ -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": {