Unverified Commit c0ec9b7a authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera
Browse files

Finalise vue3 first draft

parent fc0f5371
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
# vue-leaflet

Vue-leaflet written and compatible with vue3

This is an Alpha version! And totally not suitable for production! If you wanna help please reach out in an issue or [discord](https://discord.gg/uVZAfUf)

## What Works:

- Map
- Markers
- TileLayers
- LayersControl

## Project setup

```
yarn install
```

### Compiles and hot-reloads for development

```
yarn serve
```

### Compiles and minifies for production

```
yarn build
```

### Lints and fixes files

```
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
+2 −4
Original line number Diff line number Diff line
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
  presets: ["@vue/cli-plugin-babel/preset"],
};
+12 −12
Original line number Diff line number Diff line
module.exports = {
  componentsRoot: 'src/components',
  components: '**/[A-Z]*.vue',
  outDir: './docs/components',
  componentsRoot: "src/components",
  components: "**/[A-Z]*.vue",
  outDir: "./docs/components",
  defaultExamples: false,
  templates: {
    component: (renderedUsage, doc) => {
@@ -12,15 +12,15 @@ module.exports = {
title: ${displayName}
---
# ${deprecated ? `~~${displayName}~~` : displayName}
${deprecated ? `> **Deprecated** ${deprecated[0].description}\n` : ''}
${description ? '> ' + description : ''}
${functional ? renderedUsage.functionalTag : ''}
${author ? author.map(a => `Author: ${a.description}\n`) : ''}
${since ? `Since: ${since[0].description}\n` : ''}
${version ? `Version: ${version[0].description}\n` : ''}
${see ? see.map(s => `[See](${s.description})\n`) : ''}
${link ? link.map(l => `[See](${l.description})\n`) : ''}
${docsBlocks ? '---\n' + docsBlocks.join('\n---\n') : ''}
${deprecated ? `> **Deprecated** ${deprecated[0].description}\n` : ""}
${description ? "> " + description : ""}
${functional ? renderedUsage.functionalTag : ""}
${author ? author.map((a) => `Author: ${a.description}\n`) : ""}
${since ? `Since: ${since[0].description}\n` : ""}
${version ? `Version: ${version[0].description}\n` : ""}
${see ? see.map((s) => `[See](${s.description})\n`) : ""}
${link ? link.map((l) => `[See](${l.description})\n`) : ""}
${docsBlocks ? "---\n" + docsBlocks.join("\n---\n") : ""}
${renderedUsage.props}
${renderedUsage.methods}
${renderedUsage.events}
+12 −14
Original line number Diff line number Diff line
@@ -2,25 +2,23 @@ module.exports = {
  verbose: true,
  bail: true,
  collectCoverage: true,
  coverageDirectory: 'coverage',
  coverageDirectory: "coverage",
  restoreMocks: true,
  moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
  setupFiles: [
    '<rootDir>/tests/setup.js'
  ],
  moduleFileExtensions: ["js", "jsx", "json", "vue"],
  setupFiles: ["<rootDir>/tests/setup.js"],
  transform: {
    '^.+\\.vue$': 'vue-jest',
    '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
      'jest-transform-stub',
    '^.+\\.jsx?$': 'babel-jest'
    "^.+\\.vue$": "vue-jest",
    ".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
      "jest-transform-stub",
    "^.+\\.jsx?$": "babel-jest",
  },
  moduleNameMapper: {
    '^@/tests/(.*)$': '<rootDir>/tests/$1',
    '^@/(.*)$': '<rootDir>/src/$1'
    "^@/tests/(.*)$": "<rootDir>/tests/$1",
    "^@/(.*)$": "<rootDir>/src/$1",
  },
  snapshotSerializers: ['jest-serializer-vue'],
  snapshotSerializers: ["jest-serializer-vue"],
  testMatch: [
    '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
    "**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)",
  ],
  testURL: 'http://localhost/'
  testURL: "http://localhost/",
};
+20 −10
Original line number Diff line number Diff line
{
  "name": "vue-leaflet",
  "name": "@vue-leaflet/vue-leaflet",
  "version": "0.1.0",
  "private": true,
  "private": false,
  "sideEffects": false,
  "main": "dist/vue-leaflet.common.js",
  "files": [
    "dist/",
    "src/"
  ],
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
    "serve": "vue-cli-service serve ./src/playground.js",
    "build": "vue-cli-service build --target lib ./src/lib.js",
    "lint": "vue-cli-service lint",
    "prepublishOnly": "npm run lint && npm run build"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0-0"
  "peerDependencies": {
    "@types/leaflet": "^1.5.7",
    "leaflet": "^1.6.0",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "@vue/compiler-sfc": "^3.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-config-prettier": "^6.11.0",
    "eslint-plugin-prettier": "^3.1.4",
    "eslint-plugin-vue": "^7.0.0-0",
    "leaflet": "^1.6.0",
    "prettier": "^2.0.5"
    "prettier": "^2.0.5",
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "eslintConfig": {
    "root": true,
Loading