Move to webpack-vue-config
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
parent
7f771fdfef
commit
f08abfca9b
|
@ -5,7 +5,7 @@ module.exports = {
|
||||||
OC: false,
|
OC: false,
|
||||||
OCA: false,
|
OCA: false,
|
||||||
moment: true,
|
moment: true,
|
||||||
$appVersion: true,
|
appVersion: true,
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
'@nextcloud',
|
'@nextcloud',
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
|
@ -10,9 +10,9 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/nextcloud/tasks",
|
"homepage": "https://github.com/nextcloud/tasks",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "NODE_ENV=production webpack --progress --config webpack.prod.js",
|
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||||
"dev": "NODE_ENV=development webpack --config webpack.dev.js",
|
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
||||||
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.dev.js",
|
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
||||||
"lint": "eslint --ext .js,.vue src tests",
|
"lint": "eslint --ext .js,.vue src tests",
|
||||||
"lint:fix": "eslint --ext .js,.vue src tests --fix",
|
"lint:fix": "eslint --ext .js,.vue src tests --fix",
|
||||||
"stylelint": "stylelint 'css/src/**/*.scss'",
|
"stylelint": "stylelint 'css/src/**/*.scss'",
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
"@nextcloud/browserslist-config": "^2.1.0",
|
"@nextcloud/browserslist-config": "^2.1.0",
|
||||||
"@nextcloud/eslint-config": "^5.0.0",
|
"@nextcloud/eslint-config": "^5.0.0",
|
||||||
"@nextcloud/eslint-plugin": "^2.0.0",
|
"@nextcloud/eslint-plugin": "^2.0.0",
|
||||||
|
"@nextcloud/webpack-vue-config": "^4.0.1",
|
||||||
"babel-core": "^7.0.0-bridge.0",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"babel-jest": "^26.6.3",
|
"babel-jest": "^26.6.3",
|
||||||
"babel-loader": "^8.2.2",
|
"babel-loader": "^8.2.2",
|
||||||
|
@ -81,21 +82,26 @@
|
||||||
"eslint-plugin-promise": "^4.3.1",
|
"eslint-plugin-promise": "^4.3.1",
|
||||||
"eslint-plugin-standard": "^5.0.0",
|
"eslint-plugin-standard": "^5.0.0",
|
||||||
"eslint-plugin-vue": "^7.8.0",
|
"eslint-plugin-vue": "^7.8.0",
|
||||||
|
"eslint-webpack-plugin": "^2.5.3",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-environment-jsdom-sixteen": "^1.0.3",
|
"jest-environment-jsdom-sixteen": "^1.0.3",
|
||||||
"jest-serializer-vue": "^2.0.2",
|
"jest-serializer-vue": "^2.0.2",
|
||||||
"mockdate": "^3.0.5",
|
"mockdate": "^3.0.5",
|
||||||
|
"node-polyfill-webpack-plugin": "^1.1.0",
|
||||||
"node-sass": "^5.0.0",
|
"node-sass": "^5.0.0",
|
||||||
"prettier-eslint": "^12.0.0",
|
"prettier-eslint": "^12.0.0",
|
||||||
"raw-loader": "^4.0.2",
|
"raw-loader": "^4.0.2",
|
||||||
|
"sass": "^1.32.8",
|
||||||
"sass-loader": "^11.0.1",
|
"sass-loader": "^11.0.1",
|
||||||
|
"style-loader": "^2.0.0",
|
||||||
"stylelint": "^13.12.0",
|
"stylelint": "^13.12.0",
|
||||||
"stylelint-config-recommended-scss": "^4.2.0",
|
"stylelint-config-recommended-scss": "^4.2.0",
|
||||||
"stylelint-scss": "^3.19.0",
|
"stylelint-scss": "^3.19.0",
|
||||||
"stylelint-webpack-plugin": "^2.1.1",
|
"stylelint-webpack-plugin": "^2.1.1",
|
||||||
"svg-sprite": "^1.5.0",
|
"svg-sprite": "^1.5.0",
|
||||||
"terser-webpack-plugin": "^5.1.1",
|
"terser-webpack-plugin": "^5.1.1",
|
||||||
|
"url-loader": "^4.1.1",
|
||||||
"vue-jest": "^3.0.7",
|
"vue-jest": "^3.0.7",
|
||||||
"vue-loader": "^15.9.6",
|
"vue-loader": "^15.9.6",
|
||||||
"vue-template-compiler": "^2.6.12",
|
"vue-template-compiler": "^2.6.12",
|
||||||
|
|
|
@ -69,7 +69,7 @@ Vue.prototype.t = Vue.prototype.$t
|
||||||
Vue.prototype.n = Vue.prototype.$n
|
Vue.prototype.n = Vue.prototype.$n
|
||||||
Vue.prototype.$OC = OC
|
Vue.prototype.$OC = OC
|
||||||
Vue.prototype.$OCA = OCA
|
Vue.prototype.$OCA = OCA
|
||||||
Vue.prototype.$appVersion = $appVersion
|
Vue.prototype.$appVersion = appVersion
|
||||||
|
|
||||||
OCA.Tasks.$t = Vue.prototype.$t
|
OCA.Tasks.$t = Vue.prototype.$t
|
||||||
OCA.Tasks.$n = Vue.prototype.$n
|
OCA.Tasks.$n = Vue.prototype.$n
|
||||||
|
|
|
@ -641,8 +641,7 @@ const actions = {
|
||||||
if (taskData.calendar.readOnly) {
|
if (taskData.calendar.readOnly) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const task = new Task('BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Nextcloud Tasks v' + this._vm.$appVersion + '\nEND:VCALENDAR', taskData.calendar)
|
||||||
const task = new Task('BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Nextcloud Tasks v' + $appVersion + '\nEND:VCALENDAR', taskData.calendar)
|
|
||||||
|
|
||||||
task.created = ICAL.Time.now()
|
task.created = ICAL.Time.now()
|
||||||
task.summary = taskData.summary
|
task.summary = taskData.summary
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
script('tasks', 'tasks');
|
script('tasks', 'tasks-main');
|
||||||
style('tasks', 'tasks');
|
style('tasks', 'tasks');
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
const path = require('path')
|
|
||||||
const webpack = require('webpack')
|
|
||||||
const { VueLoaderPlugin } = require('vue-loader')
|
|
||||||
const StyleLintPlugin = require('stylelint-webpack-plugin')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
entry: path.join(__dirname, 'src', 'main.js'),
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, './js'),
|
|
||||||
publicPath: '/js/',
|
|
||||||
filename: 'tasks.js'
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
test: /\.css$/,
|
|
||||||
use: ['vue-style-loader', 'css-loader']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.scss$/,
|
|
||||||
use: ['vue-style-loader', 'css-loader', 'sass-loader']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /src\/.*\.(js|vue)$/,
|
|
||||||
use: 'eslint-loader',
|
|
||||||
enforce: 'pre'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.vue$/,
|
|
||||||
loader: 'vue-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
use: {
|
|
||||||
loader: 'babel-loader',
|
|
||||||
options: {
|
|
||||||
plugins: [
|
|
||||||
'@babel/plugin-syntax-dynamic-import',
|
|
||||||
'@babel/plugin-proposal-object-rest-spread'
|
|
||||||
],
|
|
||||||
presets: ['@babel/preset-env']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exclude: /node_modules\/(?!(p-limit|p-defer|p-queue|p-try|cdav-library))/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(png|jpg|gif|svg)$/,
|
|
||||||
loader: 'file-loader',
|
|
||||||
options: {
|
|
||||||
name: '[name].[ext]?[hash]'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
new VueLoaderPlugin(),
|
|
||||||
new StyleLintPlugin(),
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
$appVersion: JSON.stringify(require('./package.json').version)
|
|
||||||
})
|
|
||||||
],
|
|
||||||
resolve: {
|
|
||||||
extensions: ['*', '.js', '.vue', '.json']
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
const { merge } = require('webpack-merge')
|
|
||||||
const common = require('./webpack.common.js')
|
|
||||||
|
|
||||||
module.exports = merge(common, {
|
|
||||||
mode: 'development',
|
|
||||||
devServer: {
|
|
||||||
historyApiFallback: true,
|
|
||||||
noInfo: true,
|
|
||||||
overlay: true
|
|
||||||
},
|
|
||||||
devtool: 'cheap-source-map',
|
|
||||||
});
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||||
|
|
||||||
|
module.exports = webpackConfig
|
|
@ -1,17 +0,0 @@
|
||||||
const { merge } = require('webpack-merge')
|
|
||||||
const common = require('./webpack.common.js')
|
|
||||||
const TerserPlugin = require('terser-webpack-plugin')
|
|
||||||
|
|
||||||
module.exports = merge(common, {
|
|
||||||
mode: 'production',
|
|
||||||
devtool: 'source-map',
|
|
||||||
optimization: {
|
|
||||||
minimizer: [new TerserPlugin({
|
|
||||||
terserOptions: {
|
|
||||||
output: {
|
|
||||||
comments: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})],
|
|
||||||
}
|
|
||||||
});
|
|
Loading…
Reference in New Issue