Add babel-plugin-dedent to Djblets.
Review Request #8535 — Created Nov. 11, 2016 and submitted
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 thededent
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.