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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/dev-server.js +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
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) {