diff --git a/docs/frontend/plain-js.md b/docs/frontend/plain-js.md index 36e9006f1..48eca3453 100644 --- a/docs/frontend/plain-js.md +++ b/docs/frontend/plain-js.md @@ -1,23 +1,23 @@ --- -title: Javascript and Initializers +title: JavaScript and Initializers --- -# Javascript and Initializers +# JavaScript and Initializers -DEV has two Javascript codebases. +DEV has two JavaScript codebases. One is located in the directory `app/assets/javascripts` and contains plain -Javascript (mostly ES5+) being served using +JavaScript (mostly ES5+) being served using [Sprockets](https://github.com/rails/sprockets-rails) which packages static assets. -Webpacker manages the other one, and you can read more about [in its own -guide](/frontend/webpacker). +Webpacker manages the other one, +[which you can read more about in this guide](/frontend/webpacker). This source code is not transpiled, only packaged and minified, and will be -limited to whatever flavour of Javascript can run on the user's web browser. +limited to whatever flavor of JavaScript can run on the user's web browser. -`app/assets/javascripts/application.js` contains the manifest Javascript file +`app/assets/javascripts/application.js` contains the manifest JavaScript file which is included globally in the primary template, `app/views/layouts/application.html.erb`. diff --git a/docs/frontend/webpacker.md b/docs/frontend/webpacker.md index f0f1efc58..483e481f8 100644 --- a/docs/frontend/webpacker.md +++ b/docs/frontend/webpacker.md @@ -4,10 +4,10 @@ title: Webpacker # Webpacker -DEV has two Javascript codebases. +DEV has two JavaScript codebases. -One contains plain Javascript, you can read about it -[in its own guide](/frontend/plain-js). +One contains plain JavaScript, +[which you can read more about in this guide](/frontend/plain-js). The other one is managed by [Webpacker](https://github.com/rails/webpacker), and it's located inside `/app/javascripts`, written using ES6+. diff --git a/docs/installation/windows.md b/docs/installation/windows.md index 652cbc7f7..7886a4c21 100644 --- a/docs/installation/windows.md +++ b/docs/installation/windows.md @@ -197,7 +197,7 @@ NOTE: Make sure to download **the OSS version**, `elasticsearch-oss`. > - Its first task is to install the `bundler` gem. Next, it will make > `bundler` install all the gems, including `Rails`, located in `Gemfile` > in the root of the repository. It also installs `foreman`. - > - It then installs javascript dependencies using the script in `bin/yarn` + > - It then installs JavaScript dependencies using the script in `bin/yarn` > file. These dependencies are located in `package.json` in the root of the > repository. > - Next, it uses various Rake files located inside the `lib` folder to setup diff --git a/docs/maintainers/deploying.md b/docs/maintainers/deploying.md index a57ea5d94..b5a084285 100644 --- a/docs/maintainers/deploying.md +++ b/docs/maintainers/deploying.md @@ -50,7 +50,7 @@ tests, we then run a series of other checks. These additional checks are split up between the different jobs. Here is a list of those additional checks that are run. -- Job 0 is where we run Javascript tests, Preact tests, and coverage checks. +- Job 0 is where we run JavaScript tests, Preact tests, and coverage checks. - Job 1 is where Travis builds Storybook to ensure its integrity, and where we check for any known vulnerabilities using `bundle-audit`. - Job 2 is where Travis fires up a Rails console to ensure the application loads diff --git a/docs/tests/test-flags.md b/docs/tests/test-flags.md index b47b2590d..93f1f6774 100644 --- a/docs/tests/test-flags.md +++ b/docs/tests/test-flags.md @@ -53,11 +53,11 @@ There are two ways to do this: ### `js: true` Flag -`js: true` indicates that we want the javascript on the page to be executed when +`js: true` indicates that we want the JavaScript on the page to be executed when the page is rendered, and a headless chrome instance will be initialized to do so (instead of the default [rack_test](https://github.com/teamcapybara/capybara#racktest) driver). One side -effect of running our javascript in our specs is that a lot of pages will hit +effect of running our JavaScript in our specs is that a lot of pages will hit Elasticsearch. Since we don't clean out Elasticsearch between every single spec (because it is very costly) this can lead to unexpected data being loaded for a spec. To prevent this from happening, we can use the `:stub_elasticsearch` flag.