create-umi 4.0.0-rc.10 → 4.0.0-rc.13

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
@@ -22,7 +22,7 @@ const testData = {
22
22
  registry: 'https://registry.npmjs.org/',
23
23
  };
24
24
  exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function* () {
25
- const [_, name] = args._;
25
+ const [name] = args._;
26
26
  let npmClient = 'pnpm';
27
27
  let registry = 'https://registry.npmjs.org/';
28
28
  // test ignore prompts
@@ -86,9 +86,10 @@ exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function
86
86
  message: `Which organization is your plugin stored under github?`,
87
87
  },
88
88
  ];
89
+ const target = name ? (0, path_1.join)(cwd, name) : cwd;
89
90
  const generator = new utils_1.BaseGenerator({
90
91
  path: (0, path_1.join)(__dirname, '..', 'templates', args.plugin ? 'plugin' : 'app'),
91
- target: name ? (0, path_1.join)(cwd, name) : cwd,
92
+ target,
92
93
  data: args.default
93
94
  ? testData
94
95
  : {
@@ -101,6 +102,6 @@ exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function
101
102
  yield generator.run();
102
103
  if (!args.default) {
103
104
  // install
104
- (0, utils_1.installWithNpmClient)({ npmClient });
105
+ (0, utils_1.installWithNpmClient)({ npmClient, cwd: target });
105
106
  }
106
107
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-umi",
3
- "version": "4.0.0-rc.10",
3
+ "version": "4.0.0-rc.13",
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",
@@ -25,7 +25,7 @@
25
25
  "test": "jest -c ../../jest.turbo.config.ts"
26
26
  },
27
27
  "dependencies": {
28
- "@umijs/utils": "4.0.0-rc.10"
28
+ "@umijs/utils": "4.0.0-rc.13"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
File without changes
File without changes
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
+ import yayJpg from '../assets/yay.jpg';
2
3
 
3
4
  export default function HomePage() {
4
5
  return (
5
6
  <div>
6
7
  <h2>Yay! Welcome to umi!</h2>
7
8
  <p>
8
- <img src={require('../assets/yay.jpg')} width="388" />
9
+ <img src={yayJpg} width="388" />
9
10
  </p>
10
11
  <p>
11
12
  To get started, edit <code>pages/index.tsx</code> and save to reload.
@@ -1,3 +1,6 @@
1
1
  declare module '*.less';
2
2
  declare module '*.css';
3
+ declare module '*.sass';
4
+ declare module '*.scss';
3
5
  declare module '*.png';
6
+ declare module '*.jpg';