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 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: 'Enterprise App', value: 'max' },
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: require('../package').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.20220615.1",
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 -- --watch",
24
+ "dev": "pnpm build --watch",
25
25
  "test": "umi-scripts jest-turbo"
26
26
  },
27
27
  "dependencies": {
28
- "@umijs/utils": "4.0.0-canary.20220615.1"
28
+ "@umijs/utils": "4.0.0-canary.20220624.1"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
@@ -7,7 +7,7 @@
7
7
  "start": "npm run dev"
8
8
  },
9
9
  "dependencies": {
10
- "umi": "^{{{ version }}}"
10
+ "umi": "{{{ version }}}"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/react": "^18.0.0",
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { Link, Outlet } from 'umi';
3
2
  import styles from './index.less';
4
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  export default () => {
4
2
  return (
5
3
  <div>
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import yayJpg from '../assets/yay.jpg';
3
2
 
4
3
  export default function HomePage() {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@ant-design/icons": "^4.7.0",
11
11
  "@ant-design/pro-components": "^1.1.3",
12
- "@umijs/max": "^{{{ version }}}",
12
+ "@umijs/max": "{{{ version }}}",
13
13
  "antd": "^4.20.7"
14
14
  },
15
15
  "devDependencies": {
@@ -1,7 +1,6 @@
1
1
  import { PageContainer } from '@ant-design/pro-components';
2
2
  import { Access, useAccess } from '@umijs/max';
3
3
  import { Button } from 'antd';
4
- import React from 'react';
5
4
 
6
5
  export default () => {
7
6
  const access = useAccess();
@@ -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,11 @@
1
+ /node_modules
2
+ /.env.local
3
+ /.umirc.local.ts
4
+ /config/config.local.ts
5
+ /src/.umi
6
+ /src/.umi-production
7
+ /.umi
8
+ /.umi-production
9
+ /.umi-test
10
+ /dist
11
+ /.mfsu
@@ -0,0 +1 @@
1
+ registry={{{ registry }}}
@@ -0,0 +1,4 @@
1
+ export default {
2
+ npmClient: '{{{ npmClient }}}',
3
+ presets: [require.resolve('@umijs/preset-vue')],
4
+ };
@@ -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
+ }
@@ -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,5 @@
1
+ <template>
2
+ <div>
3
+ <p>This is umi docs.</p>
4
+ </div>
5
+ </template>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div>
3
+ <h2>Yay! Welcome to umi ❤️ vue!</h2>
4
+ <p>
5
+ <img src="../assets/yay.jpg" width="388" />
6
+ </p>
7
+ <p>
8
+ To get started, edit <code>pages/index.vue</code> and save to reload.
9
+ </p>
10
+ </div>
11
+ </template>
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./src/.umi/tsconfig.json",
3
+ "compilerOptions": {
4
+ "jsx": "preserve"
5
+ }
6
+ }
@@ -0,0 +1 @@
1
+ import 'umi/typings';