معرفی شرکت ها


django-node-assets-0.9.9


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

The Django application that allows install and serve assets via Node.js package manager infrastructure.
ویژگی مقدار
سیستم عامل -
نام فایل django-node-assets-0.9.9
نام django-node-assets
نسخه کتابخانه 0.9.9
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Andrey Butenko
ایمیل نویسنده whitespysoftware@gmail.ru
آدرس صفحه اصلی https://github.com/whitespy/django-node-assets
آدرس اینترنتی https://pypi.org/project/django-node-assets/
مجوز -
################## Django-node-assets ################## .. image:: https://travis-ci.org/whitespy/django-node-assets.svg :target: https://travis-ci.org/whitespy/django-node-assets .. image:: https://badge.fury.io/py/django-node-assets.svg :target: https://badge.fury.io/py/django-node-assets .. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 :target: https://pycqa.github.io/isort/ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black | The Django application that allows to install and to serve static assets via Node.js package manager infrastructure. The application exposes management command to install dependencies from your **package.json** and several static files finders to find files from installed node packages and exclude metadata of node packages and unwanted files when static files will be collected via Django`s **collectstatic** management command execution. Features -------- - Avoiding vendoring static assets in your repository like jQuery plugins, Bootstrap toolkit, etc - Avoiding mess in **STATIC_ROOT** through exclusion node packages` metatadata and unwanted files - Installing dependencies by Django`s management command Installation ------------ .. code:: bash $ pip install django-node-assets Configuration ------------- Add 'django_node_assets' to your INSTALLED_APPS: .. code:: python INSTALLED_APPS = [ ... 'django_node_assets', ] Add NodeModulesFinder to STATICFILES_FINDERS: .. code:: python STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'django_node_assets.finders.NodeModulesFinder', ] Specify absolute path to the package.json file: .. code:: python NODE_PACKAGE_JSON = '/var/assets/package.json' .. note:: A package.json must have the "dependencies" section and look like: .. code:: json { "dependencies": { "jquery": "^3.2.1", "bootstrap": "^3.3.5", } } Details here: https://docs.npmjs.com/files/package.json#dependencies Specify the absolute path to a directory where the **nmpinstall** management command will install assets: .. code:: python NODE_MODULES_ROOT = '/var/assets/node_modules' .. note:: A base dir must be called **node_modules**. Specify path to the node package manager executable (optional) .. code:: python NODE_PACKAGE_MANAGER_EXECUTABLE = '/usr/local/bin/npm' .. note:: The node package manager must be already installed in your system. Usage ----- Call the **nmpinstall** management command to install dependencies specified in the package.json .. code:: bash $ python manage.py npminstall Use Django`s static template tag to link installed assets .. code:: html {% load static %} <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}"> <!-- Some amazing markup --> <script src="{% static 'jquery/dist/jquery.min.js' %}"></script> <script src="{% static 'bootstrap/dist/js/bootstrap.js' %}"></script>


نحوه نصب


نصب پکیج whl django-node-assets-0.9.9:

    pip install django-node-assets-0.9.9.whl


نصب پکیج tar.gz django-node-assets-0.9.9:

    pip install django-node-assets-0.9.9.tar.gz