Settings can be overridden by defining a dictionary named DJANGO_NODE in your settings file. For example:
DJANGO_NODE = {
'PATH_TO_NODE': '/path/to/some/binary',
}Settings
- PATH_TO_NODE
- NODE_VERSION_COMMAND
- NODE_VERSION_FILTER
- PATH_TO_NPM
- NPM_VERSION_COMMAND
- NPM_VERSION_FILTER
- NPM_INSTALL_COMMAND
- NPM_INSTALL_PATH_TO_PYTHON
A path that will resolve to Node.
Default:
'node'The command invoked on Node to retrieve its version.
Default:
'--version'A function which will generate a tuple of version numbers from the raw version string returned from Node.
Default
lambda version: tuple(map(int, (version[1:] if version[0] == 'v' else version).split('.')))A path that will resolve to NPM.
Default
'npm'The command invoked on NPM to retrieve its version.
Default
'--version'A function which will generate a tuple of version numbers from the raw version string returned from NPM.
Default
lambda version: tuple(map(int, version.split('.'))),The install command invoked on NPM. This is prepended to all calls to django_node.npm.install.
Default
'install'A path to a python interpreter which will be provided by NPM to any dependencies which require Python.
If you are using Python 3 as your system default or virtualenv python, NPM may throw errors
while installing certain libraries - such as gyp - which depend on Python 2.x. Specifying a
path to a Python 2.x interpreter should resolve these errors.
Default
None