akfun 3.1.5 → 3.1.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
package/src/dev-server.js CHANGED
@@ -127,10 +127,10 @@ module.exports = function (akfunConfig, _consoleTag) {
127
127
  console.info(
128
128
  `当前运行脚本:\n ${projPath}${filename}.js\n当前运行样式[可能不存在]:\n${projPath}${filename}.css`
129
129
  );
130
- }
131
- // 是否自动打开浏览器并跳到项目首页
132
- if (!config.dev.closeHtmlWebpackPlugin && autoOpenBrowser) {
133
- open(`${projPath}${filename}.html`, { wait: true });
130
+ // 是否自动打开浏览器并跳转到第一个入口页面
131
+ if (!config.dev.closeHtmlWebpackPlugin && autoOpenBrowser) {
132
+ open(`${projPath}${filename}.html`, { wait: true });
133
+ }
134
134
  }
135
135
  server = app.listen(port);
136
136
  _resolve();
@@ -7,10 +7,20 @@ module.exports = (_projectDir) => {
7
7
  curProjectDir.push(resolveToCurrentRoot('./src'));
8
8
  } else if (isArray(_projectDir)) {
9
9
  _projectDir.forEach((dir) => {
10
- curProjectDir.push(resolveToCurrentRoot(dir));
10
+ if (dir.indexOf('/') === 0) {
11
+ // 判断是否是绝对路径
12
+ curProjectDir.push(dir);
13
+ } else {
14
+ curProjectDir.push(resolveToCurrentRoot(dir));
15
+ }
11
16
  });
12
17
  } else if (isString(_projectDir)) {
13
- curProjectDir.push(resolveToCurrentRoot(_projectDir));
18
+ if (_projectDir.indexOf('/') === 0) {
19
+ // 判断是否是绝对路径
20
+ curProjectDir.push(_projectDir);
21
+ } else {
22
+ curProjectDir.push(resolveToCurrentRoot(_projectDir));
23
+ }
14
24
  }
15
25
  return curProjectDir;
16
26
  };