Skip to main content

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

Project description

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

{% endbundler %}

Please create github issue if you encounter any problem.

Checklist Items for future

  • Add support for Django & FastAPI
  • Add support to minify content

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

static-bundler-0.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

static_bundler-0.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file static-bundler-0.0.1.tar.gz.

File metadata

  • Download URL: static-bundler-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.11

File hashes

Hashes for static-bundler-0.0.1.tar.gz
Algorithm Hash digest
SHA256 eb1bba2fe45750441b19a04c7ecb744a6df9d300438755b32c9953035234a613
MD5 dc3a17b55b362e6a91bcccfa5132bc3b
BLAKE2b-256 ad695815d23639ef6bafcd7f7b6e4deffebc4f83b37307bbac5ca64d5230e312

See more details on using hashes here.

File details

Details for the file static_bundler-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for static_bundler-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57c633c3a0c9d010de2d71077dc6b7a3003df0adfa95fc62c22126d27e3cd4a1
MD5 d950aa7d9e52469d3554952ac4ca39af
BLAKE2b-256 790685f28c183e600f182d34b8dba3cb7626f577537009b89853ae48ea7746c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page