@shopify/create-hydrogen 3.0.25 → 3.0.26
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/CHANGELOG.md +19 -0
- package/dist/commands/init.d.ts +15 -0
- package/dist/commands/init.js +70 -322
- package/dist/commands/init.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -24
- package/dist/index.js.map +1 -1
- package/dist/prompts/init.d.ts +7 -0
- package/dist/prompts/init.js +71 -0
- package/dist/prompts/init.js.map +1 -0
- package/dist/services/init.d.ts +12 -0
- package/dist/services/init.js +204 -0
- package/dist/services/init.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/template.d.ts +4 -0
- package/dist/utils/template.js +12 -0
- package/dist/utils/template.js.map +1 -0
- package/package.json +4 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { github, file } from '@shopify/cli-kit';
|
|
2
|
+
import download from 'download';
|
|
3
|
+
export async function downloadTemplate({ templateUrl, into }) {
|
|
4
|
+
const { name, user, subDirectory } = github.parseRepoUrl(templateUrl);
|
|
5
|
+
const latestRelease = await github.getLatestRelease(user, name);
|
|
6
|
+
await download(latestRelease.tarball_url, into, {
|
|
7
|
+
extract: true,
|
|
8
|
+
filter: ({ path }) => path.includes(subDirectory),
|
|
9
|
+
map: (value) => ({ ...value, path: file.stripUp(value.path, 3) }),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/utils/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAC7C,OAAO,QAAQ,MAAM,UAAU,CAAA;AAE/B,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAC,WAAW,EAAE,IAAI,EAAsC;IAC7F,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAC,GAAG,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;IACnE,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAE/D,MAAM,QAAQ,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE;QAC9C,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;QAC/C,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAC,CAAC;KAChE,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {github, file} from '@shopify/cli-kit'\nimport download from 'download'\n\nexport async function downloadTemplate({templateUrl, into}: {templateUrl: string; into: string}) {\n const {name, user, subDirectory} = github.parseRepoUrl(templateUrl)\n const latestRelease = await github.getLatestRelease(user, name)\n\n await download(latestRelease.tarball_url, into, {\n extract: true,\n filter: ({path}) => path.includes(subDirectory),\n map: (value) => ({...value, path: file.stripUp(value.path, 3)}),\n })\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/create-hydrogen",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A CLI tool to create a new Shopify hydrogen app.",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"clean": "shx rm -rf dist",
|
|
36
|
-
"build": "rimraf dist/ &&
|
|
36
|
+
"build": "rimraf dist/ && tsc -b ./tsconfig.build.json",
|
|
37
37
|
"prepack": "cross-env NODE_ENV=production yarn run build",
|
|
38
38
|
"lint": "prettier -c src/** && eslint \"src/**/*.ts\"",
|
|
39
39
|
"lint:fix": "prettier -w src/** && eslint 'src/**/*.ts' --fix",
|
|
@@ -50,9 +50,8 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@bugsnag/js": "^7.16.7",
|
|
54
53
|
"@oclif/core": "^1.0",
|
|
55
|
-
"@shopify/cli-kit": "^3.0.
|
|
54
|
+
"@shopify/cli-kit": "^3.0.26",
|
|
56
55
|
"@types/download": "^8.0.1",
|
|
57
56
|
"download": "^8.0.0"
|
|
58
57
|
},
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
],
|
|
71
70
|
"oclif": {
|
|
72
71
|
"bin": "create-hydrogen",
|
|
73
|
-
"commands": "
|
|
72
|
+
"commands": "dist/commands",
|
|
74
73
|
"additionalHelpFlags": [
|
|
75
74
|
"-h"
|
|
76
75
|
]
|