create-umi 4.0.0-canary.20220615.1 → 4.0.0-canary.20220624.1
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/dist/index.js +4 -2
- package/package.json +3 -3
- package/templates/app/package.json.tpl +1 -1
- package/templates/app/src/layouts/index.tsx.tpl +0 -1
- package/templates/app/src/pages/docs.tsx +0 -2
- package/templates/app/src/pages/index.tsx +0 -1
- package/templates/max/package.json.tpl +1 -1
- package/templates/max/src/pages/Access/index.tsx +0 -1
- package/templates/max/src/pages/Home/index.tsx +0 -1
- package/templates/vue-app/.gitignore.tpl +11 -0
- package/templates/vue-app/.npmrc.tpl +1 -0
- package/templates/vue-app/.umirc.ts.tpl +4 -0
- package/templates/vue-app/package.json.tpl +17 -0
- package/templates/vue-app/src/assets/yay.jpg +0 -0
- package/templates/vue-app/src/layouts/index.vue +28 -0
- package/templates/vue-app/src/pages/docs.vue +5 -0
- package/templates/vue-app/src/pages/index.vue +11 -0
- package/templates/vue-app/tsconfig.json.tpl +6 -0
- package/templates/vue-app/typings.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -26,7 +26,8 @@ exports.default = async ({ cwd, args, }) => {
|
|
|
26
26
|
message: 'Pick Umi App Template',
|
|
27
27
|
choices: [
|
|
28
28
|
{ title: 'Simple App', value: 'app' },
|
|
29
|
-
{ title: '
|
|
29
|
+
{ title: 'Ant Design Pro', value: 'max' },
|
|
30
|
+
{ title: 'Vue Simple App', value: 'vue-app' },
|
|
30
31
|
],
|
|
31
32
|
initial: 0,
|
|
32
33
|
},
|
|
@@ -95,13 +96,14 @@ exports.default = async ({ cwd, args, }) => {
|
|
|
95
96
|
];
|
|
96
97
|
const target = name ? (0, path_1.join)(cwd, name) : cwd;
|
|
97
98
|
const templateName = args.plugin ? 'plugin' : appTemplate;
|
|
99
|
+
const version = require('../package').version;
|
|
98
100
|
const generator = new utils_1.BaseGenerator({
|
|
99
101
|
path: (0, path_1.join)(__dirname, '..', 'templates', templateName),
|
|
100
102
|
target,
|
|
101
103
|
data: args.default
|
|
102
104
|
? testData
|
|
103
105
|
: {
|
|
104
|
-
version:
|
|
106
|
+
version: version.includes('-canary.') ? version : `^${version}`,
|
|
105
107
|
npmClient,
|
|
106
108
|
registry,
|
|
107
109
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-umi",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20220624.1",
|
|
4
4
|
"description": "create-umi",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/create-umi#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "pnpm tsc",
|
|
23
23
|
"build:deps": "umi-scripts bundleDeps",
|
|
24
|
-
"dev": "pnpm build --
|
|
24
|
+
"dev": "pnpm build --watch",
|
|
25
25
|
"test": "umi-scripts jest-turbo"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@umijs/utils": "4.0.0-canary.
|
|
28
|
+
"@umijs/utils": "4.0.0-canary.20220624.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -2,7 +2,6 @@ import Guide from '@/components/Guide';
|
|
|
2
2
|
import { trim } from '@/utils/format';
|
|
3
3
|
import { PageContainer } from '@ant-design/pro-components';
|
|
4
4
|
import { useModel } from '@umijs/max';
|
|
5
|
-
import React from 'react';
|
|
6
5
|
import styles from './index.less';
|
|
7
6
|
|
|
8
7
|
export default () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
registry={{{ registry }}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"scripts": {
|
|
4
|
+
"dev": "umi dev",
|
|
5
|
+
"build": "umi build",
|
|
6
|
+
"postinstall": "umi setup",
|
|
7
|
+
"start": "npm run dev"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"vue": "^3.2.36",
|
|
11
|
+
"umi": "{{{ version }}}"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"typescript": "^4.1.2",
|
|
15
|
+
"@umijs/preset-vue": "{{{ version }}}"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="navs">
|
|
3
|
+
<ul>
|
|
4
|
+
<li>
|
|
5
|
+
<router-link to="/">Home</router-link>
|
|
6
|
+
</li>
|
|
7
|
+
<li>
|
|
8
|
+
<router-link to="/docs">Docs</router-link>
|
|
9
|
+
</li>
|
|
10
|
+
<li>
|
|
11
|
+
<a href="https://github.com/umijs/umi">Github</a>
|
|
12
|
+
</li>
|
|
13
|
+
</ul>
|
|
14
|
+
<router-view></router-view>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<style lang="less">
|
|
18
|
+
.navs {
|
|
19
|
+
ul {
|
|
20
|
+
padding: 0;
|
|
21
|
+
list-style: none;
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
li {
|
|
25
|
+
margin-right: 1em;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'umi/typings';
|