Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
c13081d8
Commit
c13081d8
authored
Jan 06, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
43e7e680
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
221 additions
and
254 deletions
+221
-254
a.json
a.json
+0
-173
package copy.json
package copy.json
+103
-0
package.json
package.json
+1
-0
run.js
run.js
+72
-70
webpack.online.config.js
webpackconfig/webpack.online.config.js
+34
-0
webpack.pro.config.js
webpackconfig/webpack.pro.config.js
+11
-11
No files found.
a.json
deleted
100644 → 0
View file @
43e7e680
{
"imageActionName"
:
"uploadimage"
,
"imageFieldName"
:
"upfile"
,
"imageMaxSize"
:
2048000
,
"imageAllowFiles"
:
[
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
],
"imageCompressEnable"
:
true
,
"imageCompressBorder"
:
1600
,
"imageInsertAlign"
:
"none"
,
"imageUrlPrefix"
:
""
,
"imagePathFormat"
:
"
\/
ueditor
\/
php
\/
upload
\/
image
\/
{yyyy}{mm}{dd}
\/
{time}{rand:6}"
,
"scrawlActionName"
:
"uploadscrawl"
,
"scrawlFieldName"
:
"upfile"
,
"scrawlPathFormat"
:
"
\/
ueditor
\/
php
\/
upload
\/
image
\/
{yyyy}{mm}{dd}
\/
{time}{rand:6}"
,
"scrawlMaxSize"
:
2048000
,
"scrawlUrlPrefix"
:
""
,
"scrawlInsertAlign"
:
"none"
,
"snapscreenActionName"
:
"uploadimage"
,
"snapscreenPathFormat"
:
"
\/
ueditor
\/
php
\/
upload
\/
image
\/
{yyyy}{mm}{dd}
\/
{time}{rand:6}"
,
"snapscreenUrlPrefix"
:
""
,
"snapscreenInsertAlign"
:
"none"
,
"catcherLocalDomain"
:
[
"127.0.0.1"
,
"localhost"
,
"img.baidu.com"
],
"catcherActionName"
:
"catchimage"
,
"catcherFieldName"
:
"source"
,
"catcherPathFormat"
:
"
\/
ueditor
\/
php
\/
upload
\/
image
\/
{yyyy}{mm}{dd}
\/
{time}{rand:6}"
,
"catcherUrlPrefix"
:
""
,
"catcherMaxSize"
:
2048000
,
"catcherAllowFiles"
:
[
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
],
"videoActionName"
:
"uploadvideo"
,
"videoFieldName"
:
"upfile"
,
"videoPathFormat"
:
"
\/
ueditor
\/
php
\/
upload
\/
video
\/
{yyyy}{mm}{dd}
\/
{time}{rand:6}"
,
"videoUrlPrefix"
:
""
,
"videoMaxSize"
:
102400000
,
"videoAllowFiles"
:
[
".flv"
,
".swf"
,
".mkv"
,
".avi"
,
".rm"
,
".rmvb"
,
".mpeg"
,
".mpg"
,
".ogg"
,
".ogv"
,
".mov"
,
".wmv"
,
".mp4"
,
".webm"
,
".mp3"
,
".wav"
,
".mid"
],
"fileActionName"
:
"uploadfile"
,
"fileFieldName"
:
"upfile"
,
"filePathFormat"
:
"
\/
ueditor
\/
php
\/
upload
\/
file
\/
{yyyy}{mm}{dd}
\/
{time}{rand:6}"
,
"fileUrlPrefix"
:
""
,
"fileMaxSize"
:
51200000
,
"fileAllowFiles"
:
[
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
,
".flv"
,
".swf"
,
".mkv"
,
".avi"
,
".rm"
,
".rmvb"
,
".mpeg"
,
".mpg"
,
".ogg"
,
".ogv"
,
".mov"
,
".wmv"
,
".mp4"
,
".webm"
,
".mp3"
,
".wav"
,
".mid"
,
".rar"
,
".zip"
,
".tar"
,
".gz"
,
".7z"
,
".bz2"
,
".cab"
,
".iso"
,
".doc"
,
".docx"
,
".xls"
,
".xlsx"
,
".ppt"
,
".pptx"
,
".pdf"
,
".txt"
,
".md"
,
".xml"
],
"imageManagerActionName"
:
"listimage"
,
"imageManagerListPath"
:
"
\/
ueditor
\/
php
\/
upload
\/
image
\/
"
,
"imageManagerListSize"
:
20
,
"imageManagerUrlPrefix"
:
""
,
"imageManagerInsertAlign"
:
"none"
,
"imageManagerAllowFiles"
:
[
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
],
"fileManagerActionName"
:
"listfile"
,
"fileManagerListPath"
:
"
\/
ueditor
\/
php
\/
upload
\/
file
\/
"
,
"fileManagerUrlPrefix"
:
""
,
"fileManagerListSize"
:
20
,
"fileManagerAllowFiles"
:
[
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
,
".flv"
,
".swf"
,
".mkv"
,
".avi"
,
".rm"
,
".rmvb"
,
".mpeg"
,
".mpg"
,
".ogg"
,
".ogv"
,
".mov"
,
".wmv"
,
".mp4"
,
".webm"
,
".mp3"
,
".wav"
,
".mid"
,
".rar"
,
".zip"
,
".tar"
,
".gz"
,
".7z"
,
".bz2"
,
".cab"
,
".iso"
,
".doc"
,
".docx"
,
".xls"
,
".xlsx"
,
".ppt"
,
".pptx"
,
".pdf"
,
".txt"
,
".md"
,
".xml"
]
}
\ No newline at end of file
package copy.json
0 → 100644
View file @
c13081d8
{
"name"
:
"dvatest"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"start"
:
"set OWNNER_ENV=dev&& webpack-dev-server --progress"
,
"lint"
:
"eslint --ext .js src"
,
"precommit"
:
"npm run lint"
,
"lib"
:
"webpack --config webpackconfig/webpack.dll.config.js --progress"
,
"test-build"
:
"set OWNNER_ENV=test&& webpack --config webpackconfig/webpack.test.config.js --progress"
,
"build"
:
"set OWNNER_ENV=pro&& webpack --config webpackconfig/webpack.pro.config.js --progress"
,
"pro-build"
:
"set OWNNER_ENV=pro&& webpack --config webpackconfig/webpack.online.config.js --progress"
,
"analyse"
:
"set OWNNER_ENV=pro && webpack --profile --json > stats.json --config webpackconfig/webpack.pro.config.js --progress"
},
"author"
:
""
,
"license"
:
"ISC"
,
"dependencies"
:
{
"@antv/data-set"
:
"^0.10.2"
,
"antd"
:
"^3.20.3"
,
"axios"
:
"^0.18.0"
,
"babel-plugin-import"
:
"^1.6.7"
,
"babel-polyfill"
:
"^6.26.0"
,
"base64toblob"
:
"^0.0.2"
,
"bizcharts"
:
"^3.5.5"
,
"bizcharts-plugin-slider"
:
"^2.1.1-beta.1"
,
"blueimp-md5"
:
"^2.10.0"
,
"bundle-loader"
:
"^0.5.6"
,
"clipboard"
:
"^2.0.4"
,
"co"
:
"^4.6.0"
,
"console-polyfill"
:
"^0.3.0"
,
"cropper"
:
"^3.1.4"
,
"dva"
:
"2.1.0"
,
"dva-loading"
:
"^1.0.4"
,
"dva-router-config"
:
"^1.1.0"
,
"echarts"
:
"^4.0.4"
,
"es3ify-loader"
:
"^0.2.0"
,
"es5-shim"
:
"^4.5.10"
,
"eventsource-polyfill"
:
"^0.9.6"
,
"fetch-ie8"
:
"^1.5.0"
,
"fetch-jsonp"
:
"^1.1.3"
,
"immutability-helper"
:
"^3.0.1"
,
"jquery"
:
"^3.3.1"
,
"js-base64"
:
"^2.5.1"
,
"lodash"
:
"^4.17.5"
,
"mini-css-extract-plugin"
:
"^0.8.0"
,
"mockjs"
:
"^1.0.1-beta3"
,
"path-to-regexp"
:
"^2.1.0"
,
"qrcode.react"
:
"^0.8.0"
,
"qs"
:
"^6.5.1"
,
"query-string"
:
"^6.8.3"
,
"rc-tree"
:
"^3.0.0-alpha.38"
,
"react"
:
"16.9.0"
,
"react-addons-perf"
:
"^15.4.2"
,
"react-dnd"
:
"^9.4.0"
,
"react-dnd-html5-backend"
:
"^9.4.0"
,
"react-dom"
:
"^16.2.0"
,
"react-slick"
:
"^0.25.2"
,
"video-react"
:
"^0.14.1"
,
"xlsx"
:
"^0.15.0"
},
"devDependencies"
:
{
"@babel/core"
:
"^7.6.4"
,
"@babel/plugin-proposal-class-properties"
:
"^7.5.5"
,
"@babel/plugin-transform-runtime"
:
"^7.6.2"
,
"@babel/preset-env"
:
"^7.6.3"
,
"babel-eslint"
:
"^10.0.3"
,
"babel-loader"
:
"^8.0.6"
,
"babel-preset-env"
:
"^1.7.0"
,
"babel-preset-es2015"
:
"7.0.0-beta.3"
,
"babel-preset-react"
:
"7.0.0-beta.3"
,
"child_process"
:
"^1.0.2"
,
"clean-webpack-plugin"
:
"^3.0.0"
,
"compression-webpack-plugin"
:
"^3.0.1"
,
"css-loader"
:
"^3.2.0"
,
"eslint"
:
"^6.5.1"
,
"eslint-config-airbnb"
:
"16.1.0"
,
"eslint-friendly-formatter"
:
"^4.0.1"
,
"eslint-loader"
:
"^3.0.2"
,
"eslint-plugin-import"
:
"^2.18.2"
,
"eslint-plugin-jsx-a11y"
:
"^6.2.3"
,
"eslint-plugin-react"
:
"^7.16.0"
,
"file-loader"
:
"^4.2.0"
,
"html-webpack-plugin"
:
"^3.2.0"
,
"inquirer"
:
"^7.0.1"
,
"jsx-loader"
:
"^0.13.2"
,
"less"
:
"^3.10.3"
,
"less-loader"
:
"^5.0.0"
,
"node-cmd"
:
"^3.0.0"
,
"node-run-cmd"
:
"^1.0.1"
,
"postcss-loader"
:
"^3.0.0"
,
"rxjs"
:
"^6.5.4"
,
"style-loader"
:
"^1.0.0"
,
"url-loader"
:
"^2.2.0"
,
"webpack"
:
"^4.41.2"
,
"webpack-alioss-plugin"
:
"^2.2.5"
,
"webpack-bundle-analyzer"
:
"^3.6.0"
,
"webpack-cli"
:
"^3.3.9"
,
"webpack-dev-server"
:
"^3.8.2"
,
"webpack-merge"
:
"^4.2.2"
}
}
package.json
View file @
c13081d8
...
...
@@ -11,6 +11,7 @@
"lib"
:
"webpack --config webpackconfig/webpack.dll.config.js --progress"
,
"test-build"
:
"set OWNNER_ENV=test&& webpack --config webpackconfig/webpack.test.config.js --progress"
,
"build"
:
"set OWNNER_ENV=pro&& webpack --config webpackconfig/webpack.pro.config.js --progress"
,
"pro-build"
:
"set OWNNER_ENV=pro&& webpack --config webpackconfig/webpack.online.config.js --progress"
,
"analyse"
:
"set OWNNER_ENV=pro && webpack --profile --json > stats.json --config webpackconfig/webpack.pro.config.js --progress"
},
"author"
:
""
,
...
...
run.js
View file @
c13081d8
// var inquirer = require('inquirer');
// var Rx = require('rxjs');
// var nodeCmd = require('node-cmd');
let
nodeCmd
=
require
(
'child_process'
);
// var prompts = new Rx.Subject();
// inquirer.prompt(prompts);
nodeCmd
.
exec
(
'npm run start'
);
// nodeCmd.run('npm run start');
// var prompList = [
// {
// type:'rawlist',
// message:'请选择您需要的打包指令',
// name:'cmd',
// choices: [
// {
// key: "A",
// name: "开发",
// value: "1"
// },
// {
// key: "B",
// name: "测试环境",
// value: "2"
// },
// {
// key: "C",
// name: "打包线上环境并【手动上线】",
// value: "3"
// },
// {
// key: "D",
// name: "打包线上环境并【自动上线】",
// value: "4"
// }
// ]
// }
// ]
var
inquirer
=
require
(
'inquirer'
);
var
Rx
=
require
(
'rxjs'
);
let
child_process
=
require
(
'child_process'
);
var
prompts
=
new
Rx
.
Subject
();
inquirer
.
prompt
(
prompts
);
var
prompList
=
[
{
type
:
'rawlist'
,
message
:
'请选择您需要的打包指令'
,
name
:
'cmd'
,
choices
:
[
{
key
:
"A"
,
name
:
"开发"
,
value
:
"1"
},
{
key
:
"B"
,
name
:
"测试环境"
,
value
:
"2"
},
{
key
:
"C"
,
name
:
"打包线上环境并【手动上线】"
,
value
:
"3"
},
{
key
:
"D"
,
name
:
"打包线上环境并【自动上线】"
,
value
:
"4"
}
]
}
]
// inquirer.prompt(prompList).then(answers=>{
// const { cmd } = answers;
// switch (Number(cmd)) {
// case 1:
// console.log('ssss');
// nodeCmd.run('npm run start');
// prompts.complete();
// // nodeCmd.run('set OWNNER_ENV=dev&& webpack-dev-server --progress');
// break;
// case 2:
// console.log(2, '2');
// break;
// case 3:
// console.log(3, '3');
// break;
// case 4:
// confirmPsd();
// break;
// }
// })
// function confirmPsd () {
// prompts.next({
// type: "password", // 密码为密文输入
// message: "请输入密码:",
// name: "pwd"
// }).then(res=>{
// if (res.pwd == 'shangjiadao') {
// console.log('密码正确')
// } else {
// console.log('密码错误');
// }
// });
// }
\ No newline at end of file
inquirer
.
prompt
(
prompList
).
then
(
answers
=>
{
const
{
cmd
}
=
answers
;
switch
(
Number
(
cmd
))
{
case
1
:
child_process
.
spawn
(
'npm.cmd'
,
[
'dev'
],
{
stdio
:
'inherit'
,
});
break
;
case
2
:
child_process
.
spawn
(
'npm.cmd'
,
[
'test-build'
],
{
stdio
:
'inherit'
,
});
break
;
case
3
:
child_process
.
spawn
(
'npm.cmd'
,
[
'build'
],
{
stdio
:
'inherit'
,
});
break
;
case
4
:
confirmPsd
();
break
;
}
})
function
confirmPsd
()
{
prompts
.
next
({
type
:
"password"
,
// 密码为密文输入
message
:
"请输入密码:"
,
name
:
"pwd"
}).
then
(
res
=>
{
if
(
res
.
pwd
==
'shangjiadao'
)
{
child_process
.
spawn
(
'npm.cmd'
,
[
'pro-build'
],
{
stdio
:
'inherit'
,
});
}
else
{
console
.
log
(
'密码错误'
);
}
});
}
\ No newline at end of file
webpackconfig/webpack.online.config.js
0 → 100644
View file @
c13081d8
const
webpackMerge
=
require
(
'webpack-merge'
);
const
baseconfig
=
require
(
'./webpack.base.config.js'
);
const
webpack
=
require
(
'webpack'
);
const
path
=
require
(
'path'
);
const
{
CleanWebpackPlugin
}
=
require
(
'clean-webpack-plugin'
);
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const
AliOSSPlugin
=
require
(
'webpack-alioss-plugin'
);
module
.
exports
=
webpackMerge
(
baseconfig
,
{
entry
:
path
.
resolve
(
__dirname
,
"../src/index.js"
),
output
:
{
path
:
path
.
resolve
(
__dirname
,
"../dist"
),
// string
publicPath
:
'https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/'
,
},
mode
:
'production'
,
plugins
:
[
// new BundleAnalyzerPlugin(),
new
AliOSSPlugin
({
auth
:
{
accessKeyId
:
'LTAI4FtdH3qGfmYDsS4v3rLQ'
,
// 在阿里 OSS 控制台获取
accessKeySecret
:
'97Twol7f03gRUM4kbwP8r1n1v0rNBZ'
,
// 在阿里 OSS 控制台获取
region
:
'oss-cn-hangzhou'
,
// OSS 服务节点, 示例: oss-cn-hangzhou
bucket
:
'shangjiadao'
,
// OSS 存储空间, 在阿里 OSS 控制台获取
},
removeMode
:
false
,
ossBaseDir
:
'qingxiao'
,
project
:
'biz/dist'
,
// 项目名(用于存放文件的直接目录)
}),
new
CleanWebpackPlugin
(),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
// manifest: require('../lib/vendor-manifest.json'),
// }),
],
});
\ No newline at end of file
webpackconfig/webpack.pro.config.js
View file @
c13081d8
...
...
@@ -14,17 +14,17 @@ module.exports = webpackMerge(baseconfig, {
mode
:
'production'
,
plugins
:
[
// new BundleAnalyzerPlugin(),
new
AliOSSPlugin
({
auth
:
{
accessKeyId
:
'LTAI4FtdH3qGfmYDsS4v3rLQ'
,
// 在阿里 OSS 控制台获取
accessKeySecret
:
'97Twol7f03gRUM4kbwP8r1n1v0rNBZ'
,
// 在阿里 OSS 控制台获取
region
:
'oss-cn-hangzhou'
,
// OSS 服务节点, 示例: oss-cn-hangzhou
bucket
:
'shangjiadao'
,
// OSS 存储空间, 在阿里 OSS 控制台获取
},
removeMode
:
false
,
ossBaseDir
:
'qingxiao'
,
project
:
'biz/dist'
,
// 项目名(用于存放文件的直接目录)
}),
//
new AliOSSPlugin({
//
auth: {
//
accessKeyId: 'LTAI4FtdH3qGfmYDsS4v3rLQ', // 在阿里 OSS 控制台获取
//
accessKeySecret: '97Twol7f03gRUM4kbwP8r1n1v0rNBZ', // 在阿里 OSS 控制台获取
//
region: 'oss-cn-hangzhou', // OSS 服务节点, 示例: oss-cn-hangzhou
//
bucket: 'shangjiadao', // OSS 存储空间, 在阿里 OSS 控制台获取
//
},
//
removeMode: false,
//
ossBaseDir: 'qingxiao',
//
project: 'biz/dist', // 项目名(用于存放文件的直接目录)
//
}),
new
CleanWebpackPlugin
(),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment