cmyr-template-cli 1.1.1 → 1.2.0

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.
Files changed (2) hide show
  1. package/dist/plopfile.js +4 -4
  2. package/package.json +1 -1
package/dist/plopfile.js CHANGED
@@ -15,8 +15,8 @@ var ora__default = /*#__PURE__*/_interopDefaultLegacy(ora);
15
15
  var download__default = /*#__PURE__*/_interopDefaultLegacy(download);
16
16
 
17
17
  const env = process.env;
18
- env.NODE_ENV;
19
18
  const __DEV__ = env.NODE_ENV === 'development';
19
+ const PACKAGE_MANAGER = 'pnpm';
20
20
 
21
21
  async function downloadGitRepo(repository, destination, options = {}) {
22
22
  const loading = ora__default["default"](`download - ${repository}`);
@@ -46,12 +46,11 @@ async function asyncExec(cmd, options) {
46
46
  }
47
47
  async function init(projectPath, pkgData) {
48
48
  const loading = ora__default["default"]('正在安装依赖……');
49
- loading.start();
50
49
  try {
51
50
  await asyncExec('git --version', {
52
51
  cwd: projectPath,
53
52
  });
54
- await asyncExec('npm -v', {
53
+ await asyncExec(`${PACKAGE_MANAGER} -v`, {
55
54
  cwd: projectPath,
56
55
  });
57
56
  await asyncExec('git init', {
@@ -67,7 +66,8 @@ async function init(projectPath, pkgData) {
67
66
  await asyncExec('git commit -m "chore: init"', {
68
67
  cwd: projectPath,
69
68
  });
70
- await asyncExec('npm i', {
69
+ loading.start();
70
+ await asyncExec(`${PACKAGE_MANAGER} i`, {
71
71
  cwd: projectPath,
72
72
  });
73
73
  await asyncExec('git add .', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmyr-template-cli",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "草梅友仁自制的项目模板创建器",
5
5
  "author": "CaoMeiYouRen",
6
6
  "license": "MIT",