question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion: optional use of css-html-js-minify

See original GitHub issue

Hi! In order to reduce the render files as well as _repr_html, why not use css-html-js-minify: Example:

def _repr_html_(self):
        self.chart_id = uuid.uuid4().hex
        html = super()._repr_html_()
        try:
            from css_html_js_minify import html_minify
            html = html_minify(html, comments=False)
        except ImportError:
            pass
        return html

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ffarellacommented, Dec 21, 2018

This minifies also JS!!! (i.e chart options). I reduced my export size by about 5 (huge numpy array for time-series) by using this. Converting pandas Series and numpy arrays to list adds a lot of whitespace…

0reactions
ffarellacommented, Jan 28, 2019

No need for minification! Just change the dump parameter to: json.dumps(options, indent=None, cls=TRANSLATOR.json_encoder, separators=(',', ':'))

Read more comments on GitHub >

github_iconTop Results From Across the Web

The complete best practices for minifying CSS
Minification alters the content of code. It reduces code file size by stripping out unwanted spaces, characters, and formatting, resulting in ...
Read more >
How to Minify CSS and Speed Up Your Website
Reduce file size and page load times by deciding to minify CSS code — learn how to do it easily and without affecting...
Read more >
How to Minify Your Website's CSS, HTML & Javascript
We minify the files of a website containing CSS, HTML, and Javascript code so your web browser can read them faster. Here is...
Read more >
How to Minify Your WordPress Site's CSS, HTML & ...
CSS Minify ​​ The CSS Minifier plugin. Minifying your CSS with this plugin couldn't be any easier – just install, activate, go to...
Read more >
How to Minify JavaScript — Recommended Tools and ...
Code minification means optimizing code to save space, reduce page load times, and lower website bandwidth usage. However, the biggest concern ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found