Skip to content
Source for Jasmine's documentation
HTML JavaScript CSS Other
Branch: master
Clone or download

Latest commit

slackersoft Merge pull request #129 from eobrain/master
Use npx in instructions and make clear that global install is optional.
Latest commit 47d5431 Feb 24, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create Dec 28, 2017
_api Fixed 'since' versions in MatchersUtil Feb 13, 2020
_faq Add how to help FAQ Aug 10, 2017
_includes ssl-ify links back to Pivotal Jun 4, 2019
_jsdoc_plugins Add tutorial for async work and fix links from API docs to tutorials Mar 1, 2018
_layouts Move anchors initialization into the init script Jun 12, 2019
_tutorials Added a tutorial for custom object formatters Feb 13, 2020
_versions Add a message to older versions of the docs to point to the current v… Jun 4, 2019
css Provide anchorjs links for article section headers Jun 8, 2019
examples Add example suites to test custom reporters against Feb 2, 2018
images replaced .png files with .svg Aug 2, 2018
lib/jasmine-1.3.1 First attempt at introduction.js for 2.0 Oct 3, 2013
pages Update instructions for local node install to use npx. Feb 16, 2020
scripts Move anchors initialization into the init script Jun 12, 2019
setup Encourage local dev installation. Feb 16, 2020
src Update tests for new version paths Oct 17, 2016
.gitignore Ignore Jekyll cache Feb 13, 2020
.ruby-version Bump Ruby version for compatibility with current bundler Sep 10, 2019
Gemfile Add redirects from old pages to new tutorials Feb 2, 2018
Gemfile.lock Regenerate API docs for edge to clean up some duplications Feb 3, 2020
LICENSE Updating copyright to Pivotal Labs Sep 2, 2013 Expand contributor instructions in README May 31, 2019
Rakefile update jasmine-core to add naming for new jasmineDone data Apr 3, 2018
_config.yml Add redirects from old pages to new tutorials Feb 2, 2018
favicon.ico First attempt at introduction.js for 2.0 Oct 3, 2013
index.html Specify jasmine-core has no dependencies Jan 23, 2019
jsdoc-conf.json update jasmine-core to add naming for new jasmineDone data Apr 3, 2018
package-lock.json bump dependencies Aug 7, 2019
package.json bump dependencies Aug 7, 2019

Jasmine doc site


Prepare your local environment

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-docs)
  3. Ensure ruby and bundler (gem install bundler) are installed
  4. Install ruby dependencies (bundle)
  5. You can install them in the local folder, instead of globally for the system with (bundle install --path vendor/bundle)
  6. Install JS dependencies (npm install)

Make your changes

You're ready to make some changes to the documentation!

├── _api/                   # Auto-generated API documentation - don't edit by hand!
├── _faq/                   # Various FAQ pages
├── _includes/              # Jekyll snippets (headers, footers, etc.)
├── _layouts/               # Jekyll layouts (overall page structure)
├── _tutorials/             # Tutorials / How-to Articles
│   ├── src/                # Docco source files for "side-by-side" tutorials
│   ├── *.html              # Auto-generated docco tutorials - don't by edit by hand!
│   ├── *.md                # Newer markdown tutorials
├── css/                    # Stylesheets (SCSS)
├── examples/               # Raw javascript examples of jasmine tests (rare)
├── pages/                  # Various documentation pages

Note the auto-generated files _api/** and _tutorials/*.html, don't edit these files as any changes you make to them will be lost the next time the documentation is generated.

Test your changes

First, update the jasmine API docs:

  • Update local copy of jasmine using bundle exec rake update_edge_jasmine
  • Run npm run jsdoc to update the API documentation

Then, regenerate the tutorials:

  • bundle exec rake tutorials

Now preview your changes locally:

  • bundle exec jekyll serve --baseurl ''

Submit your changes

  • Commit your changes (git commit -am 'Add some docs')
  • Push to the branch (git push origin my-new-docs)
  • Create new Pull Request

Advanced: providing a live demo

If you're making complicated or potentially controversial changes to the documentation, it may make sense to provide a live demo that the reviewer can use to compare side-by-side with the current production site.


From the terminal in your local fork of, create the branch gh-pages:

  • git checkout master
  • git checkout -b gh-pages
  • git push -u origin HEAD

Next, enable GitHub Pages for your fork:

  • Open your browser and navigate to your fork in GitHub
  • Click the Settings link
  • Under the GitHub Pages header, select Source -> gh-pages branch
  • The page will reload. Wait a few minutes, then click the link provided
  • You now have a personal live demo under https://<username>

Demoing your desired branch

Now that you've configured your live demo link to show the gh-pages branch, you can update what is shown at any time by resetting that branch to your newest changes. For example, if you've just pushed up the branch my-complicated-change, update your live demo by entering the following in your terminal:

  • git checkout gh-pages
  • git reset --hard my-complicated-change
  • git push -f

Wait a few minutes, and you live demo will now be showing your changes in the my-complicated-change branch. You can then include a link to the demo in your pull request.

You can’t perform that action at this time.