aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 54befee77..19e6f8299 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -351,7 +351,17 @@ export default class ServicesStore extends Store {
351 351
352 // Create and open file 352 // Create and open file
353 const filePath = path.join(directory, file); 353 const filePath = path.join(directory, file);
354 await fs.ensureFile(filePath); 354 if (file === 'user.js') {
355 if (!await fs.exists(filePath)) {
356 await fs.writeFile(filePath, `module.exports = (config, Ferdi) => {
357 // Write your scripts here
358 console.log("Hello, World!", config);
359}
360`);
361 }
362 } else {
363 await fs.ensureFile(filePath);
364 }
355 shell.showItemInFolder(filePath); 365 shell.showItemInFolder(filePath);
356 } 366 }
357 367