Add babel-plugin-dedent to Djblets.

Review Request #8535 — Created Nov. 11, 2016 and submitted

Information

Djblets
release-0.10.x
5f8c0f4...

Reviewers

The way we do a lot of multi-line templates in JavaScript code is pretty ugly,
building a big list of strings and then joining them. ES6 template strings are
a potential solution, but they introduce a lot of ugly whitespace if there's
any indentation in them.

This change adds babel-plugin-dedent to our build, which adds a preprocessing
step that removes leading indentation from template strings which are marked
with the dedent tag. This looks like an ordinary tag, but it's processed
during the compilation step instead of at runtime.

  • Ran setup.py develop and saw babel-plugin-dedent get installed correctly.
  • Used the dedent tag in extension code.
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/dependencies.py
        djblets/settings.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/dependencies.py
        djblets/settings.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (276c481)
Loading...