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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for static_bundler-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57c633c3a0c9d010de2d71077dc6b7a3003df0adfa95fc62c22126d27e3cd4a1 |
|
MD5 | d950aa7d9e52469d3554952ac4ca39af |
|
BLAKE2b-256 | 790685f28c183e600f182d34b8dba3cb7626f577537009b89853ae48ea7746c9 |