Commit decca38b authored by Fawad Mirzad's avatar Fawad Mirzad
Browse files

Add most of components and prepare for V1 Release

parent 1a5cf0b0
Loading
Loading
Loading
Loading

.eslintignore

0 → 100644
+0 −0

Empty file added.

.eslintrc.json

0 → 100644
+24 −0
Original line number Diff line number Diff line
{
  "env": {
    "browser": true,
    "commonjs": true,
    "es6": true,
    "node": true
  },
  "extends": "standard",
  "parserOptions": {
    "sourceType": "module"
  },
  "rules": {
    "comma-dangle": 0
  },
  "globals": {
    "google": true
  },
  "plugins": [
    "html"
  ],
  "settings": {
    "html/html-extensions": [".html", ".vue"]
  }
}

README.md

0 → 100644
+44 −0
Original line number Diff line number Diff line
# Google maps Components for Vue.js 3

Set of mostly used Google Maps components for Vue.js.

#### Why this library exists?
We heavily use Google Maps in our projects, so I wanted to have a well maintained Google Maps library.

## Documentation
Checkout https://vue-map.netlify.app for a detailed documentation

## Installation
You can install it using npm
```
npm install -S @fawmi/vue-google-maps
```

## Basic usage
You need an API Key. Learn how to [get an Api key ](https://developers.google.com/maps/documentation/javascript/get-api-key).

##Configure Vue to use the Components

In your `main.js` or inside a Nuxt plugin:

```js
import { createApp } from 'vue'
import * as VueGoogleMaps from '@fawmi/vue-google-maps'

const app = createApp(App);
app.use(VueGoogleMaps, {
    load: {
        key: 'YOUR_API_KEY_COMES_HERE',
    },
}).mount('#app')

```
## Use it anywhere in your components

```vue
<template>
  <GmapMap
      :center="{lat: 51.093048, lng: 6.842120}"
      :zoom="7"
      map-type-id="terrain"
  
 No newline at end of file

build-copy.js

0 → 100644
+8 −0
Original line number Diff line number Diff line
/* copies the components to the dist directory */
require('shelljs/global')

cp('src/components/infoWindow.vue', 'dist/components/')
cp('src/components/map.vue', 'dist/components/')
cp('src/components/placeInput.vue', 'dist/components/')
cp('src/components/autocomplete.vue', 'dist/components/')
cp('src/components/streetViewPanorama.vue', 'dist/components/')

src/.babelrc

0 → 100644
+20 −0
Original line number Diff line number Diff line
{
  "presets": [
    [
      "env",
      {
        "targets": {
          "browsers": [
            "last 2 versions",
            "safari >= 7"
          ]
        }
      }
    ]
  ],
  "plugins": [
    "transform-object-rest-spread",
    "transform-inline-environment-variables",
    "minify-dead-code-elimination"
  ]
}
Loading