create-v-kit-spa 1.0.10 → 1.1.0
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/README.md +4 -1
- package/dist/commands.d.ts +1 -1
- package/dist/commands.js +80 -67
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/messages.d.ts +2 -2
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +39 -69
- package/dist/prompts.d.ts +15 -3
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +98 -77
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +33 -33
- package/dist/version.d.ts +1 -1
- package/dist/version.js +25 -20
- package/lib/162/.env.example +1 -7
- package/lib/162/README.md +0 -19
- package/lib/162/app/Http/Controllers/MainController.php +12 -0
- package/lib/162/composer.json +3 -7
- package/lib/162/composer.lock +579 -1140
- package/lib/162/config/cache.php +4 -3
- package/lib/162/config/database.php +5 -2
- package/lib/162/config/filesystems.php +3 -2
- package/lib/162/config/logging.php +1 -1
- package/lib/162/config/mail.php +15 -2
- package/lib/162/config/queue.php +4 -4
- package/lib/162/config/services.php +4 -0
- package/lib/162/config/session.php +0 -1
- package/lib/162/package.json +1 -9
- package/lib/162/public/.htaccess +6 -8
- package/lib/162/resources/js/app.js +10 -10
- package/lib/162/resources/js/components/About.vue +4 -4
- package/lib/162/resources/js/components/Home.vue +11 -11
- package/lib/162/resources/js/components/pages/About.vue +5 -0
- package/lib/162/resources/js/components/pages/Error.vue +5 -0
- package/lib/162/resources/js/components/pages/Home.vue +21 -0
- package/lib/162/resources/js/components/templates/App.vue +86 -0
- package/lib/162/resources/js/failOver.js +8 -8
- package/lib/162/resources/js/mainStore.js +20 -0
- package/lib/162/resources/js/router.js +40 -24
- package/lib/162/resources/js/store.js +18 -18
- package/lib/162/resources/js/templates/App.vue +65 -65
- package/lib/162/resources/js/views/HomeView.vue +7 -7
- package/lib/162/resources/views/layouts/app.blade.php +13 -14
- package/lib/162/resources/views/welcome.blade.php +2 -2
- package/lib/162/routes/web.php +2 -3
- package/lib/162/vite.config.js +1 -1
- package/package.json +2 -4
- package/dist/count.d.ts +0 -3
- package/dist/count.d.ts.map +0 -1
- package/dist/count.js +0 -44
- package/dist/progress.d.ts +0 -2
- package/dist/progress.d.ts.map +0 -1
- package/dist/progress.js +0 -37
- package/lib/162/package-lock.json +0 -1330
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-app>
|
|
3
|
-
<v-app-bar
|
|
4
|
-
elevation="0"
|
|
5
|
-
density="compact"
|
|
6
|
-
color="black"
|
|
7
|
-
prominent
|
|
8
|
-
>
|
|
9
|
-
<v-app-bar-nav-icon variant="text" @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
|
10
|
-
<v-toolbar-title >Vue 3 - Laravel 11 SPA</v-toolbar-title>
|
|
11
|
-
</v-app-bar>
|
|
12
|
-
|
|
13
|
-
<v-navigation-drawer
|
|
14
|
-
v-model="drawer"
|
|
15
|
-
temporary
|
|
16
|
-
>
|
|
17
|
-
|
|
18
|
-
<v-list density="compact" class="pt-0" >
|
|
19
|
-
<v-list-item
|
|
20
|
-
v-for="(item, i) in items"
|
|
21
|
-
:key="i"
|
|
22
|
-
:value="item"
|
|
23
|
-
color="gray"
|
|
24
|
-
@click="$router.push(item.to)"
|
|
25
|
-
>
|
|
26
|
-
<template v-slot:prepend>
|
|
27
|
-
<v-icon :icon="item.icon"></v-icon>
|
|
28
|
-
</template>
|
|
29
|
-
<v-list-item-title class="py-3" v-text="item.text"></v-list-item-title>
|
|
30
|
-
</v-list-item>
|
|
31
|
-
</v-list>
|
|
32
|
-
</v-navigation-drawer>
|
|
33
|
-
|
|
34
|
-
<v-main>
|
|
35
|
-
<router-view></router-view>
|
|
36
|
-
</v-main>
|
|
37
|
-
</v-app>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<script>
|
|
41
|
-
import { ref } from 'vue';
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
setup() {
|
|
45
|
-
const drawer = ref(false);
|
|
46
|
-
|
|
47
|
-
const items = ref([
|
|
48
|
-
{
|
|
49
|
-
text: 'Home',
|
|
50
|
-
to: '/',
|
|
51
|
-
icon: 'mdi-home'
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
text: 'About',
|
|
55
|
-
to: '/about',
|
|
56
|
-
icon:'mdi-information-outline'
|
|
57
|
-
},
|
|
58
|
-
]);
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
drawer,
|
|
62
|
-
items
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
};
|
|
1
|
+
<template>
|
|
2
|
+
<v-app>
|
|
3
|
+
<v-app-bar
|
|
4
|
+
elevation="0"
|
|
5
|
+
density="compact"
|
|
6
|
+
color="black"
|
|
7
|
+
prominent
|
|
8
|
+
>
|
|
9
|
+
<v-app-bar-nav-icon variant="text" @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
|
10
|
+
<v-toolbar-title >Vue 3 - Laravel 11 SPA</v-toolbar-title>
|
|
11
|
+
</v-app-bar>
|
|
12
|
+
|
|
13
|
+
<v-navigation-drawer
|
|
14
|
+
v-model="drawer"
|
|
15
|
+
temporary
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
<v-list density="compact" class="pt-0" >
|
|
19
|
+
<v-list-item
|
|
20
|
+
v-for="(item, i) in items"
|
|
21
|
+
:key="i"
|
|
22
|
+
:value="item"
|
|
23
|
+
color="gray"
|
|
24
|
+
@click="$router.push(item.to)"
|
|
25
|
+
>
|
|
26
|
+
<template v-slot:prepend>
|
|
27
|
+
<v-icon :icon="item.icon"></v-icon>
|
|
28
|
+
</template>
|
|
29
|
+
<v-list-item-title class="py-3" v-text="item.text"></v-list-item-title>
|
|
30
|
+
</v-list-item>
|
|
31
|
+
</v-list>
|
|
32
|
+
</v-navigation-drawer>
|
|
33
|
+
|
|
34
|
+
<v-main>
|
|
35
|
+
<router-view></router-view>
|
|
36
|
+
</v-main>
|
|
37
|
+
</v-app>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
import { ref } from 'vue';
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
setup() {
|
|
45
|
+
const drawer = ref(false);
|
|
46
|
+
|
|
47
|
+
const items = ref([
|
|
48
|
+
{
|
|
49
|
+
text: 'Home',
|
|
50
|
+
to: '/',
|
|
51
|
+
icon: 'mdi-home'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
text: 'About',
|
|
55
|
+
to: '/about',
|
|
56
|
+
icon:'mdi-information-outline'
|
|
57
|
+
},
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
drawer,
|
|
62
|
+
items
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
66
|
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import Home from '../components/Home.vue'
|
|
3
|
-
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<Home/>
|
|
1
|
+
<script setup>
|
|
2
|
+
import Home from '../components/Home.vue'
|
|
3
|
+
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<Home/>
|
|
8
8
|
</template>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Vue 3 - Laravel 11 SPA</title>
|
|
7
|
+
|
|
8
|
+
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
|
9
|
+
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app"></div>
|
|
13
|
+
</body>
|
|
15
14
|
</html>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
18
18
|
<body class="font-sans antialiased dark:bg-black dark:text-white/50">
|
|
19
|
-
<div
|
|
19
|
+
<div class="bg-gray-50 text-black/50 dark:bg-black dark:text-white/50">
|
|
20
20
|
<img id="background" class="absolute -left-20 top-0 max-w-[877px]" src="https://laravel.com/assets/img/welcome/background.svg" />
|
|
21
21
|
<div class="relative min-h-screen flex flex-col items-center justify-center selection:bg-[#FF2D20] selection:text-white">
|
|
22
22
|
<div class="relative w-full max-w-2xl px-6 lg:max-w-7xl">
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
<svg class="size-6 shrink-0 self-center stroke-[#FF2D20]" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75"/></svg>
|
|
141
141
|
</a>
|
|
142
142
|
|
|
143
|
-
<div class="flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_rgba(0,0,0,0.08)] ring-1 ring-white/[0.05] lg:pb-10 dark:bg-zinc-900 dark:ring-zinc-800">
|
|
143
|
+
<div class="flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_rgba(0,0,0,0.08)] ring-1 ring-white/[0.05] transition duration-300 hover:text-black/70 hover:ring-black/20 focus:outline-none focus-visible:ring-[#FF2D20] lg:pb-10 dark:bg-zinc-900 dark:ring-zinc-800 dark:hover:text-white/70 dark:hover:ring-zinc-700 dark:focus-visible:ring-[#FF2D20]">
|
|
144
144
|
<div class="flex size-12 shrink-0 items-center justify-center rounded-full bg-[#FF2D20]/10 sm:size-16">
|
|
145
145
|
<svg class="size-5 sm:size-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
146
146
|
<g fill="#FF2D20">
|
package/lib/162/routes/web.php
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<?php
|
|
2
2
|
|
|
3
3
|
use Illuminate\Support\Facades\Route;
|
|
4
|
+
use App\Http\Controllers\MainController;
|
|
4
5
|
|
|
5
|
-
Route::get('/{any?}',
|
|
6
|
-
return view('layouts.app');
|
|
7
|
-
})->where('any','.*');
|
|
6
|
+
Route::get('/{any?}', [MainController::class, 'index'])->where('any', '.*');
|
package/lib/162/vite.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-v-kit-spa",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"description": "A simple way to start your Vue-Laravel SPA projects",
|
|
6
6
|
"repository": "Shuashuaa/v-kit-spa",
|
|
@@ -23,16 +23,14 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"homepage": "https://github.com/Shuashuaa/v-kit-spa#readme",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"
|
|
26
|
+
"@clack/prompts": "^1.5.1",
|
|
27
27
|
"chalk": "^4.1.2",
|
|
28
|
-
"cli-progress": "^3.12.0",
|
|
29
28
|
"fs": "^0.0.1-security",
|
|
30
29
|
"path": "^0.12.7",
|
|
31
30
|
"yargs": "^17.7.2"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@types/yargs": "^17.0.33",
|
|
35
|
-
"@types/cli-progress": "^3.11.6",
|
|
36
34
|
"ts-node": "^10.9.2",
|
|
37
35
|
"typescript": "^5.6.2"
|
|
38
36
|
},
|
package/dist/count.d.ts
DELETED
package/dist/count.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../src/count.ts"],"names":[],"mappings":"AAKA,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,mBAgB/C;AAID,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,QAShE"}
|
package/dist/count.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.countItems = countItems;
|
|
13
|
-
exports.getCount = getCount;
|
|
14
|
-
const fs = require('fs');
|
|
15
|
-
const path = require('path');
|
|
16
|
-
const progress_1 = require("./progress");
|
|
17
|
-
function countItems(dirPath) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
let count = 0;
|
|
20
|
-
const files = yield fs.promises.readdir(dirPath);
|
|
21
|
-
for (const file of files) {
|
|
22
|
-
const filePath = path.join(dirPath, file);
|
|
23
|
-
const stat = yield fs.promises.stat(filePath);
|
|
24
|
-
if (stat.isDirectory()) {
|
|
25
|
-
count += yield countItems(filePath); // Recursive
|
|
26
|
-
}
|
|
27
|
-
else if (stat.isFile()) {
|
|
28
|
-
count++;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return count;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
// const sourcePath = path.join(__dirname, '../templates', '158');
|
|
35
|
-
function getCount(sourcePath, templatePath) {
|
|
36
|
-
countItems(sourcePath)
|
|
37
|
-
.then((count) => {
|
|
38
|
-
// console.log(`There are ${count} items (files and folders) in the folder.`);
|
|
39
|
-
(0, progress_1.Progress)(count, templatePath);
|
|
40
|
-
})
|
|
41
|
-
.catch((err) => {
|
|
42
|
-
console.error('Error:', err);
|
|
43
|
-
});
|
|
44
|
-
}
|
package/dist/progress.d.ts
DELETED
package/dist/progress.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AAKA,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBA0BjE"}
|
package/dist/progress.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Progress = Progress;
|
|
13
|
-
const _progress = require('cli-progress');
|
|
14
|
-
const colors = require('ansi-colors');
|
|
15
|
-
const messages_1 = require("./messages");
|
|
16
|
-
function Progress(countVal, sourceVal) {
|
|
17
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
console.log('\n');
|
|
19
|
-
const b1 = new _progress.SingleBar({
|
|
20
|
-
format: 'Downloading... |' + colors.cyan('{bar}') + '| {percentage}% | {value}/{total} Files | ETA: {eta}s',
|
|
21
|
-
barCompleteChar: '\u2588',
|
|
22
|
-
barIncompleteChar: '\u2591',
|
|
23
|
-
hideCursor: true
|
|
24
|
-
});
|
|
25
|
-
b1.start(countVal, 0);
|
|
26
|
-
let value = 0;
|
|
27
|
-
const timer = setInterval(function () {
|
|
28
|
-
value++;
|
|
29
|
-
b1.update(value);
|
|
30
|
-
if (value >= b1.getTotal()) {
|
|
31
|
-
clearInterval(timer);
|
|
32
|
-
b1.stop();
|
|
33
|
-
(0, messages_1.successMessage)(sourceVal);
|
|
34
|
-
}
|
|
35
|
-
}, 20);
|
|
36
|
-
});
|
|
37
|
-
}
|