Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Imports resolving has been completely reworked; Generation for scripts with imports is now supported * Minor fix * Fixed imports' recursion
- Loading branch information
1 parent
6bca025
commit 1ea4afd
Showing
18 changed files
with
1,618 additions
and
2,059 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Settings from '../WDLSettings'; | ||
|
||
export default class ImportGenerator { | ||
|
||
constructor(imp, settings) { | ||
this.name = imp.name; | ||
this.expression = imp.expression; | ||
this.uri = imp.uri; | ||
|
||
this.importString = ''; | ||
|
||
this.settings = new Settings(settings); | ||
} | ||
|
||
renderImport() { | ||
const EOL = this.settings.getValue('style.eol'); | ||
|
||
if (this.importString === '' && this.expression) { | ||
this.importString += `${this.expression}${EOL}`; | ||
} | ||
|
||
return this.importString; | ||
} | ||
|
||
renderEOL() { | ||
const EOL = this.settings.getValue('style.eol'); | ||
|
||
return `${EOL}`; | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.