Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Create a main script with clean programmer API. #7

Merged
merged 12 commits into from
Apr 16, 2015
Merged

Conversation

gideonite
Copy link
Contributor

  1. Create a main script to replace 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.
  2. Setup the gulp 'prod' task which is also the default task. It compiles main.js to be standalone JavaScript code to be imported into HTML. Therefore, the code in test-script.js resembles what a user would actually do to use the OncoPrint.

A lot of messiness is moved from test-script.js to main.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.

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.
@gideonite gideonite self-assigned this Apr 14, 2015
Inspired by writing documentation. Don't force users to select or setup
containers. They can just use strings that select for divs.
@adamabeshouse
Copy link
Contributor

ultimately, we want to not have to require(.js) anything but oncoprint to use it, right? other than that, lgtm

@gideonite
Copy link
Contributor Author

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 "oncoprint.js" file into your html and have an exposed oncoprint function to use.

gideonite pushed a commit that referenced this pull request Apr 16, 2015
Create a main script with clean programmer API.
@gideonite gideonite merged commit 90dffd4 into master Apr 16, 2015
@gideonite gideonite deleted the expose-api-pr branch April 16, 2015 07:23
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants