create-umi 0.27.0 → 0.27.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.
@@ -46,8 +46,8 @@ class BasicGenerator extends Generator {
46
46
  dot: true,
47
47
  })
48
48
  .filter(filterFiles)
49
- .filter(file => !file.includes('welcomeImgs'))
50
- .forEach(file => {
49
+ .filter((file) => !file.includes('welcomeImgs'))
50
+ .forEach((file) => {
51
51
  debug(`copy ${file}`);
52
52
  const filePath = this.templatePath(file);
53
53
  if (statSync(filePath).isFile()) {
@@ -17,7 +17,7 @@ function log(...args) {
17
17
 
18
18
  function globList(patternList, options) {
19
19
  let fileList = [];
20
- patternList.forEach(pattern => {
20
+ patternList.forEach((pattern) => {
21
21
  fileList = [...fileList, ...glob.sync(pattern, options)];
22
22
  });
23
23
 
@@ -55,14 +55,14 @@ class AntDesignProGenerator extends BasicGenerator {
55
55
  default: 'simple',
56
56
  },
57
57
  ];
58
- return this.prompt(prompts).then(props => {
58
+ return this.prompt(prompts).then((props) => {
59
59
  this.prompts = props;
60
60
  });
61
61
  }
62
62
  }
63
63
 
64
64
  async writing() {
65
- const { language = 'TypeScript', allBlocks, } = this.prompts;
65
+ const { language = 'TypeScript', allBlocks } = this.prompts;
66
66
 
67
67
  const isTypeScript = language === 'TypeScript';
68
68
  const projectName = this.opts.name || this.opts.env.cwd;
@@ -79,6 +79,8 @@ class AntDesignProGenerator extends BasicGenerator {
79
79
  if (allBlocks === 'complete') {
80
80
  log(`🙈 complete mode can only use the version of antd@4`);
81
81
  gitArgs.push('--branch', 'all-blocks');
82
+ } else {
83
+ gitArgs.push('--branch', 'umi@3');
82
84
  }
83
85
 
84
86
  gitArgs.push(projectName);
@@ -135,7 +137,7 @@ class AntDesignProGenerator extends BasicGenerator {
135
137
 
136
138
  log('[JS] Clean up...');
137
139
  const removeTsFiles = globList(['tsconfig.json', '**/*.d.ts'], envOptions);
138
- removeTsFiles.forEach(filePath => {
140
+ removeTsFiles.forEach((filePath) => {
139
141
  const targetPath = path.resolve(projectPath, filePath);
140
142
  fs.removeSync(targetPath);
141
143
  });
@@ -172,7 +174,7 @@ class AntDesignProGenerator extends BasicGenerator {
172
174
  const ignoreFiles = pkg['create-umi'].ignore;
173
175
  const fileList = globList(ignoreFiles, envOptions);
174
176
 
175
- fileList.forEach(filePath => {
177
+ fileList.forEach((filePath) => {
176
178
  const targetPath = path.resolve(projectPath, filePath);
177
179
  fs.removeSync(targetPath);
178
180
  });
package/lib/run.js CHANGED
@@ -8,8 +8,8 @@ const yeoman = require('yeoman-environment');
8
8
 
9
9
  const generators = fs
10
10
  .readdirSync(`${__dirname}/generators`)
11
- .filter(f => !f.startsWith('.'))
12
- .map(f => {
11
+ .filter((f) => !f.startsWith('.'))
12
+ .map((f) => {
13
13
  return {
14
14
  name: `${f.padEnd(15)} - ${chalk.gray(require(`./generators/${f}/meta.json`).description)}`,
15
15
  value: f,
@@ -18,7 +18,7 @@ const generators = fs
18
18
  });
19
19
 
20
20
  const runGenerator = async (generatorPath, { name = '', cwd = process.cwd(), args = {} }) => {
21
- return new Promise(resolve => {
21
+ return new Promise((resolve) => {
22
22
  if (name) {
23
23
  mkdirp.sync(name);
24
24
  cwd = path.join(cwd, name);
@@ -48,7 +48,7 @@ const runGenerator = async (generatorPath, { name = '', cwd = process.cwd(), arg
48
48
  });
49
49
  };
50
50
 
51
- const run = async config => {
51
+ const run = async (config) => {
52
52
  process.send && process.send({ type: 'prompt' });
53
53
  process.emit('message', { type: 'prompt' });
54
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-umi",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "Creates a UmiJS application using the command line.",
5
5
  "homepage": "https://github.com/umijs/create-umi",
6
6
  "bugs": {
package/CHANGELOG.md DELETED
@@ -1,44 +0,0 @@
1
-
2
- ## The new CHNAGELOG will be updated on the [Release page](https://github.com/umijs/create-umi/releases).
3
-
4
- 0.9.5 / 2019-01-14
5
- ==================
6
-
7
- * enhance: add tests files (#32)
8
-
9
- 0.9.4 / 2019-01-14
10
- ==================
11
-
12
- * fix: create with typescript (#31)
13
- * fix: 少了一个分号 (#30)
14
-
15
- 0.9.3 / 2019-01-13
16
- ==================
17
-
18
- * yarn create umi时报错 (#29)
19
-
20
- 0.9.2 / 2019-01-12
21
- ==================
22
-
23
- * fix: create-umi not found, Close #26, Close #27
24
- * fix: create-umi -v
25
-
26
- 0.9.1 / 2019-01-12
27
- ==================
28
-
29
- * enable treeShaking by default
30
-
31
- 0.9.0 / 2019-01-12
32
- ==================
33
-
34
- * refact: improve create-umi (#25)
35
- * 重构一遍,结构清晰一些
36
- * app 支持 TypeScript,Close #22, Close #17
37
- * app 添加 ESLint 校验、treeShaking 配置
38
- * 优化 ant-design-pro 仓库 clone 时间问题,Close #20
39
- * 优化选择界面的提示文案,Close #24
40
-
41
- 0.8.1 / 2019-01-05
42
- ==================
43
-
44
- * fix: update umi-plugin-library to ^1.0.1-0
@@ -1,8 +0,0 @@
1
- node_modules
2
- .changelog
3
- .umi
4
- .umi-test
5
- .umi-production
6
- .DS_Store
7
- /lib
8
- dist
@@ -1,5 +0,0 @@
1
- /.umi
2
- /.umi-production
3
- /dist
4
- /node_modules
5
- /yarn.lock