-
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
3 changed files
with
60 additions
and
2 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
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 @@ | ||
function createManifest(name,version,description, manifestVersion,author,locale, license){ | ||
console.log(`Name: ${name}, Version: ${version}, Desc:${description}, ManifestVersion: ${manifestVersion}, Author: ${author}, Default_locale: ${locale}, License: ${license}`) | ||
return 1; | ||
} | ||
|
||
module.exports = { | ||
createManifest, | ||
} |
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,42 @@ | ||
const fs = require("fs") | ||
|
||
/** | ||
* Function to create a new folder with the given name | ||
* @param {The name of the created folder} folderName | ||
*/ | ||
function createDirectory(folderName){ | ||
try { | ||
if(!fs.existsSync(folderName)){ | ||
fs.mkdirSync(folderName) | ||
} | ||
} catch(err) { | ||
console.log(err) | ||
} | ||
} | ||
|
||
/** | ||
* Function to create a new, currently not existing file and injecting input | ||
* @param {name of the created file} name | ||
* @param {The contecxt to be injected into the file} content | ||
*/ | ||
function createFile(name, content){ | ||
fs.open(name, "w", (err, file) => { | ||
if(err) console.log(`Error creating file ${name} because ${err}`); | ||
// file. | ||
}); | ||
} | ||
|
||
/** | ||
* Function to append content in a file at a specific place | ||
* @param {Name of the file the content should be appended to} name | ||
* @param {The content that should be appendend in the file} content | ||
*/ | ||
function appendContent(name, content) { | ||
|
||
} | ||
|
||
module.exports = { | ||
createDirectory, | ||
createFile, | ||
appendContent, | ||
} |