-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement machinery for allowing extensions
This commit (and the PR to which it belongs) moves auspice from a component of nextstrain to a stand alone tool which can be extended (e.g. with aesthetic or functional changes). The auspice seen on nextstrain.org will eventually be one such extension.
- Loading branch information
1 parent
82f7d5e
commit 27ef50d
Showing
4 changed files
with
29 additions
and
1 deletion.
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
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,20 @@ | ||
|
||
|
||
/* set up time -- only runs once no matter how many components import this */ | ||
|
||
const registry = (() => { | ||
console.log("EXTENSTIONS.jS"); | ||
if (!process.env.EXTENSION_DATA) { | ||
console.log("no EXTENSION_DATA found") | ||
return {}; | ||
} | ||
const extensionJson = JSON.parse(process.env.EXTENSION_DATA); | ||
console.log("extensionJson", extensionJson); | ||
return extensionJson; | ||
})(); | ||
|
||
|
||
export const getExtension = (what) => { | ||
console.log("trying to get:", what) | ||
return "something"; | ||
} |
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