reset base config

This commit is contained in:
axolotle
2021-02-23 12:45:57 +01:00
parent 0da09e13d8
commit c0fd76d93a
12 changed files with 123 additions and 148 deletions
+3
View File
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
-2
View File
@@ -1,3 +1 @@
/build/
/config/
/dist/ /dist/
+26 -25
View File
@@ -1,33 +1,34 @@
const prod = process.env.NODE_ENV === 'production'
module.exports = { module.exports = {
root: true, root: true,
env: {
node: true
},
extends: [
'plugin:vue/strongly-recommended',
'plugin:vue-a11y/base',
'eslint:recommended',
'@vue/standard'
],
plugins: [
'vue-a11y'
],
parserOptions: { parserOptions: {
parser: 'babel-eslint' parser: 'babel-eslint'
}, },
env: {
browser: true,
node: true,
mocha: true
},
"globals": {
"expect": true
},
extends: [
'plugin:vue/recommended',
'plugin:vue-a11y/base',
'standard'
],
plugins: [
'vue',
'vue-a11y'
],
rules: { rules: {
'generator-star-spacing': 'off', 'no-console': prod ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-debugger': prod ? 'warn' : 'off',
'vue/singleline-html-element-content-newline': 'off', 'vue/max-attributes-per-line': [
'vue/multiline-html-element-content-newline': 'off', 'error',
'vue/max-attributes-per-line': 'off', {
'vue/no-v-html': 'off', singleline: 3,
'vue/require-default-prop': 'off', multiline: { max: 3, allowFirstLine: true }
'vue-a11y/label-has-for': 'off' }
],
'no-irregular-whitespace': 'off',
'no-unused-vars': 'warn',
'no-multiple-empty-lines': ['error', { max: 2 }]
} }
} }
+5
View File
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
+32 -67
View File
@@ -1,77 +1,42 @@
{ {
"name": "vue-webpack-4", "name": "en-francais",
"version": "1.1.0", "version": "0.1.0",
"description": "A Vuejs template using Webpack 4", "license": "GPL-3.0",
"main": "index.js", "private": true,
"author": "Nicolas CHESNAIS",
"scripts": { "scripts": {
"dev": "webpack-dev-server --progress --config build/webpack.config.dev.js", "dev": "vue-cli-service serve",
"prod": "webpack --config build/webpack.config.prod.js", "prod": "vue-cli-service build",
"lint": "eslint --ext .js,.vue src", "lint": "vue-cli-service lint --no-fix",
"lint:fix": "eslint --ext .js,.vue src --fix", "lint:fix": "vue-cli-service lint"
"test": "jest --config test/jest.config.js",
"test:debug": "node --inspect node_modules/.bin/jest --runInBand --config test/jest.config.js"
}, },
"keywords": [
"Vue",
"Webpack 4"
],
"author": "Daniel Cook",
"license": "MIT",
"dependencies": { "dependencies": {
"@popperjs/core": "^2.4.4", "axios": "^0.21.1",
"axios": "^0.18.1", "core-js": "^3.6.5",
"vue": "^2.6.10", "vue": "^2.6.11",
"vue-clipboard2": "^0.3.1", "vue-meta": "^2.4.0",
"vue-infinite-loading": "^2.4.5", "vue-router": "^3.2.0",
"vue-meta": "^1.6.0", "vue2-touch-events": "^3.2.0",
"vue-router": "^3.1.3", "vuex": "^3.4.0"
"vue-scrollto": "^2.18.1",
"vue-select": "^3.10.7",
"vue2-touch-events": "^2.2.1",
"vuex": "^3.1.1",
"vuex-router-sync": "^5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.6.0", "@vue/cli-plugin-babel": "~4.5.0",
"@babel/preset-env": "^7.6.0", "@vue/cli-plugin-eslint": "~4.5.0",
"@vue/test-utils": "^1.0.0-beta.29", "@vue/cli-plugin-router": "~4.5.0",
"babel-core": "^7.0.0-bridge.0", "@vue/cli-plugin-vuex": "~4.5.0",
"babel-eslint": "^10.0.3", "@vue/cli-service": "~4.5.0",
"babel-jest": "^24.9.0", "@vue/eslint-config-standard": "^5.1.2",
"babel-loader": "^8.0.6", "babel-eslint": "^10.1.0",
"copy-webpack-plugin": "^5.0.4", "eslint": "^6.7.2",
"css-loader": "^2.1.1", "eslint-config-standard": "^16.0.2",
"eslint": "^5.16.0", "eslint-plugin-import": "^2.20.2",
"eslint-config-standard": "^12.0.0", "eslint-plugin-node": "^11.1.0",
"eslint-loader": "^2.2.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.3", "eslint-plugin-vue": "^6.2.2",
"eslint-plugin-vue-a11y": "0.0.28", "eslint-plugin-vue-a11y": "0.0.31",
"file-loader": "^4.2.0",
"html-webpack-harddisk-plugin": "^1.0.1",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.9.0",
"jest-serializer-vue": "^2.0.2",
"mini-css-extract-plugin": "^0.5.0",
"node-sass": "^4.12.0", "node-sass": "^4.12.0",
"sass-loader": "^7.3.1", "sass-loader": "^8.0.2",
"style-loader": "^0.23.1", "vue-template-compiler": "^2.6.11"
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"uglify-es": "^3.3.9",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^1.1.2",
"vue-jest": "^3.0.5",
"vue-loader": "^15.7.1",
"vue-server-renderer": "^2.6.10",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.40.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.1",
"webpack-merge": "^4.2.2"
} }
} }
+7 -2
View File
@@ -1,11 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="fr">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>En Françai(s)</title> <title>En Françai(s)</title>
</head> </head>
<body tabindex="-1"> <body>
<noscript>
<strong>Désolé mais ce site ne fonctionnera pas sans JavaScript activé. Réactivez-le afin de visiter ce site.</strong>
</noscript>
<div id="app"></div> <div id="app"></div>
</body> </body>
</html> </html>
+13 -22
View File
@@ -1,31 +1,25 @@
<template> <template>
<div id="root"> <div id="app">
<header role="banner"> <header>
<div class="wrapper"> <h1>
<h1 <router-link :to="{ name: 'home' }">En Français</router-link>
class="site-title" </h1>
tabindex="0"
>
<router-link :to="{ name:'home' }">En Français</router-link>
</h1>
</div>
</header> </header>
<section role="main-content">
<div class="wrapper"> <main id="main">
<RouterView /> <router-view />
</div> </main>
</section>
<footer role="tools"> <footer>
<p>footer</p> <p>footer</p>
</footer> </footer>
</div> </div>
</template> </template>
<script> <script>
// import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'App',
metaInfo: { metaInfo: {
// if no subcomponents specify a metaInfo.title, this title will be used // if no subcomponents specify a metaInfo.title, this title will be used
title: 'Home', title: 'Home',
@@ -40,7 +34,4 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{
max-width: 1200px;
}
</style> </style>
+2 -10
View File
@@ -1,23 +1,15 @@
import Vue from 'vue' import Vue from 'vue'
import router from './router'
import store from './store'
// import { sync } from 'vuex-router-sync'
import Meta from 'vue-meta' import Meta from 'vue-meta'
import Vue2TouchEvents from 'vue2-touch-events' import Vue2TouchEvents from 'vue2-touch-events'
import router from './router'
import store from './store'
import App from './App' import App from './App'
import 'assets/css/mdi/css/materialdesignicons.css'
// import 'mdi/font'
import 'vue-select/src/scss/vue-select.scss'
import 'assets/css/app.scss'
Vue.use(Meta) Vue.use(Meta)
Vue.use(Vue2TouchEvents) Vue.use(Vue2TouchEvents)
// Define the api path regarding the environment
// https://apple.stackexchange.com/questions/17077/add-a-hosts-file-entry-without-jailbreaking
// window.apipath = process.env === 'prod' || window.location.hostname === 'dev.gdp.fr' ? `http://${window.location.hostname}/api` : 'http://localhost:8984'
new Vue({ new Vue({
router, router,
+3 -11
View File
@@ -1,19 +1,11 @@
<template> <template>
<div <div class="home">
id="home" Home
class="full-width"
>
<header>
<h1>En Français</h1>
</header>
<section>
<p>contenu</p>
</section>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'Home'
} }
</script> </script>
+1 -1
View File
@@ -33,7 +33,7 @@ export default {
}, },
metaInfo () { metaInfo () {
return { return {
title: `Not Found` title: 'Not Found'
} }
} }
} }
+8 -7
View File
@@ -1,10 +1,8 @@
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import VueRouter from 'vue-router'
import Home from '../pages/Home.vue'
import Home from 'pages/Home' Vue.use(VueRouter)
import NotFound from 'pages/NotFound'
Vue.use(Router)
const routes = [ const routes = [
{ {
@@ -16,11 +14,14 @@ const routes = [
name: 'notfound', name: 'notfound',
path: '/404', path: '/404',
alias: '*', alias: '*',
component: NotFound component: () => import(/* webpackChunkName: "404" */ '../pages/NotFound.vue')
} }
] ]
export default new Router({ const router = new VueRouter({
mode: 'history', mode: 'history',
base: process.env.BASE_URL,
routes routes
}) })
export default router
+22
View File
@@ -0,0 +1,22 @@
module.exports = {
publicPath: '/',
devServer: {
clientLogLevel: 'warning',
// historyApiFallback: {
// index: '/',
// disableDotRule: true,
// verbose: true
// },
// hot: true,
// contentBase: 'dist',
// compress: true,
host: '0.0.0.0',
port: 8988,
disableHostCheck: true,
publicPath: '/',
// quiet: false,
watchOptions: {
ignored: /node_modules/
}
}
}