Skip to content

Latest commit

 

History

History
executable file
·
80 lines (54 loc) · 3.22 KB

README.md

File metadata and controls

executable file
·
80 lines (54 loc) · 3.22 KB

Lab Framework

HTML5-based open source scientific models, visualizations, graphing, and probeware from the Concord Consortium. This framework is deployed in the following places. These sites contain many examples of what it can do:

Setup Development

Prerequisites:

Setup the local Lab repository for development

  1. Clone the git repository
  2. cd lab
  3. npm install
  4. npm run build
  5. open another new terminal and run npm start
  6. open http://localhost:9191

Testing

Lab is using Jest test framework.

  • npm test will run all tests.
  • npm run test:coverage will execute all tests and display code coverage stats.

Modules

Note that most of the JS source files use paths relative to "src/lab" directory instead to the file itself. It's caused by the fact that this project has been using RequireJS and has been converted semi-automatically. It's fine but it requires custom configuration in a few places:

  • Webpack: resolve: { modules: [path.resolve(__dirname, "./src/lab"), "node_modules"] }
  • Jest, package.json: "modulePaths": [ "<rootDir>/src/lab" ]
  • NodeJS scripts have to setup NODE_PATH env variable (too see example config check md2d-node-api.js).

Contributing to Lab

If you think you'd like to contribute to Lab as an external developer:

  1. Create a local clone from the repository located here: http://github.com/concord-consortium/lab. This will by default have the git-remote name: origin.

  2. Make a fork of http://github.com/concord-consortium/lab to your account on github.

  3. Make a new git-remote referencing your fork. I recommend making the remote name your github user name. For example my username is stepheneb so I would add a remote to my fork like this:

     git remote add stepheneb [email protected]:stepheneb/lab.git
    
  4. Create your changes on a topic branch. Please include tests if you can. When your commits are ready push your topic branch to your fork and send a pull request.

Automated Browser Testing

Lab framework tests are automated using open source support from BrowserStack and SauceLabs.

For more information, please visit lab-selenium-tests repository.

More Documentation

SVG support is required to run Lab. IE 9+, FF, Chrome, Safari, iOS Safari, Chrome for Android all support SVG