Skip to content
8 changes: 4 additions & 4 deletions compressor_toolkit/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ class CompressorToolkitConfig(AppConfig):
NODE_MODULES = getattr(
settings,
'COMPRESS_NODE_MODULES',
os.path.abspath('node_modules') if LOCAL_NPM_INSTALL else '/usr/lib/node_modules'
os.path.abspath('node_modules') if LOCAL_NPM_INSTALL else os.path.join('usr', 'lib', 'node_modules')
)

# node-sass executable
NODE_SASS_BIN = getattr(
settings,
'COMPRESS_NODE_SASS_BIN',
'node_modules/.bin/node-sass' if LOCAL_NPM_INSTALL else 'node-sass'
os.path.join(NODE_MODULES, '.bin', 'node-sass') if LOCAL_NPM_INSTALL else 'node-sass'
)

# postcss executable
POSTCSS_BIN = getattr(
settings,
'COMPRESS_POSTCSS_BIN',
'node_modules/.bin/postcss' if LOCAL_NPM_INSTALL else 'postcss'
os.path.join(NODE_MODULES, '.bin', 'postcss') if LOCAL_NPM_INSTALL else 'postcss'
)

# Browser versions config for Autoprefixer
Expand All @@ -44,7 +44,7 @@ class CompressorToolkitConfig(AppConfig):
BROWSERIFY_BIN = getattr(
settings,
'COMPRESS_BROWSERIFY_BIN',
'node_modules/.bin/browserify' if LOCAL_NPM_INSTALL else 'browserify'
os.path.join(NODE_MODULES, '.bin', 'browserify') if LOCAL_NPM_INSTALL else 'browserify'
)

# Custom ES6 transpiler command
Expand Down