Skip to content

Using Platform specific path separator. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
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