forked from nutomic/joinpeertube
Merge branch 'master' into 'master'
Fix duplicate text + Upgrade deps See merge request framasoft/peertube/joinpeertube!44
This commit is contained in:
commit
d9986df058
7 changed files with 6102 additions and 9422 deletions
4
.babelrc
4
.babelrc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"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 run prod
|
||||
- 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"
|
||||
- chmod 700 "${HOME}/.ssh"
|
||||
- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<li v-html="$t('faq.prez.libre.list[2]')"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body" v-else>
|
||||
<div class="panel-body" v-if="!/(pros|libre)/.test(key)">
|
||||
<p
|
||||
v-for="(p, index) in $t('faq.prez.' + key + '.text')"
|
||||
v-html="$t('faq.prez.' + key + '.text[' + index + ']')"
|
||||
|
|
12
app/index.js
12
app/index.js
|
@ -35,8 +35,8 @@ const lang = window.location.href
|
|||
.substr(0, 2)
|
||||
.toLowerCase() || defaultLocale;
|
||||
document.getElementsByTagName('html')[0].setAttribute('lang', lang);
|
||||
const userLang = navigator.languages ||
|
||||
[navigator.language || navigator.userLanguage];
|
||||
const userLang = navigator.languages
|
||||
|| [navigator.language || navigator.userLanguage];
|
||||
let defaultRouteLang = '';
|
||||
|
||||
const messages = {};
|
||||
|
@ -107,8 +107,8 @@ for (let j = 0; j < userLang.length; j += 1) { // check if user locales
|
|||
|
||||
// Home redirection
|
||||
const currentURL = window.location.href.replace(/\/+$/, '');
|
||||
if ((currentURL.split('/')[3] === undefined || currentURL.split('/')[3] === process.env.BASE_URL) &&
|
||||
(currentURL.split('/')[4] === undefined)) {
|
||||
if ((currentURL.split('/')[3] === undefined || currentURL.split('/')[3] === process.env.BASE_URL)
|
||||
&& (currentURL.split('/')[4] === undefined)) {
|
||||
if (defaultRouteLang === '') {
|
||||
defaultRouteLang = defaultLocale;
|
||||
}
|
||||
|
@ -124,7 +124,9 @@ const i18n = new VueI18n({
|
|||
});
|
||||
|
||||
// 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');
|
||||
navConfig.innerHTML = 'l$ = { js: { j$: \'noConflict\' } }';
|
||||
document.getElementsByTagName('head')[0].appendChild(navConfig);
|
||||
|
|
15288
package-lock.json
generated
15288
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": {
|
||||
"axios": "^0.18.0",
|
||||
"bootstrap-sass": "^3.3.7",
|
||||
"fork-awesome": "^1.1.0",
|
||||
"uiv": "^0.23.1",
|
||||
"fork-awesome": "^1.1.5",
|
||||
"uiv": "^0.28.0",
|
||||
"vue": "^2.5.16",
|
||||
"vue-headful": "^2.0.1",
|
||||
"vue-i18n": "^7.6.0",
|
||||
"vue-i18n": "^8.4.0",
|
||||
"vue-matomo": "^0.3.2",
|
||||
"vue-router": "^2.8.1"
|
||||
"vue-router": "^3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^8.2.0",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-eslint": "^8.2.2",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"copy-webpack-plugin": "^4.5.1",
|
||||
"cross-env": "^5.1.4",
|
||||
"css-hot-loader": "^1.3.9",
|
||||
"css-loader": "^0.28.11",
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-loader": "^2.0.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-html": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.9.0",
|
||||
"eslint-plugin-promise": "^3.7.0",
|
||||
"eslint-plugin-vue": "^4.4.0",
|
||||
"file-loader": "^1.1.11",
|
||||
"@babel/core": "^7.2.0",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/preset-env": "^7.2.0",
|
||||
"autoprefixer": "^9.4.2",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-loader": "^8.0.4",
|
||||
"copy-webpack-plugin": "^4.6.0",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-hot-loader": "^1.4.2",
|
||||
"css-loader": "^1.0.1",
|
||||
"eslint": "^5.9.0",
|
||||
"eslint-config-airbnb-base": "^13.1.0",
|
||||
"eslint-loader": "^2.1.1",
|
||||
"eslint-plugin-filenames": "^1.3.2",
|
||||
"eslint-plugin-html": "^5.0.0",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
"file-loader": "^2.0.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"mini-css-extract-plugin": "^0.4.0",
|
||||
"node-sass": "^4.8.3",
|
||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
||||
"postcss-loader": "^2.1.5",
|
||||
"prerender-spa-plugin": "^3.0.0",
|
||||
"sass-loader": "^6.0.7",
|
||||
"style-loader": "^0.20.3",
|
||||
"uglifyjs-webpack-plugin": "^1.2.4",
|
||||
"vue-loader": "^14.2.2",
|
||||
"mini-css-extract-plugin": "^0.4.5",
|
||||
"node-sass": "^4.10.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"prerender-spa-plugin": "^3.4.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^1.1.0",
|
||||
"vue-loader": "^15.4.2",
|
||||
"vue-template-compiler": "^2.5.16",
|
||||
"webpack": "^4.8.3",
|
||||
"webpack-cli": "^2.1.3",
|
||||
"webpack-dev-server": "^3.1.4",
|
||||
"webpack": "^4.27.1",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"webpack-dev-server": "^3.1.10",
|
||||
"yaml-import-loader": "^1.3.6"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
const PrerenderSPAPlugin = require('prerender-spa-plugin');
|
||||
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer;
|
||||
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 VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||||
|
||||
let root = (process.env.NODE_ENV === 'preview') ? `/${process.env.INIT_CWD.match(/([^\/]*)\/*$/)[1]}/` : '/';
|
||||
for (let i = 0; i < process.argv.length; i += 1) {
|
||||
|
@ -50,6 +51,7 @@ let config = {
|
|||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
'vue-style-loader',
|
||||
'css-hot-loader',
|
||||
MiniCssExtractPlugin.loader,
|
||||
'css-loader',
|
||||
|
@ -85,6 +87,7 @@ let config = {
|
|||
},
|
||||
},
|
||||
plugins: [
|
||||
new VueLoaderPlugin(),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[id].css',
|
||||
|
@ -148,7 +151,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||
module.exports.devtool = '#source-map';
|
||||
module.exports.optimization = {
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: true, // set to true if you want JS source maps
|
||||
|
@ -174,7 +177,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||
renderer: new Renderer({
|
||||
headless: true,
|
||||
renderAfterDocumentEvent: 'render-event',
|
||||
maxConcurrentRoutes: 4,
|
||||
maxConcurrentRoutes: 1,
|
||||
injectProperty: 'vuefsPrerender',
|
||||
inject: {
|
||||
prerender: true,
|
||||
|
|
Loading…
Reference in a new issue