Commit d92baff6 authored by Mike Greiling's avatar Mike Greiling

address wording feedback

parent 43ceaf49
......@@ -51,18 +51,18 @@ properties once, and handle the actual animation with transforms.
Code that is contained within `main.js` and `commons/index.js` are loaded and
run on _all_ pages. **DO NOT ADD** anything to these files unless it is truly
needed _everywhere_. This includes ubiquitous libraries like `vue`, `axios`,
and `jQuery`, as well as code for the main navigation and sidebar. Where
possible we should aim to remove modules from these bundles to reduce our code
footprint.
needed _everywhere_. These bundles include ubiquitous libraries like `vue`,
`axios`, and `jQuery`, as well as code for the main navigation and sidebar.
Where possible we should aim to remove modules from these bundles to reduce our
code footprint.
### Page-specific JavaScript
Webpack has been configured to automatically generate entry point bundles based
on the file structure within `app/assets/javascripts/pages/*`. The directories
within the `pages` directory are meant to correspond to Rails controllers and
actions. These auto-generated bundles will be automatically included on the
corresponding pages.
within the `pages` directory correspond to Rails controllers and actions. These
auto-generated bundles will be automatically included on the corresponding
pages.
For example, if you were to visit [gitlab.com/gitlab-org/gitlab-ce/issues](https://gitlab.com/gitlab-org/gitlab-ce/issues),
you would be accessing the `app/controllers/projects/issues_controller.rb`
......@@ -82,8 +82,8 @@ In addition to these page-specific bundles, the code within `main.js` and
- **Identifying Controller Paths:**
If you are unsure what controller and action corresponds to a given page, you
can find this out by checking `document.body.dataset.page` while on any page
within gitlab.com.
can find this out by inspecting `document.body.dataset.page` within your
browser's developer console while on any page within gitlab.
- **Keep Entry Points Lite:**
Page-specific javascript entry points should be as lite as possible. These
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment