django-require
django-require copied to clipboard
Add paths to REQUIRE_EXCLUDE
Hi, I need to speed up my deployments. Therefore I want to exclude some scripts from optimization, for example, 'ckeditor/ckeditor/ckeditor.js' and all its dependencies and plugins. Currently it takes minutes to run collectstatic
, so is there any best practice to add whole paths to the REQUIRE_EXCLUDE
setting, like 'ckeditor'
.
There's no functionality to do this at present. You could perform a glob within your settings.py file.
Alternatively, I'll take a pull request that adds glob support to the REQUIRE_EXCLUDE setting.
On Mon, 15 Feb 2016 at 10:02 Tobias Lorenz [email protected] wrote:
Hi, I need to speed up my deployments. Therefore I want to exclude some scripts from optimization, for example, 'ckeditor/ckeditor/ckeditor.js' and all its dependencies and plugins. Currently it takes minutes to run collectstatic, so is there any best practice to add whole paths to the REQUIRE_EXCLUDE setting, like 'ckeditor'.
— Reply to this email directly or view it on GitHub https://github.com/etianen/django-require/issues/66.
yea, I'd also like to exclude the node_modules
directory for example.
How about using a regex?
Something like: https://github.com/Tyrdall/django-require/commit/115d2ff30943458f58bcea5eaebe314cddae94b4
To exclude some files from uglyfying you can use the following setting in your app.built.js
:
({
fileExclusionRegExp: /^(folder1|folder2|folder3)$/
})
I suppose that the Django convention is to use a regex, rather than a glob pattern.
On Thu, 18 Feb 2016 at 07:04 Tobias Lorenz [email protected] wrote:
How about using a regex?
Something like: Tyrdall@115d2ff https://github.com/Tyrdall/django-require/commit/115d2ff30943458f58bcea5eaebe314cddae94b4
— Reply to this email directly or view it on GitHub https://github.com/etianen/django-require/issues/66#issuecomment-185570760 .