Skip to main content

The Django application that allows install and serve assets via Node.js package manager infrastructure.

Project description

The Django application that allows install and serve assets via Node.js package manager infrastructure.

Installation

$ pip install django-node-assets

Configuration

Add ‘django_node_assets’ to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'django_node_assets',
]

Add NodeModulesFinder to STATICFILES_FINDERS:

STATICFILES_FINDERS = [
    ...
    'django_node_assets.finders.NodeModulesFinder',
]

Specify absolute path to the package.json file:

NODE_PACKAGE_JSON = '/var/assets/package.json'

Specify the absolute path to a directory where the nmpinstall management command will install assets:

NODE_MODULES_ROOT = '/var/assets/node_modules'

Specify path to the nmp executable (optional)

NODE_PACKAGE_MANAGER_EXECUTABLE = '/usr/local/bin/npm'

Usage

Call the nmpinstall management command to install assets specified in the package.json

$ python manage.py npminstall

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-node-assets-0.9.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

django_node_assets-0.9.2-py2-none-any.whl (5.8 kB view details)

Uploaded Python 2

File details

Details for the file django-node-assets-0.9.2.tar.gz.

File metadata

File hashes

Hashes for django-node-assets-0.9.2.tar.gz
Algorithm Hash digest
SHA256 4af03b08d94597218af2471af7681c2a470e1cebffafbbd89dc016c2b25ec65d
MD5 007ef88e7a97abf124f6067329f4be80
BLAKE2b-256 08d9620f329072ff099878d97c1aeb8845cc2248348dba09664d7a7908fe0f0a

See more details on using hashes here.

File details

Details for the file django_node_assets-0.9.2-py2-none-any.whl.

File metadata

File hashes

Hashes for django_node_assets-0.9.2-py2-none-any.whl
Algorithm Hash digest
SHA256 6fcd5c067066acc40b02288747bbd8b143a1069da3e0c79c2a75bbf5dc8bc6f1
MD5 1a20048cdc44d9f4ff0c427ea3808b19
BLAKE2b-256 c3d14558af8f85fe48edac5f39d53e7428f032d5fc2a3f94f5419bd527e4885d

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