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
+1 -3
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 = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/strongly-recommended',
'plugin:vue-a11y/base',
'eslint:recommended',
'@vue/standard'
],
plugins: [
'vue-a11y'
],
parserOptions: {
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: {
'generator-star-spacing': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/no-v-html': 'off',
'vue/require-default-prop': 'off',
'vue-a11y/label-has-for': 'off'
'no-console': prod ? 'warn' : 'off',
'no-debugger': prod ? 'warn' : 'off',
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: { max: 3, allowFirstLine: true }
}
],
'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",
"version": "1.1.0",
"description": "A Vuejs template using Webpack 4",
"main": "index.js",
"name": "en-francais",
"version": "0.1.0",
"license": "GPL-3.0",
"private": true,
"author": "Nicolas CHESNAIS",
"scripts": {
"dev": "webpack-dev-server --progress --config build/webpack.config.dev.js",
"prod": "webpack --config build/webpack.config.prod.js",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"test": "jest --config test/jest.config.js",
"test:debug": "node --inspect node_modules/.bin/jest --runInBand --config test/jest.config.js"
"dev": "vue-cli-service serve",
"prod": "vue-cli-service build",
"lint": "vue-cli-service lint --no-fix",
"lint:fix": "vue-cli-service lint"
},
"keywords": [
"Vue",
"Webpack 4"
],
"author": "Daniel Cook",
"license": "MIT",
"dependencies": {
"@popperjs/core": "^2.4.4",
"axios": "^0.18.1",
"vue": "^2.6.10",
"vue-clipboard2": "^0.3.1",
"vue-infinite-loading": "^2.4.5",
"vue-meta": "^1.6.0",
"vue-router": "^3.1.3",
"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"
"axios": "^0.21.1",
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-meta": "^2.4.0",
"vue-router": "^3.2.0",
"vue2-touch-events": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"copy-webpack-plugin": "^5.0.4",
"css-loader": "^2.1.1",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-loader": "^2.2.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^8.0.1",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^5.2.3",
"eslint-plugin-vue-a11y": "0.0.28",
"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",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
"eslint-plugin-vue-a11y": "0.0.31",
"node-sass": "^4.12.0",
"sass-loader": "^7.3.1",
"style-loader": "^0.23.1",
"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"
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
}
}
+7 -2
View File
@@ -1,11 +1,16 @@
<!DOCTYPE html>
<html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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>
</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>
</body>
</html>
+13 -22
View File
@@ -1,31 +1,25 @@
<template>
<div id="root">
<header role="banner">
<div class="wrapper">
<h1
class="site-title"
tabindex="0"
>
<router-link :to="{ name:'home' }">En Français</router-link>
</h1>
</div>
<div id="app">
<header>
<h1>
<router-link :to="{ name: 'home' }">En Français</router-link>
</h1>
</header>
<section role="main-content">
<div class="wrapper">
<RouterView />
</div>
</section>
<footer role="tools">
<main id="main">
<router-view />
</main>
<footer>
<p>footer</p>
</footer>
</div>
</template>
<script>
// import { mapActions, mapState } from 'vuex'
export default {
name: 'App',
metaInfo: {
// if no subcomponents specify a metaInfo.title, this title will be used
title: 'Home',
@@ -40,7 +34,4 @@ export default {
</script>
<style lang="scss" scoped>
.container{
max-width: 1200px;
}
</style>
+2 -10
View File
@@ -1,23 +1,15 @@
import Vue from 'vue'
import router from './router'
import store from './store'
// import { sync } from 'vuex-router-sync'
import Meta from 'vue-meta'
import Vue2TouchEvents from 'vue2-touch-events'
import router from './router'
import store from './store'
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(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({
router,
+3 -11
View File
@@ -1,19 +1,11 @@
<template>
<div
id="home"
class="full-width"
>
<header>
<h1>En Français</h1>
</header>
<section>
<p>contenu</p>
</section>
<div class="home">
Home
</div>
</template>
<script>
export default {
name: 'Home'
}
</script>
+1 -1
View File
@@ -33,7 +33,7 @@ export default {
},
metaInfo () {
return {
title: `Not Found`
title: 'Not Found'
}
}
}
+8 -7
View File
@@ -1,10 +1,8 @@
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'
import NotFound from 'pages/NotFound'
Vue.use(Router)
Vue.use(VueRouter)
const routes = [
{
@@ -16,11 +14,14 @@ const routes = [
name: 'notfound',
path: '/404',
alias: '*',
component: NotFound
component: () => import(/* webpackChunkName: "404" */ '../pages/NotFound.vue')
}
]
export default new Router({
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
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/
}
}
}