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

Deleted CSS-file will not regenerate, only the map triggers it #32

Closed
AndreasBackx opened this issue Feb 25, 2016 · 7 comments
Closed

Comments

@AndreasBackx
Copy link
Collaborator

When deleting the CSS-file, it will not trigger a regeneration of the file. Only when deleting the map file or both will it regenerate both.

@jrief
Copy link
Owner

jrief commented Feb 25, 2016

the delete option is used to remove css files, which otherwise would "pollute" the working directory.
For me its quite useful.

If I get you right, you would like to have a --force option?

@AndreasBackx
Copy link
Collaborator Author

Just from going over the code yesterday, I assume that you're talking about the render method in the Node in salt_tags.py or delete_file(self, node), in compilecss.py. But I think you misunderstood me. When having a development server running and you load a page, it'll generate the CSS and map which is good. But when deleting the CSS-file that was generated, it will not regenerate it when refreshing the website when it should because there is no CSS-file to be found anywhere. Only when deleting the map, will it trigger the regeneration of both files. The file is not deleted by the project, but I manually remove it in Finder.

@jrief
Copy link
Owner

jrief commented Feb 25, 2016

If I understand well, you use --delete-files on the dev server.

You shouldn't do this during development. First, make sure that generated css (and map) files are stored outside of your working directory. These files can be deleted together with their folder whenever you want.

The command ./manage.py compilescss is intended only for production or for preparing production. This command will intentionally pollute your working directory with compiled files. To remove those files use the --delete-files option.

@AndreasBackx
Copy link
Collaborator Author

I do not use --delete-files or any special command on the server. The files that I deleted were automatically generated.

These files can be deleted together with their folder whenever you want.

That's the problem, deleting them does not regenerate them in development. All of these files were generated on the fly when loading the website and not with the compilecss command as I said.

@jrief
Copy link
Owner

jrief commented Feb 25, 2016

then your template is cached and the templatetag sass_src is not "seen" by this app when you reload the page.

@jrief
Copy link
Owner

jrief commented Feb 6, 2017

can I close this?

@AndreasBackx
Copy link
Collaborator Author

Well it would still require a look perhaps. It's odd that it's only triggered when deleting the map.

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

2 participants