Upgrade deps
This commit is contained in:
parent
4a0355b7bb
commit
28f769495b
6 changed files with 5247 additions and 8567 deletions
4
.babelrc
4
.babelrc
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"presets": [
|
"presets": [
|
||||||
["env"]
|
"@babel/preset-env"
|
||||||
],
|
],
|
||||||
"plugins": ["syntax-dynamic-import", "transform-object-rest-spread"]
|
"plugins": ["@babel/plugin-syntax-dynamic-import", "@babel/plugin-proposal-object-rest-spread"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ production:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run prod
|
- npm run prod
|
||||||
- cp ./public/fr/index.html ./public/index.html
|
- cp ./public/fr/index.html ./public/index.html
|
||||||
|
- for f in $(find -type l);do cp --remove-destination $(readlink -f $f) $f;done;
|
||||||
- mkdir "${HOME}/.ssh"
|
- mkdir "${HOME}/.ssh"
|
||||||
- chmod 700 "${HOME}/.ssh"
|
- chmod 700 "${HOME}/.ssh"
|
||||||
- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
|
- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
|
||||||
|
|
12
app/index.js
12
app/index.js
|
@ -35,8 +35,8 @@ const lang = window.location.href
|
||||||
.substr(0, 2)
|
.substr(0, 2)
|
||||||
.toLowerCase() || defaultLocale;
|
.toLowerCase() || defaultLocale;
|
||||||
document.getElementsByTagName('html')[0].setAttribute('lang', lang);
|
document.getElementsByTagName('html')[0].setAttribute('lang', lang);
|
||||||
const userLang = navigator.languages ||
|
const userLang = navigator.languages
|
||||||
[navigator.language || navigator.userLanguage];
|
|| [navigator.language || navigator.userLanguage];
|
||||||
let defaultRouteLang = '';
|
let defaultRouteLang = '';
|
||||||
|
|
||||||
const messages = {};
|
const messages = {};
|
||||||
|
@ -107,8 +107,8 @@ for (let j = 0; j < userLang.length; j += 1) { // check if user locales
|
||||||
|
|
||||||
// Home redirection
|
// Home redirection
|
||||||
const currentURL = window.location.href.replace(/\/+$/, '');
|
const currentURL = window.location.href.replace(/\/+$/, '');
|
||||||
if ((currentURL.split('/')[3] === undefined || currentURL.split('/')[3] === process.env.BASE_URL) &&
|
if ((currentURL.split('/')[3] === undefined || currentURL.split('/')[3] === process.env.BASE_URL)
|
||||||
(currentURL.split('/')[4] === undefined)) {
|
&& (currentURL.split('/')[4] === undefined)) {
|
||||||
if (defaultRouteLang === '') {
|
if (defaultRouteLang === '') {
|
||||||
defaultRouteLang = defaultLocale;
|
defaultRouteLang = defaultLocale;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,9 @@ const i18n = new VueI18n({
|
||||||
});
|
});
|
||||||
|
|
||||||
// Framanav
|
// Framanav
|
||||||
if (!window.vuefsPrerender && document.querySelectorAll('script[src$="nav.js"]').length < 1) {
|
if (!window.vuefsPrerender
|
||||||
|
&& document.querySelectorAll('script[src$="nav.js"]').length < 1
|
||||||
|
&& process.env.NODE_ENV !== 'development') {
|
||||||
const navConfig = document.createElement('script');
|
const navConfig = document.createElement('script');
|
||||||
navConfig.innerHTML = 'l$ = { js: { j$: \'noConflict\' } }';
|
navConfig.innerHTML = 'l$ = { js: { j$: \'noConflict\' } }';
|
||||||
document.getElementsByTagName('head')[0].appendChild(navConfig);
|
document.getElementsByTagName('head')[0].appendChild(navConfig);
|
||||||
|
|
13716
package-lock.json
generated
13716
package-lock.json
generated
File diff suppressed because it is too large
Load diff
72
package.json
72
package.json
|
@ -13,49 +13,49 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
"bootstrap-sass": "^3.3.7",
|
"bootstrap-sass": "^3.3.7",
|
||||||
"fork-awesome": "^1.1.0",
|
"fork-awesome": "^1.1.5",
|
||||||
"uiv": "^0.23.1",
|
"uiv": "^0.28.0",
|
||||||
"vue": "^2.5.16",
|
"vue": "^2.5.16",
|
||||||
"vue-headful": "^2.0.1",
|
"vue-headful": "^2.0.1",
|
||||||
"vue-i18n": "^7.6.0",
|
"vue-i18n": "^8.4.0",
|
||||||
"vue-matomo": "^0.3.2",
|
"vue-matomo": "^0.3.2",
|
||||||
"vue-router": "^2.8.1"
|
"vue-router": "^3.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^8.2.0",
|
"@babel/core": "^7.2.0",
|
||||||
"babel-core": "^6.26.0",
|
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
|
||||||
"babel-eslint": "^8.2.2",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"babel-loader": "^7.1.4",
|
"@babel/preset-env": "^7.2.0",
|
||||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
"autoprefixer": "^9.4.2",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
"babel-eslint": "^10.0.1",
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-loader": "^8.0.4",
|
||||||
"copy-webpack-plugin": "^4.5.1",
|
"copy-webpack-plugin": "^4.6.0",
|
||||||
"cross-env": "^5.1.4",
|
"cross-env": "^5.2.0",
|
||||||
"css-hot-loader": "^1.3.9",
|
"css-hot-loader": "^1.4.2",
|
||||||
"css-loader": "^0.28.11",
|
"css-loader": "^1.0.1",
|
||||||
"eslint": "^4.19.1",
|
"eslint": "^5.9.0",
|
||||||
"eslint-config-airbnb-base": "^12.1.0",
|
"eslint-config-airbnb-base": "^13.1.0",
|
||||||
"eslint-loader": "^2.0.0",
|
"eslint-loader": "^2.1.1",
|
||||||
"eslint-plugin-filenames": "^1.2.0",
|
"eslint-plugin-filenames": "^1.3.2",
|
||||||
"eslint-plugin-html": "^4.0.2",
|
"eslint-plugin-html": "^5.0.0",
|
||||||
"eslint-plugin-import": "^2.9.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
"eslint-plugin-promise": "^3.7.0",
|
"eslint-plugin-promise": "^4.0.1",
|
||||||
"eslint-plugin-vue": "^4.4.0",
|
"eslint-plugin-vue": "^5.0.0",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^2.0.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"mini-css-extract-plugin": "^0.4.0",
|
"mini-css-extract-plugin": "^0.4.5",
|
||||||
"node-sass": "^4.8.3",
|
"node-sass": "^4.10.0",
|
||||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||||
"postcss-loader": "^2.1.5",
|
"postcss-loader": "^3.0.0",
|
||||||
"prerender-spa-plugin": "^3.0.0",
|
"prerender-spa-plugin": "^3.4.0",
|
||||||
"sass-loader": "^6.0.7",
|
"sass-loader": "^7.1.0",
|
||||||
"style-loader": "^0.20.3",
|
"style-loader": "^0.23.1",
|
||||||
"uglifyjs-webpack-plugin": "^1.2.4",
|
"terser-webpack-plugin": "^1.1.0",
|
||||||
"vue-loader": "^14.2.2",
|
"vue-loader": "^15.4.2",
|
||||||
"vue-template-compiler": "^2.5.16",
|
"vue-template-compiler": "^2.5.16",
|
||||||
"webpack": "^4.8.3",
|
"webpack": "^4.27.1",
|
||||||
"webpack-cli": "^2.1.3",
|
"webpack-cli": "^3.1.2",
|
||||||
"webpack-dev-server": "^3.1.4",
|
"webpack-dev-server": "^3.1.10",
|
||||||
"yaml-import-loader": "^1.3.6"
|
"yaml-import-loader": "^1.3.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const PrerenderSPAPlugin = require('prerender-spa-plugin');
|
const PrerenderSPAPlugin = require('prerender-spa-plugin');
|
||||||
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer;
|
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer;
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
|
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||||||
|
|
||||||
let root = (process.env.NODE_ENV === 'preview') ? `/${process.env.INIT_CWD.match(/([^\/]*)\/*$/)[1]}/` : '/';
|
let root = (process.env.NODE_ENV === 'preview') ? `/${process.env.INIT_CWD.match(/([^\/]*)\/*$/)[1]}/` : '/';
|
||||||
for (let i = 0; i < process.argv.length; i += 1) {
|
for (let i = 0; i < process.argv.length; i += 1) {
|
||||||
|
@ -50,6 +51,7 @@ let config = {
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: [
|
use: [
|
||||||
|
'vue-style-loader',
|
||||||
'css-hot-loader',
|
'css-hot-loader',
|
||||||
MiniCssExtractPlugin.loader,
|
MiniCssExtractPlugin.loader,
|
||||||
'css-loader',
|
'css-loader',
|
||||||
|
@ -85,6 +87,7 @@ let config = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new VueLoaderPlugin(),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: '[name].css',
|
filename: '[name].css',
|
||||||
chunkFilename: '[id].css',
|
chunkFilename: '[id].css',
|
||||||
|
@ -148,7 +151,7 @@ if (process.env.NODE_ENV === 'development') {
|
||||||
module.exports.devtool = '#source-map';
|
module.exports.devtool = '#source-map';
|
||||||
module.exports.optimization = {
|
module.exports.optimization = {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new UglifyJsPlugin({
|
new TerserPlugin({
|
||||||
cache: true,
|
cache: true,
|
||||||
parallel: true,
|
parallel: true,
|
||||||
sourceMap: true, // set to true if you want JS source maps
|
sourceMap: true, // set to true if you want JS source maps
|
||||||
|
@ -174,7 +177,7 @@ if (process.env.NODE_ENV === 'development') {
|
||||||
renderer: new Renderer({
|
renderer: new Renderer({
|
||||||
headless: true,
|
headless: true,
|
||||||
renderAfterDocumentEvent: 'render-event',
|
renderAfterDocumentEvent: 'render-event',
|
||||||
maxConcurrentRoutes: 4,
|
maxConcurrentRoutes: 1,
|
||||||
injectProperty: 'vuefsPrerender',
|
injectProperty: 'vuefsPrerender',
|
||||||
inject: {
|
inject: {
|
||||||
prerender: true,
|
prerender: true,
|
||||||
|
|
Loading…
Reference in a new issue