--- id: django-npm version: "1.0.1" license: MIT license_treatment: permissive maintenance: aging --- # django-npm — A django staticfiles finder that uses npm License: permissive · Maintenance: aging · Downloads: 88.6K/mo ## What it is and what it does django-npm is a Django staticfiles finder that bridges npm and Django's static file system. Instead of vendoring frontend packages into your repository, you declare them in package.json at your project root, and django-npm wraps the npm CLI to install them into node_modules, then exposes selected files to Django's staticfiles system. When you run collectstatic, those npm-managed files are copied into your STATIC_ROOT alongside other static assets. The package provides configuration options to control which npm files are exposed (via glob patterns), where they land in your static directory, and whether to cache the file list. It also offers a programmatic entry point to run npm install from Python code. No runtime dependencies are required beyond npm itself on your system. Use it for: - Manage React, Vue, or other npm packages as Django static dependencies without checking node_modules into version control. - Selectively expose only the built or minified files from npm packages to your Django static directory using glob patterns. - Automate npm install as part of your Django deployment or development setup via the npm_install() function. - Organize frontend libraries under a custom static path (e.g., /static/js/lib/) while keeping package.json as the single source of truth. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. django-npm integrates npm package management into Django projects, allowing you to declare frontend dependencies in package.json and serve them as Django staticfiles without vendoring them directly. Yes, if you need to integrate npm packages into Django's staticfiles system and prefer declarative dependency management over vendoring. The low install friction and permissive license make it a practical choice. However, the aging maintenance status (478 days since last release, Alpha classification) means you should verify compatibility with your specific Django and npm versions before committing to production use. ## Install pip install django-npm uv add django-npm poetry add django-npm ## Installing django-npm Before you install: Installation is straightforward with no runtime dependencies. The package is aging (478 days since last release) but the repository remains active with recent commits; maintenance status suggests it may not receive frequent updates for new Django or npm features. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute django-npm freely in commercial or private projects with minimal restrictions. Quickstart: pip install django-npm # In settings.py: STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'npm.finders.NpmFinder', ] NPM_ROOT_PATH = '/path/to/project' # Then run: python manage.py collectstatic Requires npm to be installed on your system and a package.json file at your project root; django-npm wraps the npm CLI and does not replace it. Verify before relying: - Whether the package works reliably with Django 5.1+ given the aging maintenance status and Alpha development classification. - Current compatibility with modern npm versions and whether private npm registries are fully supported. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 88.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags npm integration django, django staticfiles npm, node modules django, frontend dependencies django, npm packages django static, django-integration, npm-bridge, staticfiles [View on SkillFed](https://skillfed.io/packages/django-npm) · [View on PyPI](https://pypi.org/project/django-npm/)