Skip to content

Commit

Permalink
Merge pull request #19 from MatthewBlanski/feature/moreJSONConfig
Browse files Browse the repository at this point in the history
Fixed bug with relative path parsing
  • Loading branch information
MatthewBlanski authored Aug 23, 2020
2 parents 8786f3a + b6c5dee commit d98e487
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/apexDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ApexDoc {
const sfdxProjectJsonParser = new SFDXProjectJsonParser(this.sourceDirectory);
this.packageDirectories = sfdxProjectJsonParser.getPackageDirectories();

this.apexParser = new ApexParser(apexDocJsonParser);
this.fm = new FileManager(apexDocJsonParser);
}

Expand All @@ -42,6 +41,7 @@ class ApexDoc {

//TODO: Name this better
mainLogic() {
this.apexParser = new ApexParser(this.accessModifiers,this.sourceDirectory);
const filesArray = this.getClassFilesFromPackageDirectories();

//Create a new array of ClassModels
Expand Down
5 changes: 3 additions & 2 deletions src/apexParsing/apexParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const MethodModel = require('../apexmodels/methodModel.js');
const PropertyModel = require('../apexmodels/propertyModel.js');

class ApexParser {
constructor(apexDocJsonParser) {
this.accessModifiers = apexDocJsonParser.getAccessModifiers();
constructor(accessModifiers,sourceDirectory) {
this.accessModifiers = accessModifiers;
this.sourceDirectory = sourceDirectory;
}

parseFileContents(filePath) {
Expand Down
2 changes: 1 addition & 1 deletion src/config/apexDocJsonParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ApexDocJSONParser {
if(!this.apexDocJSON) {
const rawJSON = this.readApexDocJSON();
if(rawJSON) {
this.apexDocJSON = JSON.parse();
this.apexDocJSON = JSON.parse(rawJSON);
} else {
this.apexDocJSON = {};
}
Expand Down

0 comments on commit d98e487

Please sign in to comment.