Use babel-plugin-dedent in Review Board.

Review Request #8515 — Created Nov. 2, 2016 and submitted

Information

Review Board
release-3.0.x
7357b39...

Reviewers

In another change, I've added an npm dependency to Djblets to install
babel-plugin-dedent, which allows us to use ES6 template strings without
filling our compiled output with a ton of ugly spaces. This change enables it
for Review Board as well.

  • Ran setup.py develop and saw babel-plugin-dedent get installed correctly.
  • Used the dedent tag in extension code.
Description From Last Updated

This will need to also handle the extension packaging side. Right now, djblets.extensions.packaging:BuildStaticFiles.install_pipeline_dependencies installs the necessary NPM packages depending on …

chipx86chipx86

'django_reset' imported but unused

reviewbotreviewbot

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot

Should be alphabetical.

chipx86chipx86

'django_reset' imported but unused

reviewbotreviewbot

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/dependencies.py
        setup.py
        reviewboard/settings.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/dependencies.py
        setup.py
        reviewboard/settings.py
    
    
  2. reviewboard/settings.py (Diff revision 1)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 1)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. 
      
    1. Oh, and out of curiousity, can you show what a sample string would compile down to? Curious to see how the plugin works.

    2. See https://www.npmjs.com/package/babel-plugin-dedent for how it works.

  2. Show all issues

    This will need to also handle the extension packaging side. Right now, djblets.extensions.packaging:BuildStaticFiles.install_pipeline_dependencies installs the necessary NPM packages depending on what's being used. We should either say that we're leaning on this for Djblets (which we probably should anyway -- we might want this plugin for Djblets JavaScript code) or we'll need to override this behavior in Review Board (which will require some Djblets work anyway to make that easier).

    I'd say let's just move this change over to Djblets instead, and then we'll get the best of all worlds.

  3. setup.py (Diff revision 1)
     
     
     
    Show all issues

    Should be alphabetical.

  4. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/settings.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/settings.py
    
    
  2. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (f1a5245)