-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,23 @@ | ||
import { source, utilsAutoImport, type UtilTypes } from './structures' | ||
|
||
// ./src/app/{path}/shared | ||
export const RootDirs: string[] = ['examples/full', 'examples/minimal'].map( | ||
(dir) => `./src/app/${dir}/shared` | ||
const ROOT_FOLDER = '@/app/' | ||
|
||
function rootPath(dir: string, extention?: string) { | ||
if (extention) return `${ROOT_FOLDER}${dir}/${extention}` | ||
return `${ROOT_FOLDER}${dir}` | ||
} | ||
|
||
// For auto importing components | ||
export const AutoImportComponents: string[] = source.map((dir) => [rootPath(dir, 'shared')]).flat(1) | ||
|
||
type ReturnUtilsType = { [x: string]: string[] } | ||
|
||
// For auto importing functions, stores ... | ||
export const AutoImportUtils: ReturnUtilsType = Object.keys(utilsAutoImport).reduce( | ||
(acc, util: any) => { | ||
;(acc as any)[rootPath(util)] = utilsAutoImport[util as UtilTypes] | ||
return acc | ||
}, | ||
{} as ReturnUtilsType | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
export let source = ['examples/full', 'examples/minimal']; | ||
|
||
export const utilsAutoImport = { | ||
'examples/minimal/stores': ['useExampleStore'] | ||
} | ||
|
||
export type UtilTypes = keyof typeof utilsAutoImport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './example'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0564bca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checks for Deployment have failed
vue-advanced-starter – ./
0564bca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vue-advanced-starter – ./
vue-advanced-starter-suleyman.vercel.app
vue-advanced-starter-git-main-suleyman.vercel.app
vue-advanced-starter.vercel.app