akfun 5.3.0 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/dev-server.js +10 -1
package/package.json
CHANGED
package/src/dev-server.js
CHANGED
|
@@ -14,7 +14,7 @@ const getDevWebpackConfig = require('./webpack/webpack.dev.conf');
|
|
|
14
14
|
const { curConsoleTag } = require('./utils/akfunParams');
|
|
15
15
|
|
|
16
16
|
// 构建脚本:一般用于构建开发环境的代码(包含热更新、接口代理等功能)
|
|
17
|
-
module.exports = function (akfunConfig, _consoleTag) {
|
|
17
|
+
module.exports = function (akfunConfig, _consoleTag, callbackFunc) {
|
|
18
18
|
const consoleTag = _consoleTag || curConsoleTag;
|
|
19
19
|
// 获取项目配置文件
|
|
20
20
|
let config = getProjectConfig(akfunConfig);
|
|
@@ -131,6 +131,15 @@ module.exports = function (akfunConfig, _consoleTag) {
|
|
|
131
131
|
open(`${projPath}${filename}.html`, { wait: true });
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
|
|
135
|
+
// 如果用户传入了回调函数,则执行回调函数
|
|
136
|
+
if (callbackFunc) {
|
|
137
|
+
callbackFunc({
|
|
138
|
+
config: curEnvConfig,
|
|
139
|
+
url: uri,
|
|
140
|
+
port: port
|
|
141
|
+
});
|
|
142
|
+
}
|
|
134
143
|
};
|
|
135
144
|
|
|
136
145
|
if (curEnvConfig.https) {
|