docs/javascripts
Kevin Heis 912ac50034
End AB test on moving helpfulness prompt to bottom (#16552)
* End AB test on moving helpfulness prompt to bottom

* Move helpfulness to bottom of page only

* Update helpfulness.js

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2020-11-20 12:24:33 -08:00
..
README.md Hello git history spelunker! 2020-09-27 14:10:11 +02:00
all-articles.js "All articles" component of Actions landing page (#16318) 2020-11-12 12:57:30 -05:00
copy-code.js Add copy button to code blocks (#16052) 2020-10-16 10:55:35 -04:00
dev-toc.js fix Expand and Close toggling 2020-11-17 11:35:19 -05:00
display-platform-specific-content.js Hello git history spelunker! 2020-09-27 14:10:11 +02:00
events.js Fix chrome not sending exit events (#16488) 2020-11-19 10:02:53 -05:00
experiment.js End AB test on moving helpfulness prompt to bottom (#16552) 2020-11-20 12:24:33 -08:00
explorer.js Hello git history spelunker! 2020-09-27 14:10:11 +02:00
filter-code-examples.js Filterable code examples on Actions landing page (#16276) 2020-11-12 11:35:43 -05:00
get-csrf.js Send CSRF tokens over XHR (#15778) 2020-09-28 09:44:14 -07:00
helpfulness.js End AB test on moving helpfulness prompt to bottom (#16552) 2020-11-20 12:24:33 -08:00
index.js Sort middleware by categories (#16494) 2020-11-17 09:49:10 -08:00
localization.js Hello git history spelunker! 2020-09-27 14:10:11 +02:00
nav.js return early instead of erroring out on nonstandard page 2020-11-16 20:42:26 -05:00
print.js Remove Google Analytics (#16158) 2020-10-22 15:41:46 -07:00
search.js return early instead of erroring out on nonstandard page 2020-11-16 20:42:26 -05:00
sidebar.js remove inactive sidebar links (#16500) 2020-11-17 14:26:14 -08:00
user-agent.js Create a user agent parser for analytics (#15915) 2020-10-21 07:43:09 -07:00
wrap-code-terms.js Tweak code wrapping in tables (#16406) 2020-11-09 15:09:42 -05:00

README.md

Javascripts

The code in this directory is destined to run in a web browser!

The index.js file in this directory is bundled by Webpack. In development, we use webpack-dev-middleware to bundle automatically while running the server. In production, we run webpack --mode production via npm run build.

This file is then referenced in the footer:

<script src="/dist/index.js"></script>

Every other file in this directory is written as a module to be required in index.js. They all have this format:

module.exports = () => {
  // Do some cool browser stuff
  // Note: by the time this runs, the DOM will be ready. :)
}

In development, the bundle will recompile every time a file used by javascripts/index.js is changed. This ensures that you're always getting an up-to-date version of the script.

In production, the bundle is compiled during build-time.