create-hsi-app 0.1.2 → 0.1.4

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.
@@ -10,6 +10,7 @@ import {
10
10
  import { basename, join, resolve } from 'node:path';
11
11
 
12
12
  const templateRepo = 'https://github.com/Hsiii/frontend-template.git';
13
+ const templateTag = 'v0.1.4';
13
14
  const defaultAppName = 'my-app';
14
15
  const targetArg = process.argv[2] ?? defaultAppName;
15
16
  const targetPath = resolve(targetArg);
@@ -19,7 +20,17 @@ if (existsSync(targetPath) && readdirSync(targetPath).length > 0) {
19
20
  fail(`Target directory is not empty: ${targetPath}`);
20
21
  }
21
22
 
22
- run('git', ['clone', '--depth', '1', templateRepo, targetPath]);
23
+ run('git', [
24
+ '-c',
25
+ 'advice.detachedHead=false',
26
+ 'clone',
27
+ '--branch',
28
+ templateTag,
29
+ '--depth',
30
+ '1',
31
+ templateRepo,
32
+ targetPath,
33
+ ]);
23
34
 
24
35
  rmSync(join(targetPath, '.git'), { force: true, recursive: true });
25
36
  rmSync(join(targetPath, '.github'), { force: true, recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-hsi-app",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Create a new app from the frontend template.",
6
6
  "bin": {