diff --git a/dolphinscheduler-ui/build/webpack.config.dev.js b/dolphinscheduler-ui/build/webpack.config.dev.js index 1e95a91db6..015319d7cf 100644 --- a/dolphinscheduler-ui/build/webpack.config.dev.js +++ b/dolphinscheduler-ui/build/webpack.config.dev.js @@ -18,7 +18,6 @@ const webpack = require('webpack') const merge = require('webpack-merge') const { assetsDir, baseConfig } = require('./config') const ExtractTextPlugin = require('extract-text-webpack-plugin') -const ProgressPlugin = require('./../src/lib/@fedor/progress-webpack-plugin') const getEnv = require('env-parse').getEnv const config = merge.smart(baseConfig, { @@ -102,7 +101,6 @@ const config = merge.smart(baseConfig, { clientLogLevel: 'none' }, plugins: [ - new ProgressPlugin(), new webpack.HotModuleReplacementPlugin(), new ExtractTextPlugin({ filename: 'css/[name].css', allChunks: true }), new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].js' }), diff --git a/dolphinscheduler-ui/build/webpack.config.prod.js b/dolphinscheduler-ui/build/webpack.config.prod.js index 4a287feb8e..8f1479ca0c 100644 --- a/dolphinscheduler-ui/build/webpack.config.prod.js +++ b/dolphinscheduler-ui/build/webpack.config.prod.js @@ -22,7 +22,6 @@ const { baseConfig } = require('./config') const ExtractTextPlugin = require('extract-text-webpack-plugin') const UglifyJSPlugin = require('uglifyjs-webpack-plugin') const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin') -const ProgressPlugin = require('./../src/lib/@fedor/progress-webpack-plugin') const resolve = dir => path.resolve(__dirname, '..', dir) @@ -85,7 +84,6 @@ const config = merge.smart(baseConfig, { ] }, plugins: [ - new ProgressPlugin(), new ExtractTextPlugin({ filename: 'css/[name].[contenthash:7].css', allChunks: true }), new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].[hash:7].js' }), new webpack.optimize.OccurrenceOrderPlugin(), diff --git a/dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/lib/index.js b/dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/lib/index.js deleted file mode 100644 index fe6a111ee3..0000000000 --- a/dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/lib/index.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Add by allex to display compilation progress - */ -'use strict'; - -var _ = require('lodash'); -var webpack = require('webpack'); -var istty = process.env.MSYSTEM === 'MINGW64' || !!process.stdout.isTTY; -var print = process.stderr.write.bind(process.stderr); - -module.exports = function (options) { - options = _.merge({ profile: true }, options); - - var chars = 0, - lastState = void 0, - lastStateTime = void 0, - ts = void 0; - - return new webpack.ProgressPlugin(function (percentage, msg) { - var state = msg; - - if (percentage === 0) { - lastState = null; - lastStateTime = +new Date(); - ts = lastStateTime; - } - - if (percentage < 1) { - msg = Math.floor(percentage * 100) + '% ' + msg; - if (percentage < 1) { - msg = ' ' + msg; - } - if (percentage < 0.1) { - msg = ' ' + msg; - } - } - - if (options.profile) { - state = state.replace(/^\d+\/\d+\s+/, ''); - if (state !== lastState || percentage === 1) { - var now = +new Date(); - if (lastState) { - var stateMsg = now - lastStateTime + 'ms ' + lastState; - if (istty) { - goToLineStart(stateMsg); - print(stateMsg + '\n'); - } else { - print('>'); - } - chars = 0; - } - lastState = state; - lastStateTime = now; - } - } - - if (istty) { - goToLineStart(msg); - print(msg); - } else { - if (Date.now() - ts > 200) { - print('.'); - ts = Date.now(); - } - } - - if (percentage === 1) { - print('\n'); // completed. - } - }); - - function goToLineStart(nextMessage) { - var str = ''; - for (; chars > nextMessage.length; chars--) { - str += '\b \b'; - }chars = nextMessage.length; - for (var i = 0; i < chars; i++) { - str += '\b'; - }if (str) print(str); - } -}; \ No newline at end of file diff --git a/dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/package.json b/dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/package.json deleted file mode 100644 index bf828e94a7..0000000000 --- a/dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@fedor/progress-webpack-plugin", - "version": "1.0.0", - "description": "", - "main": "lib/index.js", - "scripts": { - "build": "babel -d lib/ src/", - "prepublish": "npm run build", - "test": "tap test/*.js", - "watch": "babel -w -d lib/ src/" - }, - "author": "allex", - "license": "ISC", - "dependencies": { - "lodash": "^4.17.4" - } -} diff --git a/dolphinscheduler-ui/src/lib/external/config.js b/dolphinscheduler-ui/src/lib/external/config.js index 717efc0201..ac47c1ac7c 100644 --- a/dolphinscheduler-ui/src/lib/external/config.js +++ b/dolphinscheduler-ui/src/lib/external/config.js @@ -2,6 +2,6 @@ * project external config */ export default { - // qianfan task record switch + // task record switch recordSwitch:false } \ No newline at end of file