Socket
Socket
Sign inDemoInstall

static-bundler

Package Overview
Dependencies
4
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    static-bundler

Bundles multiple css/js files into one and reduce request time


Maintainers
1

Readme

JS/CSS Bundle

Bundles multiple css or js files into one to reduce worker load for development server (flask) or webserver (nginx) connections

Usage

from flask import Flask
from static_bundle import register_extension

app = Flask(__name__, static_folder='static')

register_extension(app)

{% bundler 'cache/vendor.css' %}
    <link rel="stylesheet" type="text/css"
          href="{{ file_path_for('static', filename = 'fontawesome-free-5.7.1-web/css/fontawesome.min.css') }}">
        
    <link rel="stylesheet" type="text/css"
          href="{{ file_path_for('static', filename = 'css/bootstrap_table_1.18.3/bootstrap-table.css') }}">
    <link rel="stylesheet" type="text/css"
          href="{{ file_path_for('static', filename = 'css/bootstrap_table_1.18.3/extensions/filter-control/bootstrap-table-filter-control.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ file_path_for('static', filename = 'css/datetime_picker_css.css') }}">

{% endbundler %}

This will generate cache/vendor.css inside static folder and generate final output like below

<link rel="stylesheet" type="text/css" href="/static/cache/vendor.css">

Please create github issue if you encounter any problem.

Checklist Items for future
  • Add support for Django & FastAPI
  • Add support to minify content

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc