This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Create a main script with clean programmer API. #7
Merged
Conversation
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
trying to expose a basic function that calls alert.
now for figuring out what i actually want to expose.
Eventually main is going to replace genomic.js.
The functionality has been duplicated in main.
This follows the general idea which was to have as much state as possible maintained in the main, keeping the rest of the code as pure as possible. add the invert_array function to utils.
Inspired by writing documentation. Don't force users to select or setup containers. They can just use strings that select for divs.
ultimately, we want to not have to require(.js) anything but oncoprint to use it, right? other than that, lgtm |
I'm using node's module system in this project. This allows me to avoid using requirejs which I've found probably does more harm than good. So the "linking" of the different files takes place at build time, not at runtime. This is what browserify does. So yes, the point of this is so that you can actually import an |
gideonite
pushed a commit
that referenced
this pull request
Apr 16, 2015
Create a main script with clean programmer API.
rnugraha
pushed a commit
to thehyve/oncoprintjs
that referenced
this pull request
Mar 14, 2018
Create a main script with clean programmer API.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
genomic.js
which was becoming overloaded and messy.main.js
attempts to be the single location for state management. It is also where the programmer API is defined.main.js
to be standalone JavaScript code to be imported into HTML. Therefore, the code intest-script.js
resembles what a user would actually do to use the OncoPrint.A lot of messiness is moved from
test-script.js
tomain.js
. In other words, create a stronger abstraction barrier so that user (programmer) code has little or no knowledge of the internal workings of the code. This is the way it is supposed to be.