@giteeteam/apps-cli 0.1.14 → 0.1.15

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/index.js +16 -12
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ var simpleGit__default = /*#__PURE__*/_interopDefaultLegacy(simpleGit);
26
26
  var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
27
27
  var execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);
28
28
 
29
- var version = "0.1.14";
29
+ var version = "0.1.15";
30
30
 
31
31
  const packageApp = async ({ outputDir, manifest, copyFiles }) => {
32
32
  const { resources } = manifest;
@@ -190,7 +190,7 @@ const templateURL = 'https://github.com/moriahq/apps-template.git';
190
190
  var TemplateType;
191
191
  (function (TemplateType) {
192
192
  TemplateType["micro"] = "micro";
193
- TemplateType["uikit"] = "uikit";
193
+ // 'uikit' = 'uikit',
194
194
  })(TemplateType || (TemplateType = {}));
195
195
  // 重写替换文件内带模版的地方。格式为 {{field}}
196
196
  // options为字段变量
@@ -257,30 +257,30 @@ const selectTemplate = async () => {
257
257
  const prompt = inquirer__default["default"].createPromptModule();
258
258
  const result = await prompt({
259
259
  type: 'list',
260
- name: '请选择插件类型',
260
+ name: 'Please select template type',
261
261
  choices: Object.keys(TemplateType),
262
262
  });
263
263
  return Object.values(result)[0];
264
264
  };
265
265
  const cloneRepo = async (repoUrl, projectPath) => {
266
266
  await execActionWithSpinner({
267
- start: '开始克隆仓库',
268
- error: '仓库克隆失败',
269
- succeed: '仓库克隆完毕',
267
+ start: 'Start clone repository',
268
+ error: 'Clone repository failed!',
269
+ succeed: 'Clone repository success!',
270
270
  }, () => clone(repoUrl, projectPath));
271
271
  };
272
272
  const dependenciesInstall = async (projectPath) => {
273
273
  await execActionWithSpinner({
274
- start: '开始安装依赖',
275
- error: '依赖安装失败',
276
- succeed: '依赖安装成功',
274
+ start: 'Start install dependencies',
275
+ error: 'Install dependencies failed!',
276
+ succeed: 'Install dependencies success!',
277
277
  }, () => command.executeCommand('yarn', ['install'], projectPath));
278
278
  };
279
279
  var run = async (options) => {
280
280
  const { cwd, packageName } = options;
281
281
  const projectPath = path__default["default"].join(cwd, packageName);
282
282
  if (await fse__default["default"].pathExists(projectPath)) {
283
- console.error('项目文件夹已存在!请删除或者换个项目名');
283
+ console.error('Project path already exists!');
284
284
  return;
285
285
  }
286
286
  // 选择模板类型 micro or uikit
@@ -297,6 +297,10 @@ var run = async (options) => {
297
297
  const files = [
298
298
  './manifest.yml',
299
299
  './package.json',
300
+ './webpack.config.js',
301
+ './public/index.html',
302
+ './src/App.tsx',
303
+ './src/index.tsx',
300
304
  './static/micro/package.json',
301
305
  './static/micro/webpack.config.js',
302
306
  './static/micro/public/index.html',
@@ -310,8 +314,8 @@ var run = async (options) => {
310
314
  })));
311
315
  await dependenciesInstall(projectPath);
312
316
  await init(projectPath);
313
- console.log('项目初始化成功!');
314
- console.log('项目路径:' + projectPath);
317
+ console.log('Project init success!');
318
+ console.log('Project path:' + projectPath);
315
319
  };
316
320
 
317
321
  var create = async (packageName) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-cli",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Giteeteam Apps cli",
5
5
  "keywords": [
6
6
  "typescript",
@@ -56,5 +56,5 @@
56
56
  "@types/inquirer": "^8.2.1",
57
57
  "@types/uuid": "^8.3.4"
58
58
  },
59
- "gitHead": "c55c57740cad256f3d7d03f2c1d002d648d46634"
59
+ "gitHead": "e6150c7c1dd0a090fb03c0b506bd530ae19976a3"
60
60
  }