akfun 5.1.5 → 5.1.7

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": "5.1.5",
3
+ "version": "5.1.7",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
package/src/build.js CHANGED
@@ -10,7 +10,7 @@ const defaultConfig = require('./config/default.config');
10
10
  const deepMergeConfig = require('./utils/deepMergeConfig');
11
11
 
12
12
  // 构建脚本:一般用于构建生产环境的代码
13
- module.exports = function (BuildType, akfunConfig, _consoleTag) {
13
+ module.exports = function (BuildType, akfunConfig, _consoleTag, callbackFunc) {
14
14
  const consoleTag = _consoleTag || curConsoleTag;
15
15
  let config = projectConfig; // 默认使用执行命令目录下的配置数据
16
16
  if (akfunConfig) {
@@ -62,6 +62,11 @@ module.exports = function (BuildType, akfunConfig, _consoleTag) {
62
62
  }
63
63
 
64
64
  console.log(chalk.cyan(' 构建完成.\n'));
65
+
66
+ // 如果用户传入了回调函数,则执行回调函数
67
+ if (callbackFunc) {
68
+ callbackFunc(curEnvConfig);
69
+ }
65
70
  });
66
71
  });
67
72
  };
package/src/oss/aliBos.js CHANGED
@@ -4,9 +4,9 @@
4
4
  const BosClient = require('ali-oss');
5
5
 
6
6
  class aliBOS {
7
- constructor(endpoint, region, bucket, accessKeyId, accessKeySecret) {
7
+ constructor(endpoint, bucket, accessKeyId, accessKeySecret) {
8
8
  this.endpoint = endpoint;
9
- this.region = region;
9
+ // this.region = region;
10
10
  this.bucket = bucket;
11
11
  this.accessKeyId = accessKeyId;
12
12
  this.accessKeySecret = accessKeySecret;