Skip to content
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

Add paths to REQUIRE_EXCLUDE #66

Open
Tyrdall opened this issue Feb 15, 2016 · 4 comments
Open

Add paths to REQUIRE_EXCLUDE #66

Tyrdall opened this issue Feb 15, 2016 · 4 comments

Comments

@Tyrdall
Copy link

Tyrdall commented Feb 15, 2016

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'.

@etianen
Copy link
Owner

etianen commented Feb 15, 2016

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 notifications@github.com 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
#66.

@thijstriemstra
Copy link
Contributor

yea, I'd also like to exclude the node_modules directory for example.

@Tyrdall
Copy link
Author

Tyrdall commented Feb 18, 2016

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)$/

})

@etianen
Copy link
Owner

etianen commented Feb 18, 2016

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 notifications@github.com 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
#66 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants