Skip to content

Commit

Permalink
Merge pull request #503 from nasa-gibs/module-loaders
Browse files Browse the repository at this point in the history
Module loaders
  • Loading branch information
localjo authored Jan 22, 2018
2 parents dba8316 + daedd72 commit 0875fea
Show file tree
Hide file tree
Showing 415 changed files with 18,964 additions and 86,367 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ options/*
reports/*
web/ext/*
web/dist/*
web/build/*
24 changes: 6 additions & 18 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script"
"sourceType": "module",
"ecmaFeatures": {
"jsx": false
}
},
"extends": "standard",
"rules": {
"semi": ["error", "always"],
"space-before-function-paren": "off"
"space-before-function-paren": "off",
"object-curly-spacing": ["warn", "always"],
},
"overrides": [
{
"files": [ "web/**/*.js", "test/**/*.js" ],
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script",
"ecmaFeatures": {
"jsx": false
}
},
"rules": {
"no-octal": "warn",
"no-unused-vars": "warn",
Expand Down Expand Up @@ -56,15 +53,6 @@
"standard/computed-property-even-spacing": "warn",
"wrap-iife": "warn",
"new-cap": "warn"
},
"globals": {
"wv": true,
"wvx": true,
"WVC": true,
"buster": true,
"jQuery": true,
"$": true,
"_": true
}
}
]
Expand Down
File renamed without changes.
74 changes: 38 additions & 36 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,61 @@

Thanks for considering contributing and making our planet easier to explore!

We'd be quite excited if you'd like to contribute to Worldview! Whether you're finding bugs, adding new features, fixing anything broken, or improving documentation, get started by submitting an issue or pull request!
We'd be quite excited if you'd like to contribute to Worldview! Whether you're
finding bugs, adding new features, fixing anything broken, or improving
documentation, get started by submitting an issue or pull request!

## Submitting an Issue

If you have any questions or ideas, or notice any problems or bugs, first [search open issues](https://github.com/nasa-gibs/worldview/issues) to see if the issue has already been submitted. We may already be [working on the issue](#what-were-working-on). If you think your issue is new, you're welcome to [create a new issue](https://github.com/nasa-gibs/worldview/issues/new).
If you have any questions or ideas, or notice any problems or bugs, first
[search open issues](https://github.com/nasa-gibs/worldview/issues) to see if
the issue has already been submitted. We may already be
[working on the issue](#what-were-working-on). If you think your issue is new,
you're welcome to [create a new issue](https://github.com/nasa-gibs/worldview/issues/new).

## Pull Requests

If you want to submit your own contributions, follow these steps;

* Fork the Worldview repo
* Create a new branch off of the branch you'd like to contribute to
* ** Note: ** If there is not a feature branch already created for you to branch off of, you will want to branch off of `development` to create your own feature branch. We only branch directly off of `master` to resolve urgent bugs.
* If an issue does't already exist, submit one (see above)
* [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork into the target branch of the nasa-gibs/worldview repo
* Be sure to [mention the corresponding issue number](https://help.github.com/articles/closing-issues-using-keywords/) in the PR description, i.e. "Fixes [#480](https://github.com/nasa-gibs/worldview/issues/480)"
* Create a new branch from the branch you'd like to contribute to
* *Note:* If you're not branching from an existing feature branch, create your branch from `development` for new features or `master` for urgent bug fixes.
* If an issue doesn't already exist, [submit one](#submitting-an-issue)
* [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork into the target branch of the `nasa-gibs/worldview` repo
* Be sure to [mention the issue number](https://help.github.com/articles/closing-issues-using-keywords/) in the PR description, i.e. "Fixes [#480](https://github.com/nasa-gibs/worldview/issues/480)"
* Upon submission of a pull request, the Worldview development team will review the code
* The request will then either be merged, declined, or an adjustment to the code will be requested

## Guidelines

We ask that you follow these guidelines with your contributions;

### Unit Tests
### Style Guidelines

All of the unit tests for this project need to pass before your submission will be accepted. You can run `npm test` in the command line after making changes to verify that the tests pass. If you add new functionality, please consider adding tests for that functionality as well.
Please lint your code with `npm run lint`. Our style rules are defined in
`.stylelintrc` and `.eslintrc`. We follow a modified version of
[Standard JS Rules](https://github.com/standard/standard#the-rules), with
semi-colons. You can install linting plugins in your editor to check against
our style guides automatically:

### End-to-end Tests
#### Atom

You can run the included end-to-end tests to test the app in Chrome and Firefox. The tests run the Cucumber features in the `./e2e/features` using Nightwatch and Selenium.
* [AtomLinter](https://atomlinter.github.io/)
* [`linter-eslint`](https://atom.io/packages/linter-eslint)
* [`linter-stylelint`](https://atom.io/packages/linter-stylelint)

To run tests in Chrome;
#### Sublime

1) Run `npm run e2e:chrome`
* [SublimeLinter](http://www.sublimelinter.com/en/latest/)
* [`SublimeLinter-eslint`](https://github.com/roadhump/SublimeLinter-eslint)
* [`SublimeLinter-contrib-stylelint`](https://github.com/kungfusheep/SublimeLinter-contrib-stylelint)

To run tests in Firefox;
### Tests

1) [Create a new Firefox profile](https://developer.mozilla.org/en-US/Firefox/Multiple_profiles) called 'nightwatch'
2) Run `npm run e2e:firefox`

You can run tests for both browsers in sequence by running `npm run e2e`,

To run tests in Browserstack;

1) Log into your [Browserstack automation](https://www.browserstack.com/automate) and get your username and access key from the upper left
2) Set these environmental variables in your shell;
- `export BROWSERSTACK_ACCESS_KEY=yourkeyhere`
- `export BROWSERSTACK_USER=yourusernamehere`
3) Configure `./e2e/environments.json` with the browsers you want to test.
4) Run `npm run browserstack`

#### End-to-end Test Reports

After running end-to-end tests, reports are generated and saved in `./e2e/reports`. You can convert these to HTML by running `npm run report <environment>` where `<environment>` is either the lowercase name of the browser for local tests (`chrome` or `firefox`) or the name of the Browserstack environment, such as `Chrome_61-0_OS_X_El_Capitan-1` (you can get this name from the JSON files in `./e2e/reports`).

The end-to-end tests are a little bit flaky, so they aren't required to pass before a submission will be accepted, but you should run them and read through the results to make sure that you haven't broken any functionality. Please also consider adding end-to-end tests to cover any functionality you add.
All of the unit tests for this project need to pass before your submission will
be accepted. If you add new functionality, please consider adding tests for that
functionality as well. See [Testing](doc/testing.md) for more information about
testing.

### Commits

Expand All @@ -74,9 +73,12 @@ Improve contributing docs and consolidate them in the standard location https://

## What We're Working On

Please see our [Roadmap](https://github.com/nasa-gibs/worldview/projects/7) for an overview of what we're planning.
Please see our [Roadmap](https://github.com/nasa-gibs/worldview/projects/7) for
an overview of what we're planning. We also track the progress of [Worldview](https://github.com/nasa-gibs/worldview), [Worldview-Components](https://github.com/nasa-gibs/worldview-components), and [Worldview-Options-EOSDIS](https://github.com/nasa-gibs/worldview-options-eosdis)
using a public [Waffle.io Board](https://waffle.io/nasa-gibs/worldview).

We use GitHub labels to organize issues we're working on. Here are the labels we use, along with descriptions of what they mean. Click on the headings or badges below to see the GitHub issues tagged with each label.
We use GitHub labels to organize issues we're working on. Here are the labels
we use, along with descriptions of what they mean. Click on the headings or badges below to see the GitHub issues tagged with each label.

### [`bug` ![Issues tagged with 'bug'](https://img.shields.io/github/issues-raw/nasa-gibs/worldview/bug.svg)](https://github.com/nasa-gibs/worldview/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

Expand Down Expand Up @@ -112,7 +114,7 @@ These are issues that have a PR ready to resolve them, and are just waiting to b

### [`technical` ![Issues tagged with 'technical'](https://img.shields.io/github/issues-raw/nasa-gibs/worldview/technical.svg)](https://github.com/nasa-gibs/worldview/issues?q=is%3Aopen+is%3Aissue+label%3Atechnical)

These issues are related to our technical implementation (refactoring, dependency changes, etc), they're developer focused, and don't directly add new features for end users.
These issues are related to our technical implementation (refactoring, dependency changes, etc.), they're developer focused, and don't directly add new features for end users.

### [`under development` ![Issues tagged with 'under development'](https://img.shields.io/github/issues-raw/nasa-gibs/worldview/%22under%20development%22.svg)](https://github.com/nasa-gibs/worldview/issues?q=is%3Aopen+is%3Aissue+label%3A%22under%20development%22)

Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/build
/web/build
/dist
/node_modules
/web/ext/node_modules/*
python
.python/
.node-virtualenv/
.ropeproject/
*.pyc
.project
.settings
Expand Down
3 changes: 1 addition & 2 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"selector-max-id": 2,
"selector-max-universal": 1,
"selector-no-vendor-prefix": true,
"at-rule-whitelist": ["media", "charset", "font-face"],
"at-rule-whitelist": ["media", "charset", "font-face", "import"],
"at-rule-no-vendor-prefix": true,
"color-hex-case": "lower",
"color-hex-length": "short",
Expand Down Expand Up @@ -110,7 +110,6 @@
"media-query-list-comma-newline-before": "never-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"at-rule-empty-line-before": "always",
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always",
"at-rule-semicolon-newline-after": "always",
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- '6.8.1'
- '8.8.1'
before_install: npm install -g grunt-cli
install: npm install
before_script: npm run build:tests
Loading

0 comments on commit 0875fea

Please sign in to comment.