Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !31607

Use Babel and ES6 in docs JS files

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/NotWoods/babel into main Sep 06, 2020
  • Overview 2
  • Commits 11
  • Pipelines 0
  • Changes 11

Created by: NotWoods

Fixes #30818 (closed)

Updates the assets/js path inside of site so that the code is passed through Babel, using the root Babel RC file.

Additionally adds a ESLint config in the assets folder to enable a higher ecma version, but only for doc files.


I didn't pass extra_js scripts through Babel, since the equivalent extra_css scripts in the Examples folder don't get processed. I can add this if desired.

Preview: https://deploy-preview-31607--twbs-bootstrap.netlify.app/

TODO:

  • Revisit if we need babel after all
  • Array.from instead of Array.prototype.slice.call
  • Look into inheriting from root .eslintrc.json
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/NotWoods/babel