@mpxjs/cli 3.3.0 → 3.3.2
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/__tests__/preset.spec.js +24 -0
- package/lib/create.js +1 -1
- package/lib/prompts.js +1 -1
- package/package.json +1 -1
package/__tests__/preset.spec.js
CHANGED
|
@@ -28,6 +28,30 @@ test('normal', async () => {
|
|
|
28
28
|
expect(pkg.devDependencies).toHaveProperty('@mpxjs/vue-cli-plugin-mpx')
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
+
test('normal-didi', async () => {
|
|
32
|
+
const cwd = path.resolve(__dirname, '../../test')
|
|
33
|
+
const name = 'test-normal-didi'
|
|
34
|
+
await create(
|
|
35
|
+
name,
|
|
36
|
+
{
|
|
37
|
+
force: true,
|
|
38
|
+
git: false,
|
|
39
|
+
cwd
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
srcMode: 'dd',
|
|
43
|
+
description: 'test',
|
|
44
|
+
appid: 'dd-test',
|
|
45
|
+
cross: true,
|
|
46
|
+
plugins: {},
|
|
47
|
+
useConfigFiles: true
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
const pkg = require(path.resolve(cwd, name, 'package.json'))
|
|
52
|
+
expect(pkg.devDependencies).toHaveProperty('@mpxjs/vue-cli-plugin-mpx')
|
|
53
|
+
})
|
|
54
|
+
|
|
31
55
|
/**
|
|
32
56
|
* 非跨平台项目不生成static/ali目录
|
|
33
57
|
*/
|
package/lib/create.js
CHANGED
|
@@ -14,7 +14,6 @@ const loadRemotePreset = require('@vue/cli/lib/util/loadRemotePreset')
|
|
|
14
14
|
const loadLocalPreset = require('@vue/cli/lib/util/loadLocalPreset')
|
|
15
15
|
const { getPromptModules } = require('@vue/cli/lib/util/createTools')
|
|
16
16
|
const { clearConsole } = require('@vue/cli/lib/util/clearConsole')
|
|
17
|
-
const { linkBin } = require('@vue/cli/lib/util/linkBin')
|
|
18
17
|
const merge = require('lodash.merge')
|
|
19
18
|
const prompts = require('./prompts')
|
|
20
19
|
const builtInPreset = require('./preset')
|
|
@@ -174,6 +173,7 @@ async function create (projectName, options, preset = null) {
|
|
|
174
173
|
|
|
175
174
|
if (process.env.VUE_CLI_TEST || process.env.VUE_CLI_DEBUG) {
|
|
176
175
|
// 单测下,link bin文件到源码
|
|
176
|
+
const { linkBin } = require('@vue/cli/lib/util/linkBin')
|
|
177
177
|
creator.on('creation', ({ event }) => {
|
|
178
178
|
if (event === 'plugins-install') {
|
|
179
179
|
linkBin(
|
package/lib/prompts.js
CHANGED
package/package.json
CHANGED