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

Support auto-generation of dynamic build files when debug=0 #69

Closed
jamiemill opened this issue Aug 16, 2011 · 6 comments
Closed

Support auto-generation of dynamic build files when debug=0 #69

jamiemill opened this issue Aug 16, 2011 · 6 comments

Comments

@jamiemill
Copy link

This line:

https://github.com/markstory/asset_compress/blob/master/controllers/assets_controller.php#L34

Means that dynamic build files will not be auto-generated if debug is turned off, i.e. in production, because the url files[] array will not be read.

Is this a feature or a bug? If a feature perhaps an update to the documentation would be good to explain why this isn't supported in production.

@markstory
Copy link
Owner

I'd say a feature. Having an application deploy in a state where not all the required files exist seems like a bad thing it also prevents evil folk from making up their own build files and getting your server to do extra work. Requiring the build script to be run locally or remotely as part of the deploy process seemed like a safer route to me.

I can update the wiki to that effect.

@markstory
Copy link
Owner

I've added a note to the Helper wiki page about this behaviour.

@markstory
Copy link
Owner

I've actually considered making the controller always returning errors when debug = 0. The more I think about it the more dangerous it is to have a way for people to force your server to do large-ish amounts of work whenever they want. Making this change of course impacts the usability of the plugin. Perhaps a forceEnable option could solve that though.

@meotimdihia
Copy link

Please update this feature on wiki with a warning, or bold font. it do me take a lot times to figure out ...
And a trouble with me with this feature:
Before switch from debug 2 -> 0 , i must access to website at least once when debug = 2. If not when switch to 0 , plugin still can not find out build files.

@markstory
Copy link
Owner

Or use the shell. Formatting and styling options are limited on github, but I'll see what I can do.

@markstory
Copy link
Owner

I've done some updates recently that should make the debug to non debug transition easier. I've removed the problematic writeCache configuration value. Instead you can either always use the assetscontroller, even in production, or use the shell and generate static files.

I think that solves the problem here, but if it doesn't let me know and we can figure out a solution.

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