create-umi 4.0.0-canary.20220628.2 → 4.0.0-canary.20220718.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/bin/create-umi.js CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ process.env.FS_LOGGER = 'none';
3
4
  require('../dist/cli');
package/dist/cli.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ declare const _default: ({ cwd, args, }: {
4
4
  args: yParser.Arguments;
5
5
  }) => Promise<void>;
6
6
  export default _default;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,OAAO,EACR,MAAM,cAAc,CAAC;;SAkBf,MAAM;UACL,QAAQ,SAAS;;AALzB,wBAuHE"}
package/dist/index.js CHANGED
@@ -17,6 +17,8 @@ exports.default = async ({ cwd, args, }) => {
17
17
  let npmClient = 'pnpm';
18
18
  let registry = 'https://registry.npmjs.org/';
19
19
  let appTemplate = 'app';
20
+ const { username, email } = await (0, utils_1.getGitInfo)();
21
+ let author = email && username ? `${username} <${email}>` : '';
20
22
  // test ignore prompts
21
23
  if (!args.default) {
22
24
  const response = await (0, utils_1.prompts)([
@@ -106,6 +108,7 @@ exports.default = async ({ cwd, args, }) => {
106
108
  version: version.includes('-canary.') ? version : `^${version}`,
107
109
  npmClient,
108
110
  registry,
111
+ author,
109
112
  },
110
113
  questions: args.default ? [] : args.plugin ? pluginPrompts : [],
111
114
  });
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-umi",
3
- "version": "4.0.0-canary.20220628.2",
3
+ "version": "4.0.0-canary.20220718.1",
4
4
  "description": "create-umi",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/create-umi#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -25,7 +25,7 @@
25
25
  "test": "umi-scripts jest-turbo"
26
26
  },
27
27
  "dependencies": {
28
- "@umijs/utils": "4.0.0-canary.20220628.2"
28
+ "@umijs/utils": "4.0.0-canary.20220718.1"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
@@ -4,8 +4,4 @@
4
4
  /config/config.local.ts
5
5
  /src/.umi
6
6
  /src/.umi-production
7
- /.umi
8
- /.umi-production
9
- /.umi-test
10
7
  /dist
11
- /.mfsu
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "private": true,
3
+ "author":"{{{ author }}}",
3
4
  "scripts": {
4
5
  "dev": "umi dev",
5
6
  "build": "umi build",
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ extends: require.resolve('@umijs/max/eslint'),
3
+ };
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npx --no-install max verify-commit $1
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npx --no-install lint-staged --quiet
@@ -0,0 +1,17 @@
1
+ {
2
+ "*.{md,json}": [
3
+ "prettier --cache --write"
4
+ ],
5
+ "*.{js,jsx}": [
6
+ "max lint --fix --eslint-only",
7
+ "prettier --cache --write"
8
+ ],
9
+ "*.{css,less}": [
10
+ "max lint --fix --stylelint-only",
11
+ "prettier --cache --write"
12
+ ],
13
+ "*.ts?(x)": [
14
+ "max lint --fix --eslint-only",
15
+ "prettier --cache --parser=typescript --write"
16
+ ]
17
+ }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ extends: require.resolve('@umijs/max/stylelint'),
3
+ };
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "private": true,
3
+ "author":"{{{ author }}}",
3
4
  "scripts": {
4
5
  "dev": "max dev",
5
6
  "build": "max build",
7
+ "format": "prettier --cache --write .",
8
+ "prepare": "husky install",
6
9
  "postinstall": "max setup",
7
10
  "setup": "max setup",
8
11
  "start": "npm run dev"
@@ -16,9 +19,11 @@
16
19
  "devDependencies": {
17
20
  "@types/react": "^18.0.0",
18
21
  "@types/react-dom": "^18.0.0",
19
- "typescript": "^4.1.2",
20
- "prettier": "^2",
22
+ "husky": "^8.0.1",
23
+ "lint-staged": "^13.0.3",
24
+ "prettier": "^2.7.1",
21
25
  "prettier-plugin-organize-imports": "^2",
22
- "prettier-plugin-packagejson": "^2"
26
+ "prettier-plugin-packagejson": "^2",
27
+ "typescript": "^4.1.2"
23
28
  }
24
29
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "{{{ name }}}",
3
+ "author":"{{{ author }}}",
3
4
  "version": "0.0.1",
4
5
  "description": "{{{ description }}}",
5
6
  "main": "lib/index.js",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "private": true,
3
+ "author":"{{{ author }}}",
3
4
  "scripts": {
4
5
  "dev": "umi dev",
5
6
  "build": "umi build",
@@ -15,14 +15,14 @@
15
15
  </div>
16
16
  </template>
17
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
- }
18
+ .navs {
19
+ ul {
20
+ padding: 0;
21
+ list-style: none;
22
+ display: flex;
27
23
  }
24
+ li {
25
+ margin-right: 1em;
26
+ }
27
+ }
28
28
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>
2
+ <div>
3
3
  <p>This is umi docs.</p>
4
4
  </div>
5
5
  </template>
@@ -4,8 +4,6 @@
4
4
  <p>
5
5
  <img src="../assets/yay.jpg" width="388" />
6
6
  </p>
7
- <p>
8
- To get started, edit <code>pages/index.vue</code> and save to reload.
9
- </p>
7
+ <p>To get started, edit <code>pages/index.vue</code> and save to reload.</p>
10
8
  </div>
11
9
  </template>