Skip to content

Commit

Permalink
refactor: remove 'route' based folders
Browse files Browse the repository at this point in the history
  • Loading branch information
selemondev committed Jun 29, 2024
1 parent edaa169 commit 42e0ec9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@selemondev/create-vue3-app",
"name": "create-vue-app",
"version": "0.0.3",
"description": "The Next Generation Vue Scaffolding Tool ✨",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions src/filter/filterFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import fs from 'fs-extra';
export function getFilterFile() {
async function vueFilterFileActions() {
if (!options.useRouter) {
fs.remove(`${options.dest}/src/views`)
fs.remove(`${options.dest}/src/router`)
}

Expand Down
6 changes: 3 additions & 3 deletions template/vue-js/src/App.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<script setup lang="ts">
<% if (!useRouter) {
-%>
import HomeView from '@/views/HomeView.vue'
import TheWelcome from './components/TheWelcome.vue';
<% } -%>
<% if (useTanStackVueQuery) {
-%>
Expand All @@ -15,15 +15,15 @@
<script setup>
<% if (!useRouter) {
-%>
import HomeView from '@/views/HomeView.vue'
import TheWelcome from './components/TheWelcome.vue';
<% } -%>
</script>
<% } -%>


<template>
<% if (!useRouter) { -%>
<HomeView />
<TheWelcome />
<% } -%>
<% if (useRouter) { -%>
<RouterView />
Expand Down
6 changes: 3 additions & 3 deletions template/vue-ts/src/App.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<script setup lang="ts">
<% if (!useRouter) {
-%>
import HomeView from '@/views/HomeView.vue'
import TheWelcome from './components/TheWelcome.vue';
<% } -%>
<% if (useTanStackVueQuery) {
-%>
Expand All @@ -15,15 +15,15 @@
<script setup>
<% if (!useRouter) {
-%>
import HomeView from '@/views/HomeView.vue'
import TheWelcome from './components/TheWelcome.vue';
<% } -%>
</script>
<% } -%>


<template>
<% if (!useRouter) { -%>
<HomeView />
<TheWelcome />
<% } -%>
<% if (useRouter) { -%>
<RouterView />
Expand Down

0 comments on commit 42e0ec9

Please sign in to comment.