mirror of
https://github.com/nextcloud/calendar.git
synced 2024-10-07 16:40:09 +02:00
Bump deps and use npm7
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
1b9535d3a9
commit
c6709c7f32
14 changed files with 20616 additions and 6758 deletions
|
@ -1 +0,0 @@
|
|||
/src/fonts
|
41
.stylelintrc
41
.stylelintrc
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"extends": "stylelint-config-recommended-scss",
|
||||
"rules": {
|
||||
"indentation": "tab",
|
||||
"selector-type-no-unknown": null,
|
||||
"number-leading-zero": null,
|
||||
"rule-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
"ignore": [
|
||||
"after-comment", "inside-block"
|
||||
]
|
||||
}
|
||||
],
|
||||
"declaration-empty-line-before": [
|
||||
"never",
|
||||
{
|
||||
"ignore": [
|
||||
"after-declaration"
|
||||
]
|
||||
}
|
||||
],
|
||||
"comment-empty-line-before": null,
|
||||
"selector-type-case": null,
|
||||
"selector-list-comma-newline-after": null,
|
||||
"no-descending-specificity": null,
|
||||
"string-quotes": "single",
|
||||
"selector-pseudo-element-no-unknown": [
|
||||
true,
|
||||
{
|
||||
"ignorePseudoElements": ["v-deep"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"stylelint-scss"
|
||||
],
|
||||
"ignoreFiles": [
|
||||
"css/public/*"
|
||||
]
|
||||
}
|
|
@ -1,11 +1,3 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
const babelConfig = require('@nextcloud/babel-config')
|
||||
|
||||
module.exports = babelConfig
|
||||
|
|
|
@ -101,7 +101,7 @@ class CalendarWidget implements IWidget {
|
|||
* @inheritDoc
|
||||
*/
|
||||
public function load(): void {
|
||||
\OCP\Util::addScript('calendar', 'dashboard');
|
||||
\OCP\Util::addScript('calendar', 'calendar-dashboard');
|
||||
|
||||
$this->initialStateService->provideLazyInitialState(Application::APP_ID, 'dashboard_data', function () {
|
||||
return $this->dataService;
|
||||
|
|
27069
package-lock.json
generated
27069
package-lock.json
generated
File diff suppressed because it is too large
Load diff
47
package.json
47
package.json
|
@ -24,9 +24,9 @@
|
|||
"license": "agpl",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack --config webpack.dev.js",
|
||||
"watch": "webpack --progress --watch --config webpack.dev.js",
|
||||
"build": "webpack --progress --config webpack.prod.js",
|
||||
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
||||
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"lint:fix": "eslint --ext .js,.vue src --fix",
|
||||
"stylelint": "stylelint src css",
|
||||
|
@ -83,48 +83,21 @@
|
|||
"npm": ">=7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.6",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/preset-env": "^7.14.7",
|
||||
"@nextcloud/browserslist-config": "^1.0.0",
|
||||
"@nextcloud/eslint-config": "^1.2.0",
|
||||
"@nextcloud/eslint-plugin": "^1.5.0",
|
||||
"@nextcloud/babel-config": "^1.0.0-beta.1",
|
||||
"@nextcloud/browserslist-config": "^2.1.0",
|
||||
"@nextcloud/eslint-config": "^5.1.0",
|
||||
"@nextcloud/stylelint-config": "^1.0.0-beta.0",
|
||||
"@nextcloud/webpack-vue-config": "^4.0.3",
|
||||
"@vue/test-utils": "^1.2.1",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-jest": "^27.0.5",
|
||||
"babel-loader": "^8.2.2",
|
||||
"css-loader": "^3.6.0",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"eslint-friendly-formatter": "^4.0.1",
|
||||
"eslint-loader": "^3.0.3",
|
||||
"eslint-plugin-import": "^2.23.4",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"eslint-plugin-standard": "^4.1.0",
|
||||
"eslint-plugin-vue": "^5.2.3",
|
||||
"file-loader": "^6.2.0",
|
||||
"babel-loader-exclude-node-modules-except": "^1.2.1",
|
||||
"iconfont-plugin-webpack": "^1.1.4",
|
||||
"jest": "^27.0.5",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"prettier-eslint": "^12.0.0",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"resolve-url-loader": "^4.0.0",
|
||||
"sass": "^1.35.1",
|
||||
"sass-loader": "^10.1.1",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-bare-webpack-plugin": "^2.1.0",
|
||||
"stylelint-config-recommended-scss": "^4.2.0",
|
||||
"stylelint-scss": "^3.19.0",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-jest": "^3.0.7",
|
||||
"vue-loader": "^15.9.7",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^4.7.2",
|
||||
"webpack-merge": "^5.8.0"
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "^2.3.2"
|
||||
|
|
|
@ -260,7 +260,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../fonts/scss/iconfont-calendar-app';
|
||||
@import '../fonts/scss/iconfont-calendar-app.scss';
|
||||
|
||||
.calendar-grid-checkbox {
|
||||
border-color: transparent;
|
||||
|
|
|
@ -281,7 +281,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../fonts/scss/iconfont-calendar-app';
|
||||
@import '../fonts/scss/iconfont-calendar-app.scss';
|
||||
|
||||
#calendar_panel {
|
||||
.vtodo-checkbox {
|
||||
|
|
3
stylelint.config.js
Normal file
3
stylelint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
const stylelintConfig = require('@nextcloud/stylelint-config')
|
||||
|
||||
module.exports = stylelintConfig
|
|
@ -19,5 +19,5 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
script('calendar', 'calendar');
|
||||
script('calendar', 'calendar-main');
|
||||
style('calendar', 'calendar');
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
|
||||
const IconfontPlugin = require('iconfont-plugin-webpack')
|
||||
|
||||
const md5 = require('md5')
|
||||
const appVersion = JSON.stringify(process.env.npm_package_version)
|
||||
const versionHash = md5(appVersion).substr(0, 7)
|
||||
const SCOPE_VERSION = JSON.stringify(versionHash)
|
||||
const ICONFONT_NAME = `iconfont-calendar-app-${versionHash}`
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
calendar: path.join(__dirname, 'src', 'main.js'),
|
||||
dashboard: path.join(__dirname, 'src', 'dashboard.js'),
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: 'chunks/calendar.[name].[contenthash].js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['vue-style-loader', 'css-loader', 'resolve-url-loader']
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
'vue-style-loader',
|
||||
'css-loader',
|
||||
'resolve-url-loader',
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
additionalData: `$scope_version:${SCOPE_VERSION};`,
|
||||
/**
|
||||
* ! needed for resolve-url-loader
|
||||
*/
|
||||
sourceMap: true,
|
||||
sassOptions: {
|
||||
sourceMapContents: false,
|
||||
includePaths: [
|
||||
path.resolve(__dirname, './src/assets'),
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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|calendar-js))/
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/i,
|
||||
loader: 'url-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new IconfontPlugin({
|
||||
src: './src/assets/iconfont',
|
||||
family: ICONFONT_NAME,
|
||||
dest: {
|
||||
font: './src/fonts/[family].[type]',
|
||||
css: './src/fonts/scss/iconfont-calendar-app.scss'
|
||||
},
|
||||
watch: {
|
||||
pattern: './src/assets/iconfont/*.svg'
|
||||
}
|
||||
}),
|
||||
new VueLoaderPlugin(),
|
||||
new webpack.IgnorePlugin(/^\.\/locale(s)?$/, /(moment)$/),
|
||||
new webpack.DefinePlugin({
|
||||
appVersion: JSON.stringify(require('./package.json').version)
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.vue', '.json'],
|
||||
symlinks: false,
|
||||
}
|
||||
}
|
|
@ -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',
|
||||
})
|
61
webpack.js
Normal file
61
webpack.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const md5 = require('md5')
|
||||
|
||||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
|
||||
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
|
||||
const IconfontPlugin = require('iconfont-plugin-webpack')
|
||||
|
||||
const appVersion = JSON.stringify(process.env.npm_package_version)
|
||||
|
||||
// Add dashboard entry
|
||||
webpackConfig.entry.dashboard = path.join(__dirname, 'src', 'dashboard.js')
|
||||
|
||||
// Edit JS rule
|
||||
webpackRules.RULE_JS.test = /\.m?js$/
|
||||
webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([
|
||||
'p-limit',
|
||||
'p-defer',
|
||||
'p-queue',
|
||||
'p-try',
|
||||
'cdav-library',
|
||||
'calendar-js',
|
||||
])
|
||||
|
||||
// Edit SCSS rule
|
||||
webpackRules.RULE_SCSS.use = [
|
||||
'vue-style-loader',
|
||||
'css-loader',
|
||||
'resolve-url-loader',
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
// ! needed for resolve-url-loader
|
||||
sourceMap: true,
|
||||
sassOptions: {
|
||||
sourceMapContents: false,
|
||||
includePaths: [
|
||||
path.resolve(__dirname, './src/assets'),
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
webpackConfig.plugins.push(
|
||||
new IconfontPlugin({
|
||||
src: './src/assets/iconfont',
|
||||
family: `iconfont-calendar-app-${md5(appVersion)}`,
|
||||
dest: {
|
||||
font: './src/fonts/[family].[type]',
|
||||
css: './src/fonts/scss/iconfont-calendar-app.scss'
|
||||
},
|
||||
watch: {
|
||||
pattern: './src/assets/iconfont/*.svg'
|
||||
}
|
||||
}),
|
||||
new webpack.IgnorePlugin(/^\.\/locale(s)?$/, /(moment)$/)
|
||||
)
|
||||
|
||||
module.exports = webpackConfig
|
|
@ -1,18 +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,
|
||||
}
|
||||
},
|
||||
sourceMap: true,
|
||||
})],
|
||||
}
|
||||
})
|
Loading…
Reference in a new issue