1
1
import { defineStore } from 'pinia' ;
2
- import packageJson from '../.. /package.json' ;
2
+ import packageJson from '@root /package.json' ;
3
3
4
- const dependencies = packageJson . dependencies ;
5
- const packageName = packageJson . name ;
6
- const prismVersion = dependencies . prismjs . replace ( '^' , '' ) ;
7
- const highlightJsVersion = dependencies [ 'highlight.js' ] . replace ( '^' , '' ) ;
8
-
9
- // Links //
10
- const repoBaseUrl = `https://github.com/webdevnerdstuff/${ packageName } ` ;
11
- const links = {
12
- changeLog : `${ repoBaseUrl } /blob/main/CHANGELOG.md` ,
13
- contribute : `${ repoBaseUrl } /tree/main/src/plugin/styles` ,
14
- github : repoBaseUrl ,
15
- githubProfile : 'https://github.com/webdevnerdstuff' ,
16
- license : `${ repoBaseUrl } /blob/main/LICENSE.md` ,
17
- neonBunnyTheme : 'https://marketplace.visualstudio.com/items?itemName=WebDevNerdStuff.neon-bunny' ,
18
- npm : `https://www.npmjs.com/package/${ packageName } ` ,
19
- uaParser : 'https://www.npmjs.com/package/ua-parser-js' ,
20
- vueJs : 'https://vuejs.org/' ,
21
- } ;
22
- const highlightJsLinks = {
23
- cdn : `https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@${ highlightJsVersion } /build/styles/` ,
24
- homepage : 'https://highlightjs.org/' ,
25
- themes : `https://github.com/highlightjs/highlight.js/tree/${ highlightJsVersion } /src/styles` ,
26
- } ;
27
- const prismLinks = {
28
- cdn : `https://cdn.jsdelivr.net/gh/PrismJS/prism@${ prismVersion } /themes/` ,
29
- homepage : 'https://prismjs.com/' ,
30
- prismThemes : `https://github.com/PrismJS/prism/tree/v${ prismVersion } /themes` ,
31
- themes : 'https://github.com/PrismJS/prism-themes' ,
32
- } ;
33
-
34
- // Options //
35
- const libraries = {
36
- prism : {
37
- label : 'PrismJS' ,
38
- id : 'prism' ,
39
- } ,
40
- highlightjs : {
41
- label : 'Highlight.js' ,
42
- id : 'highlightjs' ,
43
- } ,
44
- } ;
45
- const neonBunnyThemes = [
46
- {
47
- label : 'Neon Bunny' ,
48
- value : 'neon-bunny' ,
49
- } ,
50
- {
51
- label : 'Neon Bunny - Carrot' ,
52
- value : 'neon-bunny-carrot' ,
53
- } ,
54
- ] ;
4
+ // Themes //
55
5
const prismThemes = [
56
6
{
57
7
label : 'Default' ,
@@ -385,6 +335,59 @@ const highlightThemes = [
385
335
} ,
386
336
] ;
387
337
338
+ // ! Do not edit below this line //
339
+ const dependencies = packageJson . dependencies ;
340
+ const packageName = packageJson . name ;
341
+ const prismVersion = dependencies . prismjs . replace ( '^' , '' ) ;
342
+ const highlightJsVersion = dependencies [ 'highlight.js' ] . replace ( '^' , '' ) ;
343
+
344
+ // Links //
345
+ const repoBaseUrl = `https://github.com/webdevnerdstuff/${ packageName } ` ;
346
+ const links = {
347
+ changeLog : `${ repoBaseUrl } /blob/main/CHANGELOG.md` ,
348
+ contribute : `${ repoBaseUrl } /tree/main/src/plugin/styles` ,
349
+ github : repoBaseUrl ,
350
+ githubProfile : 'https://github.com/webdevnerdstuff' ,
351
+ license : `${ repoBaseUrl } /blob/main/LICENSE.md` ,
352
+ neonBunnyTheme : 'https://marketplace.visualstudio.com/items?itemName=WebDevNerdStuff.neon-bunny' ,
353
+ npm : `https://www.npmjs.com/package/${ packageName } ` ,
354
+ uaParser : 'https://www.npmjs.com/package/ua-parser-js' ,
355
+ vueJs : 'https://vuejs.org/' ,
356
+ } ;
357
+ const highlightJsLinks = {
358
+ cdn : `https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@${ highlightJsVersion } /build/styles/` ,
359
+ homepage : 'https://highlightjs.org/' ,
360
+ themes : `https://github.com/highlightjs/highlight.js/tree/${ highlightJsVersion } /src/styles` ,
361
+ } ;
362
+ const prismLinks = {
363
+ cdn : `https://cdn.jsdelivr.net/gh/PrismJS/prism@${ prismVersion } /themes/` ,
364
+ homepage : 'https://prismjs.com/' ,
365
+ prismThemes : `https://github.com/PrismJS/prism/tree/v${ prismVersion } /themes` ,
366
+ themes : 'https://github.com/PrismJS/prism-themes' ,
367
+ } ;
368
+
369
+ // Options //
370
+ const libraries = {
371
+ prism : {
372
+ label : 'PrismJS' ,
373
+ id : 'prism' ,
374
+ } ,
375
+ highlightjs : {
376
+ label : 'Highlight.js' ,
377
+ id : 'highlightjs' ,
378
+ } ,
379
+ } ;
380
+ const neonBunnyThemes = [
381
+ {
382
+ label : 'Neon Bunny' ,
383
+ value : 'neon-bunny' ,
384
+ } ,
385
+ {
386
+ label : 'Neon Bunny - Carrot' ,
387
+ value : 'neon-bunny-carrot' ,
388
+ } ,
389
+ ] ;
390
+
388
391
interface State {
389
392
highlightJsLinks : object ;
390
393
highlightThemes : object ;
@@ -397,7 +400,6 @@ interface State {
397
400
storageName : string ;
398
401
}
399
402
400
-
401
403
export const useCoreStore = defineStore ( 'core' , {
402
404
actions : {
403
405
setLocalStorage ( val : string ) : string {
0 commit comments