diff --git a/compressor_toolkit/apps.py b/compressor_toolkit/apps.py index 509fbf0..738ebfa 100644 --- a/compressor_toolkit/apps.py +++ b/compressor_toolkit/apps.py @@ -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 @@ -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