forked from Ivasoft/geovisio-website
add eslint + doc README + env var
This commit is contained in:
26
.eslintrc.js
Normal file
26
.eslintrc.js
Normal file
@@ -0,0 +1,26 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
extraFileExtensions: [".vue"],
|
||||
ecmaVersion: 2020,
|
||||
sourceType: "module",
|
||||
},
|
||||
plugins: ["@typescript-eslint"],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
"plugin:vue/base",
|
||||
"prettier",
|
||||
],
|
||||
rules: {
|
||||
"vue/require-default-prop": "off",
|
||||
// override/add rules settings here, such as:
|
||||
// 'vue/no-unused-vars': 'error'
|
||||
},
|
||||
};
|
||||
22
README.md
22
README.md
@@ -50,25 +50,3 @@ npm run workflows:unit
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
## Deploy with Github Pages
|
||||
|
||||
The deploy is on the `gh-pages` branch.
|
||||
1 - You must build a static project :
|
||||
|
||||
```sh
|
||||
vite build
|
||||
```
|
||||
|
||||
2 - Add and Commit :
|
||||
|
||||
```sh
|
||||
ga .
|
||||
gc -m 'my commit'
|
||||
```
|
||||
|
||||
3 - Push on the specific branch
|
||||
|
||||
```sh
|
||||
git subtree push --prefix dist origin gh-pages
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"start": "vite preview --port $PORT",
|
||||
"start": "vite --port $PORT",
|
||||
"build": "run-p type-check build-only",
|
||||
"preview": "vite preview",
|
||||
"test:unit": "vitest --environment jsdom --root src/",
|
||||
@@ -25,7 +25,7 @@
|
||||
"devDependencies": {
|
||||
"@rushstack/eslint-patch": "^1.1.4",
|
||||
"@types/jsdom": "^20.0.1",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/node": "^18.11.18",
|
||||
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router'
|
||||
import { RouterView } from "vue-router";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
28
src/main.ts
28
src/main.ts
@@ -1,22 +1,22 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import fr from './locales/fr.json'
|
||||
import { createApp } from "vue";
|
||||
import { createI18n } from "vue-i18n";
|
||||
import App from "./App.vue";
|
||||
import router from "./router";
|
||||
import fr from "./locales/fr.json";
|
||||
|
||||
import './assets/main.css'
|
||||
import "./assets/main.css";
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: 'fr',
|
||||
locale: "fr",
|
||||
globalInjection: true,
|
||||
legacy: false,
|
||||
messages: {
|
||||
fr
|
||||
}
|
||||
})
|
||||
const app = createApp(App)
|
||||
fr,
|
||||
},
|
||||
});
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(i18n)
|
||||
app.use(router)
|
||||
app.use(i18n);
|
||||
app.use(router);
|
||||
|
||||
app.mount('#app')
|
||||
app.mount("#app");
|
||||
|
||||
@@ -5,15 +5,11 @@
|
||||
import { onMounted } from "vue";
|
||||
import Viewer from "../lib/Viewer.js";
|
||||
const onloadImg = () => {
|
||||
new Viewer(
|
||||
"viewer",
|
||||
"http://dev.geovisio.xuan.codeursenliberte.fr/api/search",
|
||||
{
|
||||
map: {
|
||||
startWide: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
new Viewer("viewer", import.meta.env.VITE_API_URL, {
|
||||
map: {
|
||||
startWide: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"types": ["vite/client"]
|
||||
}
|
||||
}
|
||||
|
||||
4356
yarn-error.log
Normal file
4356
yarn-error.log
Normal file
File diff suppressed because it is too large
Load Diff
@@ -630,7 +630,7 @@
|
||||
"@types/mapbox__point-geometry" "*"
|
||||
"@types/pbf" "*"
|
||||
|
||||
"@types/node@*", "@types/node@^18.11.9":
|
||||
"@types/node@*", "@types/node@^18.11.18":
|
||||
version "18.11.18"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f"
|
||||
integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==
|
||||
|
||||
Reference in New Issue
Block a user