Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Node Deps #1626

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[![Build status](https://travis-ci.org/GMOD/jbrowse.svg?branch=dev)](https://travis-ci.org/GMOD/jbrowse)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)

Note: most of our current development is on JBrowse 2, see our github repo here https://github.com/gmod/jbrowse-components

We will still continue to make bug fix and maintenance releases of JBrowse 1 but most development is on JBrowse 2

Note: if you are using plugins with a dev version of JBrowse or installing from GitHub, you may need to use node <=14 (e.g. node >=15 may fail) due to node-sass not compiling on newer node versions easily. See https://github.com/GMOD/jbrowse/pull/1607 for details


# Installing JBrowse

To install jbrowse, visit http://jbrowse.org/blog and download the latest JBrowse zip file. See instructions at http://jbrowse.org/docs/installation.html for a tutorial on setting up a sample instance.


# Install JBrowse from GitHub (for developers)

To install from GitHub, you can simply clone the repo and run the setup.sh script
Expand All @@ -14,26 +20,26 @@ To install from GitHub, you can simply clone the repo and run the setup.sh scrip
cd jbrowse
./setup.sh




## Develop JBrowse or JBrowse plugins

To obtain a jbrowse development environment, e.g. for jbrowse source code editing or plugin development (or just running jbrowse from the github repo)


git clone https://github.com/GMOD/jbrowse
cd jbrowse
./setup.sh # not strictly necessary if you don't need to sample data

If you are going to edit the jbrowse source code, then also run

yarn watch

And keep `yarn watch` running in the background as you create changes to your code.

To start a temporary dev server, can also run

yarn start

And keep this running in the background, this will launch a webserver running jbrowse on port 8082.

Alternatively, you can put this jbrowse folder in your webserver (e.g. /var/www/html/) directory. The key is, if you are modifying jbrowse or plugin source code, to run `yarn watch` in the background, so that webpack incorporates your changes in either the main codebase (src/JBrowse folder) or any plugins (plugins/YourPlugin).
Expand All @@ -46,20 +52,17 @@ In order to make downloads faster you can set a mirror for the npm registry
npm config set puppeteer_download_host=http://cnpmjs.org/mirrors
export ELECTRON_MIRROR="http://cnpmjs.org/mirrors/electron/"


## Notes on setting up a JBrowse server

* If you don't have a webserver such as apache or nginx, you can run `npm run start` and open http://localhost:8082/index.html?data=sample_data/json/volvox to see the code running from a small express.js server.

* You can alternatively just move the jbrowse folder into a nginx or apache root directory e.g. /var/www/html and then navigate to http://localhost/jbrowse
- If you don't have a webserver such as apache or nginx, you can run `npm run start` and open http://localhost:8082/index.html?data=sample_data/json/volvox to see the code running from a small express.js server.

- You can alternatively just move the jbrowse folder into a nginx or apache root directory e.g. /var/www/html and then navigate to http://localhost/jbrowse

_Note: you should avoid using sudo tasks like ./setup.sh and instead use chown/chmod on folders to your own user as necessary._

*Note: you should avoid using sudo tasks like ./setup.sh and instead use chown/chmod on folders to your own user as necessary.*
_Also note: After editing a file, you must re-run the webpack build with `npm run build` or you can keep webpack running in "watch" mode by running `npm run watch`._

*Also note: After editing a file, you must re-run the webpack build with `npm run build` or you can keep webpack running in "watch" mode by running `npm run watch`.*

*Also also note: by default `git clone` will clone the master branch which contains the latest stable release. The latest development branch is called dev. Run `git checkout dev` after clone to retrieve this*
_Also also note: by default `git clone` will clone the master branch which contains the latest stable release. The latest development branch is called dev. Run `git checkout dev` after clone to retrieve this_

# Installing as an npm module

Expand Down Expand Up @@ -88,14 +91,14 @@ The Travis-CI suite runs Perl, JavaScript, and Selenium automated tests. To run
pip install selenium nose
MOZ_HEADLESS=1 SELENIUM_BROWSER=firefox JBROWSE_URL='http://localhost/jbrowse/index.html' nosetests

Supported browsers for SELENIUM_BROWSER are 'firefox', 'chrome', 'phantom', and 'travis_saucelabs'. The Sauce Labs + Travis
Supported browsers for SELENIUM_BROWSER are 'firefox', 'chrome', 'phantom', and 'travis_saucelabs'. The Sauce Labs + Travis
one will only work in a properly configured Travis CI build environment.

# Manual testing

<img style="display: block; margin: 1em auto" src="img/browserstack-logo-600x315.png" width="200" alt="Browserstack"/>

JBrowse has a free open source account on [Browserstack](http://browserstack.com/) for manual testing. Contact @rbuels for access.
JBrowse has a free open source account on [Browserstack](http://browserstack.com/) for manual testing. Contact @rbuels for access.

# Generating Packaged Builds

Expand All @@ -113,13 +116,12 @@ To run the Electron app in debug mode run the following
npm install -g electron
electron browser/main.js


# Making a JBrowse release

NOTE: Beginning in 1.12.4,

1. Run `build/release.sh $newReleaseVersion $nextReleaseVersion-alpha.0 notes.txt`, where notes.txt is any additional information to add to a blogpost. Then check its work, and then run the `git push` command it suggests to you. This makes a tag in the repository for the release, named, e.g. `1.6.3-release`. This should cause Travis CI
to create a release on GitHub under https://github.com/GMOD/jbrowse/releases
1. Run `build/release.sh $newReleaseVersion $nextReleaseVersion-alpha.0 notes.txt`, where notes.txt is any additional information to add to a blogpost. Then check its work, and then run the `git push` command it suggests to you. This makes a tag in the repository for the release, named, e.g. `1.6.3-release`. This should cause Travis CI
to create a release on GitHub under https://github.com/GMOD/jbrowse/releases

1. Test that the page loads in IE11 on BrowserStack

Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@
"dependencies": {
"express": "^4.15.4",
"fs-extra": "^4.0.1",
"node-fetch": "^2.2.0",
"ini": "^1.3.8",
"lodash": "^4.17.21",
"node-fetch": "^3.2.0",
"node-getopt": "^0.2.3",
"normalize-wheel": "^1.0.1",
"object-hash": "^1.3.1",
"optimist": "^0.6.1",
"shelljs": "^0.7.8"
"shelljs": "^0.8.5",
"y18n": "^5.0.8"
},
"devDependencies": {
"@gmod/bam": "^1.1.6",
Expand All @@ -51,7 +54,7 @@
"@gmod/twobit": "^1.1.2",
"@gmod/vcf": "^2.0.2",
"ajv": "^6.2.1",
"ava": "^0.25.0",
"ava": "^3.15.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.4",
Expand All @@ -60,38 +63,38 @@
"babel-polyfill": "^6.26.0",
"babel-preset-es2015-without-strict": "^0.0.4",
"clean-webpack-plugin": "^0.1.18",
"copy-webpack-plugin": "^4.6.0",
"copy-webpack-plugin": "^5.1.2",
"css-loader": "^2.0.0",
"dgrid": "^1.1.0",
"dijit": "^1.14.2",
"dojo": "^1.14.2",
"dojo": "^1.16.2",
"dojo-dstore": "^1.1.1",
"dojo-util": "^1.14.2",
"dojo-webpack-plugin": "^2.8.5",
"dojox": "^1.14.2",
"electron": "^3.0.12",
"electron-packager": "^12.0.1",
"electron": "^16.0.8",
"electron-packager": "^14.2.1",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.10.0",
"filesaver.js": "^0.2.0",
"http-range-fetcher": "^1.2.1",
"http-range-fetcher": "^1.2.5",
"imports-loader": "^0.8.0",
"jasmine-node": "^3.0.0",
"node-sass": "^4.12.0",
"node-sass": "^7.0.1",
"puppeteer": "^1.0.0",
"quick-lru": "^2.0.0",
"regexp-replace-loader": "^1.0.1",
"sass-loader": "^6.0.7",
"snake-case": "^2.1.0",
"spectron": "^5.0.0",
"spectron": "^15.0.0",
"style-loader": "^0.20.2",
"tenacious-fetch": "^2.1.0",
"tmp": "^0.0.33",
"uglifyjs-webpack-plugin": "^1.2.2",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^1.0.0",
"util-deprecate": "^1.0.2",
"webpack": "^4.26.1",
"webpack": "^4.9.1",
"webpack-cli": "^3.1.2",
"whatwg-fetch": "^2.0.4",
"yarn": "^1.16.0"
Expand Down
Loading