chore: update dependencies and use less

This commit is contained in:
DIYgod 2022-08-15 18:09:13 +01:00
parent 6864587010
commit af4efc3182
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
20 changed files with 4953 additions and 2876 deletions

2
dist/DPlayer.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,8 @@
"main": "dist/DPlayer.min.js", "main": "dist/DPlayer.min.js",
"scripts": { "scripts": {
"start": "npm run dev", "start": "npm run dev",
"build": "cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --colors", "build": "cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config webpack/dev.config.js --watch --colors", "dev": "cross-env NODE_ENV=development webpack serve --config webpack/dev.config.js",
"test": "eslint src webpack", "test": "eslint src webpack",
"format": "eslint \"**/*.js\" --fix && prettier \"**/*.{js,json,md}\" --write", "format": "eslint \"**/*.js\" --fix && prettier \"**/*.{js,json,md}\" --write",
"format:staged": "eslint \"**/*.js\" --fix && pretty-quick --staged --verbose --pattern \"**/*.{js,json,md}\"", "format:staged": "eslint \"**/*.js\" --fix && pretty-quick --staged --verbose --pattern \"**/*.{js,json,md}\"",
@ -39,44 +39,46 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.6.0", "@babel/core": "^7.6.0",
"@babel/preset-env": "^7.4.5", "@babel/preset-env": "^7.4.5",
"@vuepress/plugin-back-to-top": "1.7.1", "@vuepress/plugin-back-to-top": "1.9.7",
"@vuepress/plugin-google-analytics": "1.7.1", "@vuepress/plugin-google-analytics": "1.9.7",
"@vuepress/plugin-pwa": "1.7.1", "@vuepress/plugin-pwa": "1.9.7",
"art-template": "4.13.2", "art-template": "4.13.2",
"art-template-loader": "1.4.3", "art-template-loader": "1.4.3",
"autoprefixer": "^9.6.1", "autoprefixer": "^10.4.8",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"cross-env": "^7.0.0", "cross-env": "^7.0.0",
"css-loader": "^5.0.0", "css-loader": "^6.7.1",
"cssnano": "^4.1.10", "cssnano": "^5.1.13",
"eslint": "^7.0.0", "eslint": "^8.22.0",
"eslint-config-prettier": "^6.3.0", "eslint-config-prettier": "^8.5.0",
"eslint-loader": "^4.0.0", "eslint-loader": "^4.0.0",
"eslint-plugin-prettier": "^3.1.1", "eslint-plugin-prettier": "^4.2.1",
"exports-loader": "^1.0.0", "exports-loader": "^4.0.0",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",
"git-revision-webpack-plugin": "^3.0.3", "git-revision-webpack-plugin": "^5.0.0",
"mini-css-extract-plugin": "1.3.0", "less": "^4.1.3",
"node-sass": "^5.0.0", "less-loader": "^11.0.0",
"postcss-loader": "^3.0.0", "mini-css-extract-plugin": "2.6.1",
"postcss": "^8.4.16",
"postcss-loader": "^7.0.1",
"postcss-preset-env": "^7.7.2",
"prettier": "^2.0.4", "prettier": "^2.0.4",
"prettier-check": "^2.0.0", "prettier-check": "^2.0.0",
"pretty-quick": "^3.0.0", "pretty-quick": "^3.0.0",
"sass-loader": "^10.0.0",
"strip-loader": "^0.1.2", "strip-loader": "^0.1.2",
"style-loader": "^2.0.0", "style-loader": "^3.3.1",
"svg-inline-loader": "0.8.2", "svg-inline-loader": "0.8.2",
"template-string-optimize-loader": "^3.0.0", "template-string-optimize-loader": "^3.0.0",
"url-loader": "^4.1.0", "url-loader": "^4.1.0",
"vuepress": "1.7.1", "vuepress": "1.9.7",
"webpack": "^4.40.2", "webpack": "^5.74.0",
"webpack-cli": "3.3.12", "webpack-cli": "4.10.0",
"webpack-dev-server": "^3.8.1", "webpack-dev-server": "^4.10.0",
"yorkie": "^2.0.0" "yorkie": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"axios": "0.21.0", "axios": "0.27.2",
"balloon-css": "^1.0.3", "balloon-css": "^1.0.3",
"promise-polyfill": "8.2.0" "promise-polyfill": "8.2.3"
} }
} }

