Skip to content
This repository was archived by the owner on Oct 23, 2019. It is now read-only.

Latest commit

 

History

History
98 lines (71 loc) · 2.14 KB

File metadata and controls

98 lines (71 loc) · 2.14 KB

Settings

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

DJANGO_NODE['PATH_TO_NODE']

A path that will resolve to Node.

Default:

'node'

DJANGO_NODE['NODE_VERSION_COMMAND']

The command invoked on Node to retrieve its version.

Default:

'--version'

DJANGO_NODE['NODE_VERSION_FILTER']

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('.')))

DJANGO_NODE['PATH_TO_NPM']

A path that will resolve to NPM.

Default

'npm'

DJANGO_NODE['NPM_VERSION_COMMAND']

The command invoked on NPM to retrieve its version.

Default

'--version'

DJANGO_NODE['NPM_VERSION_FILTER']

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('.'))),

DJANGO_NODE['NPM_INSTALL_COMMAND']

The install command invoked on NPM. This is prepended to all calls to django_node.npm.install.

Default

'install'

DJANGO_NODE['NPM_INSTALL_PATH_TO_PYTHON']

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