I currently have the PyReact JSX compiler installed using django-pipeline.
Whenever I run collectstatic on my files, rather than overwriting a prior version of my react .jsx and compiled .js files, it creates a new version in the same folder. Is there a way to stop this and have the program simply overwrite the prior version? Or, is the best practice for using django-pipeline to use it only once?
My settings.py:
PIPELINE_COMPILERS = (
'react.utils.pipeline.JSXCompiler',
'pipeline.compilers.less.LessCompiler',
)
PIPELINE_JS = {
'bootstrap': {
'source_filenames': (
'twitter_bootstrap/js/transition.js',
'twitter_bootstrap/js/modal.js',
'twitter_bootstrap/js/dropdown.js',
'twitter_bootstrap/js/scrollspy.js',
'twitter_bootstrap/js/tab.js',
'twitter_bootstrap/js/tooltip.js',
'twitter_bootstrap/js/popover.js',
'twitter_bootstrap/js/alert.js',
'twitter_bootstrap/js/button.js',
'twitter_bootstrap/js/collapse.js',
'twitter_bootstrap/js/carousel.js',
'twitter_bootstrap/js/affix.js',
),
'output_filename': 'js/b.js',
},
'clubs': {
'source_filenames': (
'js/clubs.jsx',
),
'output_filename': 'js/clubs.js',
},
'react': {
'source_filenames': (
'react/js/react.min.js',),
'output_filename': 'js/r.js',
},
'jquery': {
'source_filenames': (
'js/jquery.js',
),
'output_filename': 'js/jq.js',
},
}
STATIC_ROOT = BASE_DIR + '/static/'
STATIC_URL = '/static/'
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'