Skip to content

Commit f912a5f

Browse files
Added pinia and updated accordingly
1 parent eb051b8 commit f912a5f

File tree

2 files changed

+16
-404
lines changed

2 files changed

+16
-404
lines changed

src/App.vue

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<script setup lang="ts">
88
import { ref, provide } from 'vue';
9-
import { dependencies, name } from '../package';
9+
import { useCoreStore } from '@/stores/index';
1010
import DemoPage from '@/components/DemoPage.vue';
1111
import NavBar from '@/components/Layout/NavBar.vue';
1212
import FooterBar from '@/components/Layout/FooterBar.vue';
@@ -20,41 +20,12 @@ provide('styleData', {
2020
},
2121
});
2222
23-
const packageName = name;
24-
const repoBaseUrl = `https://github.com/webdevnerdstuff/${packageName}`;
25-
const prismVersion = dependencies.prismjs.replace('^', '');
26-
const highlightJsVersion = dependencies['highlight.js'].replace('^', '');
23+
const store = useCoreStore();
2724
const selectedLibrary = ref({});
2825
29-
30-
const links = {
31-
changeLog: `${repoBaseUrl}/blob/main/CHANGELOG.md`,
32-
contribute: `${repoBaseUrl}/tree/main/src/plugin/styles`,
33-
github: repoBaseUrl,
34-
githubProfile: 'https://github.com/webdevnerdstuff',
35-
license: `${repoBaseUrl}/blob/main/LICENSE.md`,
36-
neonBunnyTheme: 'https://marketplace.visualstudio.com/items?itemName=WebDevNerdStuff.neon-bunny',
37-
npm: `https://www.npmjs.com/package/${packageName}`,
38-
uaParser: 'https://www.npmjs.com/package/ua-parser-js',
39-
vueJs: 'https://vuejs.org/',
40-
};
41-
42-
const highlightJsLinks = {
43-
cdn: `https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@${highlightJsVersion}/build/styles/`,
44-
homepage: 'https://highlightjs.org/',
45-
themes: `https://github.com/highlightjs/highlight.js/tree/${highlightJsVersion}/src/styles`,
46-
};
47-
48-
const prismLinks = {
49-
cdn: `https://cdn.jsdelivr.net/gh/PrismJS/prism@${prismVersion}/themes/`,
50-
homepage: 'https://prismjs.com/',
51-
prismThemes: `https://github.com/PrismJS/prism/tree/v${prismVersion}/themes`,
52-
themes: 'https://github.com/PrismJS/prism-themes',
53-
};
54-
55-
provide('links', links);
56-
provide('highlightJsLinks', highlightJsLinks);
57-
provide('prismLinks', prismLinks);
26+
provide('links', store.links);
27+
provide('highlightJsLinks', store.highlightJsLinks);
28+
provide('prismLinks', store.prismLinks);
5829
5930
const codeBlockOptions = ref({
6031
browserWindow: false,

0 commit comments

Comments
 (0)