Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Building from the Source Code

Pieter edited this page Mar 26, 2018 · 16 revisions

Building from source is not required to create a JW Showcase site and should only be done by advanced users. Most users should download the latest precompiled release.

Install Required Tools

Clone the JW Showcase source code:

git clone https://github.com/jwplayer/jw-showcase.git

Make sure you have Node, NPM and Compass installed on your machine, then install Grunt globally using NPM.

$ gem install compass
$ npm i grunt-cli -g

Install NPM dependencies:

$ cd /path/to/showcase-source/
$ npm install

Generating your Site

To generate your Showcase site, run grunt build, copy the contents of the resulting dist/ folder to your web root, then follow the instructions in Getting Started.

Specifying a Custom Path to Your Showcase

By default, Showcase apps are assumed to be in the root level (/) of your site. If you want to specify a different location (for example, /videos), you can specify the path using the --url option when you run grunt. This will populate the <base href=""> tag and <meta property="og:image"> tags in your site with your url.

$ grunt build --url=http://yourdomain.com/path/to/JWShowcase/

Testing Locally

You can test your site in a local environment using Grunt. To start the Grunt livereload server on your local machine run grunt serve.

Automated Testing

To run Protractor tests locally make sure you have an running selenium standalone server on port 4444. Then execute the following command to start testing.

$ grunt test:protractor:local

To test in BrowserStack add the credentials to your environment variables.

$ export BROWSERSTACK_USER=username
$ export BROWSERSTACK_KEY=authkey

Then run the following Grunt task.

$ grunt test:protractor:browserstack