@@ -85,7 +85,7 @@ const showExportProjectDialog = () => {
85
85
.catch ((err : Error ) => console .log (err ));
86
86
};
87
87
88
- const writeFile = async (filePath : any , content : any ) => {
88
+ export const writeFile = async (filePath : any , content : any ) => {
89
89
if (! filePath ) {
90
90
console .error (' filePath is undefined' );
91
91
return ;
@@ -94,18 +94,18 @@ const writeFile = async(filePath: any, content: any) => {
94
94
.catch ((error : any ) => console .error (error ));
95
95
}
96
96
97
- async function checkFileExists(path : string ) {
97
+ export async function checkFileExists(path : string ) {
98
98
const fileExistBool = await ipcRenderer .invoke (' check-file-exists' , path );
99
99
return fileExistBool .status ;
100
100
};
101
101
102
- const mkdirSync = async (... args : string []) => {
102
+ export const mkdirSync = async (... args : string []) => {
103
103
await ipcRenderer .invoke (' mkdirSync' , [... args ])
104
104
105
105
.catch ((error : any ) => console .error (error ));
106
106
}
107
107
108
- const pathJoin = (... args : string []) => {
108
+ export const pathJoin = (... args : string []) => {
109
109
if (args .some (arg => arg === undefined )) { // undefined handler for if any args are undefined
110
110
console .error (' arguments are undefined)' );
111
111
return ;
@@ -1157,7 +1157,7 @@ const createTSDeclaration = async(location: string) => {
1157
1157
};
1158
1158
1159
1159
const createStore = async (location : string ) => {
1160
- let str = ` import { createStore } from 'vuex ';\n ` ;
1160
+ let str = ` import { createStore } from 'pinia ';\n ` ;
1161
1161
str += ` \n const store = createStore({` ;
1162
1162
str += ` \n\t state () {` ;
1163
1163
str += ` \n\t\t return {` ;
@@ -1238,6 +1238,7 @@ const createPackage = async(location: string) => {
1238
1238
str += ` \n\t "dependencies": {` ;
1239
1239
str += ` \n\t\t "vue": "^3.4.21",` ;
1240
1240
str += ` \n\t\t "vue-router": "^4.0.12",` ;
1241
+ str += ` \n\t\t "pinia": "^2.1.7"` ;
1241
1242
str += ` \n\t\t "vuex": "^4.0.2"` ;
1242
1243
str += ` ,\n\t\t "element-plus": "^2.2.16" ` ;
1243
1244
0 commit comments