This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from Uconnect-Technologies/development
V3 Into master
- Loading branch information
Showing
76 changed files
with
2,400 additions
and
410 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ notice.log | |
info.log | ||
warning.log | ||
.env | ||
storage | ||
/storage | ||
/backups | ||
.DS_STORE | ||
lib |
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
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 |
---|---|---|
@@ -1,31 +1,36 @@ | ||
import fs from "fs"; | ||
declare var process: any; | ||
import { exists, deleteFile, createEmptyFile, appendToFileSync } from "./../helpers/index"; | ||
import { | ||
exists, | ||
deleteFile, | ||
createEmptyFile, | ||
appendToFileSync, | ||
} from "./../helpers/index"; | ||
import { IDocServerConfiguration } from "./../types/configuration"; | ||
|
||
const docFileSource = process.env['generateDocumentationPath']; | ||
const docFileSource = process.env["generateDocumentationPath"]; | ||
// const docFileSource = "asd"; | ||
|
||
export const addContentsToDoc = async function(doc: string) { | ||
export const addContentsToDoc = async function (doc: string) { | ||
setTimeout(() => { | ||
doc = doc.replace("first________", "/**"); | ||
doc = doc.replace("last________", "*/"); | ||
appendToFileSync(docFileSource, doc); | ||
}, 600); | ||
}; | ||
|
||
export const resetDocFile = async function() { | ||
deleteDocFile(function() { | ||
createEmptyFile(docFileSource, function() { | ||
export const resetDocFile = async function () { | ||
deleteDocFile(function () { | ||
createEmptyFile(docFileSource, function () { | ||
addContentsToDoc("//empty file"); | ||
}); | ||
}); | ||
}; | ||
|
||
export const deleteDocFile = async function(cb: Function) { | ||
export const deleteDocFile = async function (cb: Function) { | ||
if (exists(docFileSource)) { | ||
deleteFile(docFileSource, cb); | ||
} else { | ||
cb(); | ||
} | ||
}; | ||
}; |
Oops, something went wrong.