@youcan/create-app 1.1.0-beta.0 → 1.1.0-beta.12
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/prompts/init.d.ts +4 -0
- package/dist/prompts/init.js +6 -2
- package/dist/services/init.js +22 -15
- package/package.json +3 -3
package/dist/prompts/init.d.ts
CHANGED
package/dist/prompts/init.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
const TEMPLATES = {
|
|
2
|
-
nuxt: {
|
|
2
|
+
'nuxt': {
|
|
3
3
|
label: 'Start with Nuxt (recommended)',
|
|
4
|
-
url: 'https
|
|
4
|
+
url: 'https://github.com/youcan-shop/shop-app-template-nuxt',
|
|
5
|
+
},
|
|
6
|
+
'extension-only': {
|
|
7
|
+
label: 'Start with an extension only',
|
|
8
|
+
url: 'https://github.com/youcan-shop/shop-app-template-none',
|
|
5
9
|
},
|
|
6
10
|
};
|
|
7
11
|
async function initPrompt(command) {
|
package/dist/services/init.js
CHANGED
|
@@ -9,23 +9,30 @@ async function initService(command, options) {
|
|
|
9
9
|
const templateDownloadDirectory = Path.join(tmp, 'download');
|
|
10
10
|
const url = repo.branch ? `${repo.baseUrl}#${repo.branch}` : repo.baseUrl;
|
|
11
11
|
await Filesystem.mkdir(templateDownloadDirectory);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
await Tasks.run({}, [
|
|
13
|
+
{
|
|
14
|
+
title: `Downloading app template from ${url}...`,
|
|
15
|
+
task: async () => {
|
|
16
|
+
await Git.clone({
|
|
17
|
+
url,
|
|
18
|
+
shallow: true,
|
|
19
|
+
destination: templateDownloadDirectory,
|
|
20
|
+
});
|
|
21
|
+
},
|
|
21
22
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
{
|
|
24
|
+
title: 'Configuring app...',
|
|
25
|
+
task: async () => {
|
|
26
|
+
await Filesystem.writeJsonFile(Path.join(templateDownloadDirectory, 'youcan.app.json'), { name: slug });
|
|
27
|
+
},
|
|
26
28
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
{
|
|
30
|
+
title: `Copying files to ${outdir}...`,
|
|
31
|
+
task: async () => {
|
|
32
|
+
await Filesystem.move(templateDownloadDirectory, outdir);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
29
36
|
});
|
|
30
37
|
command.output.info(`${slug} is ready for your to develop! Head to the docs for more information`);
|
|
31
38
|
command.output.info(' Developer Docs: https://developer.youcan.shop\n\n');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/create-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.0-beta.
|
|
4
|
+
"version": "1.1.0-beta.12",
|
|
5
5
|
"description": "A CLI for creating YouCan Shop apps",
|
|
6
6
|
"author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@oclif/core": "^2.15.0",
|
|
26
|
-
"@youcan/cli-kit": "1.1.0-beta.
|
|
26
|
+
"@youcan/cli-kit": "1.1.0-beta.12"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@oclif/plugin-legacy": "^1.3.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "shx rm -rf dist && tsc --noEmit && rollup --config rollup.config.js",
|
|
48
|
-
"dev": "rollup --config rollup.config.js --watch",
|
|
48
|
+
"dev": "shx rm -rf dist && rollup --config rollup.config.js --watch",
|
|
49
49
|
"release": "pnpm publish --access public",
|
|
50
50
|
"type-check": "tsc --noEmit",
|
|
51
51
|
"relink": "pnpm link --global"
|