Skip to main content

django-pipeline compiler for browserify, requires browserify to be installed.

Project description

django-pipeline-browserify is a compiler for django-pipeline. Making it really easy to use browserify with Django via pipeline.

To install it:

sudo npm install -g browserify
pip install django-pipeline-browserify

And add it as a compiler to pipeline in your django settings.py:

PIPELINE = {
    # ...
    'COMPILERS': ('pipeline_browserify.compiler.BrowserifyCompiler', ),
    # ...
)

To add source maps during development (or any other browserify args):

if DEBUG:
    PIPELINE['BROWSERIFY_ARGUMENTS'] = '-d'

To add variable assignments before the browserify command:

PIPELINE['BROWSERIFY_VARS'] = 'NODE_ENV=production'

Important: give your entry-point file a .browserify.js extension:

PIPELINE = {
    # ...
    'javascript':{
        'browserify': {
            'source_filenames' : (
                'js/entry-point.browserify.js',
            ),
            'output_filename': 'js/entry-point.js',
        },
    }
}

To suggest a feature or report a bug: https://github.com/j0hnsmith/django-pipeline-browserify/issues

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

django-pipeline-browserify-0.4.0.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file django-pipeline-browserify-0.4.0.tar.gz.

File metadata

File hashes

Hashes for django-pipeline-browserify-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ab9688870ff48a4206dbf098ec0ceab4b252af10ca8a53f3199a8e0d221f727c
MD5 2b38f043c102c31841e79b78767f0522
BLAKE2b-256 a77ea25aec2758eb6191ce736413dcddeb405f6486a14de267fa5943082d513b

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