@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.
- package/dist/index.js +16 -12
- 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.
|
|
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
|
-
|
|
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('
|
|
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.
|
|
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": "
|
|
59
|
+
"gitHead": "e6150c7c1dd0a090fb03c0b506bd530ae19976a3"
|
|
60
60
|
}
|