Skip to content

Commit

Permalink
indent fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zain-ul-din committed Jan 6, 2023
1 parent 02bbceb commit 62351c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
7 changes: 1 addition & 6 deletions dist/lib/code-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ class CodeGenerator {
* writes content to file
*/
writeToFile() {
file_util_1.default.writeFile(this.config.outputDir + "/" + this.config.outputFile, `${this.fileContent}
module.exports = {
default: [${this.defaultExports.join(",")}],\n /* preserved exports */
${this.preservedFilesExpots.join(",\n")}
};
`);
file_util_1.default.writeFile(this.config.outputDir + "/" + this.config.outputFile, `${this.fileContent}\nmodule.exports = {\n default: [${this.defaultExports.join(",")}],\n /* preserved exports */\n ${this.preservedFilesExpots.join(",\n")}\n};`);
}
defaultExports = [];
preservedFilesExpots = [];
Expand Down
11 changes: 3 additions & 8 deletions lib/code-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ export default class CodeGenerator
public writeToFile () : void
{
FileUtil.writeFile (this.config.outputDir + "/" + this.config.outputFile,
`${this.fileContent}
module.exports = {
default: [${this.defaultExports.join (",")}],\n /* preserved exports */
${this.preservedFilesExpots.join (",\n")}
};
`
`${this.fileContent}\nmodule.exports = {\n default: [${this.defaultExports.join (",")}],\n /* preserved exports */\n ${this.preservedFilesExpots.join (",\n")}\n};`
);
}

Expand All @@ -53,7 +48,7 @@ module.exports = {
private relativePath:string
private fileContent:string = ''


/**
* reads directory and finds file exports
*/
Expand Down Expand Up @@ -92,7 +87,7 @@ module.exports = {
}
});
}

/**
* adds undefined at the place of missing preserved files
*/
Expand Down

0 comments on commit 62351c6

Please sign in to comment.