(name, opts)
| 1 | function Env(name, opts) { |
| 2 | return new (class { |
| 3 | constructor(name, opts) { |
| 4 | this.name = name |
| 5 | this.version = '1.7.5' |
| 6 | this.data = null |
| 7 | this.logs = [] |
| 8 | this.isMute = false |
| 9 | this.isNeedRewrite = false |
| 10 | this.logSeparator = '\n' |
| 11 | this.encoding = 'utf-8' |
| 12 | this.startTime = new Date().getTime() |
| 13 | Object.assign(this, opts) |
| 14 | this.log('', `🔔${this.name}, 开始!`) |
| 15 | } |
| 16 | |
| 17 | platform() { |
| 18 | if ('undefined' !== typeof $environment && $environment['surge-version']) |