View File

@ -60,11 +60,11 @@
animation: diplayer-loading-dot-fade .8s ease infinite; animation: diplayer-loading-dot-fade .8s ease infinite;
opacity: 0; opacity: 0;
transform-origin: 4px 4px; transform-origin: 4px 4px;
@for $i from 7 through 1 { each(range(7), {
&.diplayer-loading-dot-#{$i} { &.diplayer-loading-dot-@{value} {
animation-delay: .1s * $i; animation-delay: (@value * 0.1s);
} }
} });
} }
@keyframes diplayer-loading-dot-fade { @keyframes diplayer-loading-dot-fade {
0% { 0% {

View File

@ -1,4 +1,4 @@
import '../css/index.scss'; import '../css/index.less';
import DPlayer from './player'; import DPlayer from './player';
/* global DPLAYER_VERSION GIT_HASH */ /* global DPLAYER_VERSION GIT_HASH */

View File

@ -1,9 +1,7 @@
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const GitRevisionPlugin = require('git-revision-webpack-plugin'); const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin(); const gitRevisionPlugin = new GitRevisionPlugin();
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = { module.exports = {
mode: 'development', mode: 'development',
@ -26,7 +24,13 @@ module.exports = {
resolve: { resolve: {
modules: ['node_modules'], modules: ['node_modules'],
extensions: ['.js', '.scss'], extensions: ['.js', '.less'],
fallback: {
dgram: false,
fs: false,
net: false,
tls: false,
},
}, },
module: { module: {
@ -45,7 +49,7 @@ module.exports = {
], ],
}, },
{ {
test: /\.scss$/, test: /\.less$/,
use: [ use: [
'style-loader', 'style-loader',
{ {
@ -57,10 +61,12 @@ module.exports = {
{ {
loader: 'postcss-loader', loader: 'postcss-loader',
options: { options: {
plugins: [autoprefixer, cssnano], postcssOptions: {
plugins: ['postcss-preset-env'],
},
}, },
}, },
'sass-loader', 'less-loader',
], ],
}, },
{ {
@ -82,17 +88,11 @@ module.exports = {
}, },
devServer: { devServer: {
static: {
directory: path.join(__dirname, '..', 'demo'),
},
compress: true, compress: true,
contentBase: path.resolve(__dirname, '..', 'demo'),
clientLogLevel: 'none',
quiet: false,
open: true, open: true,
historyApiFallback: {
disableDotRule: true,
},
watchOptions: {
ignored: /node_modules/,
},
}, },
plugins: [ plugins: [
@ -102,13 +102,6 @@ module.exports = {
}), }),
], ],
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
},
performance: { performance: {
hints: false, hints: false,
}, },

View File

@ -1,9 +1,7 @@
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const GitRevisionPlugin = require('git-revision-webpack-plugin'); const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin(); const gitRevisionPlugin = new GitRevisionPlugin();
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = { module.exports = {
mode: 'production', mode: 'production',
@ -28,7 +26,13 @@ module.exports = {
resolve: { resolve: {
modules: ['node_modules'], modules: ['node_modules'],
extensions: ['.js', '.scss'], extensions: ['.js', '.less'],
fallback: {
dgram: false,
fs: false,
net: false,
tls: false,
},
}, },
module: { module: {
@ -48,7 +52,7 @@ module.exports = {
], ],
}, },
{ {
test: /\.scss$/, test: /\.less$/,
use: [ use: [
'style-loader', 'style-loader',
{ {
@ -60,10 +64,12 @@ module.exports = {
{ {
loader: 'postcss-loader', loader: 'postcss-loader',
options: { options: {
plugins: [autoprefixer, cssnano], postcssOptions: {
plugins: ['postcss-preset-env'],
},
}, },
}, },
'sass-loader', 'less-loader',
], ],
}, },
{ {
@ -90,11 +96,4 @@ module.exports = {
GIT_HASH: JSON.stringify(gitRevisionPlugin.version()), GIT_HASH: JSON.stringify(gitRevisionPlugin.version()),
}), }),
], ],
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
},
}; };

7699
yarn.lock

File diff suppressed because it is too large Load Diff