@dcloudio/uni-cli-shared 2.0.1-alpha-35020220622001 → 2.0.1-alpha-35120220701001

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/lib/index.js CHANGED
@@ -58,8 +58,9 @@ const {
58
58
  nvueCssPreprocessOptions,
59
59
  nvueHtmlPreprocessOptions,
60
60
  getPlatformGlobal,
61
- getPlatformStat,
62
- getPlatformPush
61
+ getPlatformStat,
62
+ getPlatformPush,
63
+ getPlatformUniCloud
63
64
  } = require('./platform')
64
65
 
65
66
  module.exports = {
@@ -109,6 +110,7 @@ module.exports = {
109
110
  nvueCssPreprocessOptions,
110
111
  nvueHtmlPreprocessOptions,
111
112
  getPlatformGlobal,
112
- getPlatformStat,
113
- getPlatformPush
114
- }
113
+ getPlatformStat,
114
+ getPlatformPush,
115
+ getPlatformUniCloud
116
+ }
package/lib/platform.js CHANGED
@@ -175,6 +175,13 @@ module.exports = {
175
175
  }
176
176
  return ''
177
177
  },
178
+ getPlatformUniCloud () {
179
+ if (JSON.parse(process.env.UNI_CLOUD_PROVIDER || '[]').length) {
180
+ const uniCloudLibPath = '@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js'
181
+ return `import '${uniCloudLibPath}';`
182
+ }
183
+ return ''
184
+ },
178
185
  getBabelParserOptions () {
179
186
  return {
180
187
  sourceType: 'module',
@@ -192,4 +199,4 @@ module.exports = {
192
199
  ]
193
200
  }
194
201
  }
195
- }
202
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "2.0.1-alpha-35020220622001",
3
+ "version": "2.0.1-alpha-35120220701001",
4
4
  "description": "uni-cli-shared",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "postcss-urlrewrite": "^0.2.2",
24
24
  "strip-json-comments": "^2.0.1"
25
25
  },
26
- "gitHead": "6b44403801fbde4a876f39d05dd92188ace311a9"
26
+ "gitHead": "dcd912f6315b9dc3b7264bd357a6acb9bb62cf1b"
27
27
  }