@dcloudio/vue-cli-plugin-hbuilderx 2.0.1-alpha-34920220516002 → 2.0.1-alpha-34920220520001

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.
@@ -211,9 +211,11 @@ if (process.env.UNI_USING_V3_NATIVE) {
211
211
 
212
212
  if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
213
213
  plugins.push(new WebpackUniMPPlugin())
214
+ const assetsDir = 'static'
215
+ const hybridDir = 'hybrid/html'
214
216
  const array = [{
215
- from: path.resolve(process.env.UNI_INPUT_DIR, 'static'),
216
- to: 'static'
217
+ from: path.resolve(process.env.UNI_INPUT_DIR, assetsDir),
218
+ to: assetsDir
217
219
  }]
218
220
  // 自动化测试时,不启用androidPrivacy.json
219
221
  if (!process.env.UNI_AUTOMATOR_WS_ENDPOINT) {
@@ -225,14 +227,27 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
225
227
  })
226
228
  }
227
229
  }
228
- const hybridHtmlPath = path.resolve(process.env.UNI_INPUT_DIR, 'hybrid/html')
230
+ const hybridHtmlPath = path.resolve(process.env.UNI_INPUT_DIR, hybridDir)
229
231
  if (fs.existsSync(hybridHtmlPath)) {
230
232
  array.push({
231
233
  from: hybridHtmlPath,
232
- to: 'hybrid/html'
234
+ to: hybridDir
233
235
  })
234
236
  }
235
237
 
238
+ global.uniModules.forEach(module => {
239
+ const modules = 'uni_modules/'
240
+ const assets = modules + module + '/' + assetsDir
241
+ const hybrid = modules + module + hybridDir
242
+ array.push({
243
+ from: path.resolve(process.env.UNI_INPUT_DIR, assets),
244
+ to: assets
245
+ }, {
246
+ from: path.resolve(process.env.UNI_INPUT_DIR, hybrid),
247
+ to: hybrid
248
+ })
249
+ })
250
+
236
251
  if (process.env.UNI_USING_NVUE_COMPILER) {
237
252
  array.push({
238
253
  from: path.resolve(getTemplatePath(), 'common'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/vue-cli-plugin-hbuilderx",
3
- "version": "2.0.1-alpha-34920220516002",
3
+ "version": "2.0.1-alpha-34920220520001",
4
4
  "description": "HBuilderX plugin for vue-cli 3",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -18,5 +18,5 @@
18
18
  "css": "~2.2.1",
19
19
  "escodegen": "^1.8.1"
20
20
  },
21
- "gitHead": "535630187a5e30355c60b57489686c2bb8e61e11"
21
+ "gitHead": "a6779d21ec5926943cd9640dfcaf4158a45684ee"
22
22
  }
@@ -39,7 +39,9 @@ function transition (declaration) {
39
39
  map['transition-delay'].push((match[4] || '0s').trim())
40
40
  }
41
41
  for (var key in map) {
42
- result.push(generateDeclaration(key, map[key].join(', '), important, position))
42
+ var value = map[key]
43
+ value = value.find(item => item !== value[0]) ? value.join(', ') : value[0]
44
+ result.push(generateDeclaration(key, value, important, position))
43
45
  }
44
46
  }
45
47
  return result
@@ -73,6 +73,36 @@ describe('shorthand-parser', function () {
73
73
  value: '0s, 1s, 0s',
74
74
  position: {}
75
75
  }])
76
+
77
+ expect(shorthandParser([{
78
+ type: 'declaration',
79
+ property: 'transition',
80
+ value: 'width 2s, height 2s',
81
+ position: {}
82
+ }])).eql([{
83
+ type: 'declaration',
84
+ property: 'transition-property',
85
+ value: 'width, height',
86
+ position: {}
87
+ },
88
+ {
89
+ type: 'declaration',
90
+ property: 'transition-duration',
91
+ value: '2s',
92
+ position: {}
93
+ },
94
+ {
95
+ type: 'declaration',
96
+ property: 'transition-timing-function',
97
+ value: 'ease',
98
+ position: {}
99
+ },
100
+ {
101
+ type: 'declaration',
102
+ property: 'transition-delay',
103
+ value: '0s',
104
+ position: {}
105
+ }])
76
106
  })
77
107
 
78
108
  it('parse margin', function () {