-
Notifications
You must be signed in to change notification settings - Fork 35
Building from the Source Code
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.
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
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.
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/
You can test your site in a local environment using Grunt. To start the Grunt livereload server on your local machine run grunt serve
.
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