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

Update dev_setup.md #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
86 changes: 36 additions & 50 deletions docs/dev_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,53 @@ TCC/LE, to overcome that limitation.

1. Install dependencies

Lovefield uses npm as its dependency manager. Run `npm update` to install
packages required by Lovefield.
Lovefield uses npm as its dependency manager. Run `npm update` to install packages required by Lovefield.

2. Build Lovefield

Lovefield uses Closure JavaScript Compiler to validate/minify/uglify its
code. The compiler is brought down by npm automatically.
Lovefield uses Closure JavaScript Compiler to validate/minify/uglify its code. The compiler is brought down by npm automatically.

Lovefield uses gulp as its build manager. Run `gulp` to see the commands
supported.
Lovefield uses gulp as its build manager. Run `gulp` to see the commands supported.

3. Test Lovefield

Lovefield uses Selenium WebDriver to run automated test. There are two ways
of running unit tests:
Lovefield uses Selenium WebDriver to run automated test. There are two ways of running unit tests:

a. Test locally
a. Test locally

You will need to [download](http://docs.seleniumhq.org/download) and install
the WebDrivers manually. Then run
`gulp test --target=tests --browser=<browser>` to test locally. Local testing
are supposed to be used for debugging and quick turn around.
You will need to [download](http://docs.seleniumhq.org/download) and install the WebDrivers manually. Then run `gulp test --target=tests --browser=<browser>` to test locally. Local testing are supposed to be used for debugging and quick turn around.

b. Test using Sauce Labs
b. Test using Sauce Labs

You will need to register an account on [Sauce Labs](https://saucelabs.com),
and run [Sauce Connect](https://docs.saucelabs.com/reference/sauce-connect)
on your computer. Then run the following script (assuming Linux/Mac and bash
is used, Windows users please adjust the script to fit your environment):
You will need to register an account on [Sauce Labs](https://saucelabs.com), and run [Sauce Connect](https://docs.saucelabs.com/reference/sauce-connect) on your computer. Then run the following script (assuming Linux/Mac and bash is used, Windows users please adjust the script to fit your environment):

```bash
export SAUCE_USERNAME=<your username>
export SAUCE_ACCESS_KEY=<your sauce token>
export SELENIUM_BROWSER=chrome
gulp test --target=tests
export SELENIUM_BROWSER=firefox
gulp test --target=tests
export SELENIUM_BROWSER=ie
gulp test --target=tests
export SELENIUM_BROWSER=safari
gulp test --target=tests
```
You can find your user name and sauce token
[here](https://docs.saucelabs.com/tutorials/node-js).

4. Make contributions

Make sure you are okay with the rules in [CONTRIBUTING](../CONTRIBUTING.md).
If not, you can stop reading here.

For your contribution to be accepted, your change must pass the following commands (again, assuming Linux/Mac):

```bash
gulp build --target=lib --mode=opt
gulp build --target=tests
gulp lint
gulp test --target=spac
export SAUCE_USERNAME=<your username>
export SAUCE_ACCESS_KEY=<your sauce token>
export SELENIUM_BROWSER=chrome
Expand All @@ -61,39 +77,9 @@ TCC/LE, to overcome that limitation.
export SELENIUM_BROWSER=safari
gulp test --target=tests
```
You can find your user name and sauce token
[here](https://docs.saucelabs.com/tutorials/node-js).

4. Make contributions
[JavaScript style](https://google.github.io/styleguide/javascriptguide.xml) is strictly enforced with no mercy. Unfortunately, the linter will not lint everything, so you may have more lints during code review.

Make sure you are okay with the rules in [CONTRIBUTING](../CONTRIBUTING.md).
If not, you can stop reading here.

For your contribution to be accepted, your change must pass the following
commands (again, assuming Linux/Mac):

```bash
gulp build --target=lib --mode=opt
gulp build --target=tests
gulp lint
gulp test --target=spac
export SAUCE_USERNAME=<your username>
export SAUCE_ACCESS_KEY=<your sauce token>
export SELENIUM_BROWSER=chrome
gulp test --target=tests
export SELENIUM_BROWSER=firefox
gulp test --target=tests
export SELENIUM_BROWSER=ie
gulp test --target=tests
export SELENIUM_BROWSER=safari
gulp test --target=tests
```
[JavaScript style](https://google.github.io/styleguide/javascriptguide.xml)
is strictly enforced with no mercy. Unfortunately, the linter will not lint
everything, so you may have more lints during code review.

Your pull request will not trigger Travis CI due to security concerns. As a
result, you'll need to run the script above locally to avoid straight decline.
Your pull request will not trigger Travis CI due to security concerns. As a result, you'll need to run the script above locally to avoid straight decline.

## Markdowns

Expand Down