-
Notifications
You must be signed in to change notification settings - Fork 53
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
Instructions for pre-processing langs #23
Comments
Your less files get compiled to css automatically, it is all about how to access them. If you install a fresh copy of asset-pipeline (following the steps in README), there will be If you have the following file structure:
But you are not limited to the default If your want to group all your stylesheets for e.g. your users section of your app, you can do the following:
and then in your /**
*= require_tree users/
*/
You can generate a link tag for your manifest files via Hope this helps! |
Okay, I placed a simple test.less file in the same directory (app/assets/) as application.css and when browsing to localhost:8000/assets/application.css, the css file remains blank. Any suggestions? |
run Look at the |
@niallobrien did the stuff @felixkiss suggested fix your issue? @felixkiss, I think I will put some of what you said here into the usage section of the README.md just for future usage... |
@kdocki No, even after publishing the config, checking the defaults and renaming my less file, nothing is compiled. application.css remains empty. |
@niallobrien One more thing I often need to do: @kdocki The caching thing with production environment behaves a little weird. Still couldn't fully grasp how it should work. And I have some projects with custom named environments. Maybe an option in the config which environments should get "production mode" and which ones should regenerate on every request (dev mode)? |
@felixkiss Yup, that was it, thanks! So it's definitely a cache issue. Regenerate on every request for dev mode would be ideal. |
@niallobrien if you set your environment to be local ( check out https://github.com/CodeSleeve/asset-pipeline#installation ) that will take care of caching. @felixkiss all environments are all treated like local envs (except production). Here is where that happens for javascripts. Do you have any ideas for this config thing? One thing I wanted to be weary of is file reads on production. So when users go to /assets/application.css I didn't want the server to have to process the package config.php every time that file is hit. Is the caching thing not working as expected? You should really only get a cache on the 'production' environment... is that not what is happening? |
Hey guys, I'm having a similar problem. I'm coming from a Codeigniter background, I'm relatively new to Laravel, and I've never used Rails, so forgive me but I'm having a hard time following your documentation. I'm pretty sure i have everything configured correctly. The only thing I'm doing differently is loading the paths dynamically because I'm using a dynamic theme setup. So in my config file the paths are empty, but I'm using the event handler to give it the path of whatever theme template is in use using $paths->add(...) Images get sent through fine, as do any css and js that I put in folders added as 'other' However, I'm not getting anything if I try to fetch css or js from a 'javascripts' or 'stylesheets' folder. Just blank, even if I try to reference the files directly. I've tried clearing the cache. Can you please explain the difference in how to handle these files between development and production mode? This is the most confusing part. |
@kdocki Yeah, I'm using php's server via artisan serve, so I set my machine name to "localhost" and it's working fine, thanks. |
@gabrielalack Yeah, I will make a section under FAQ about using in development and production. I might make a video specifically for that. Also I just created two videos last night but it only applies to dev-testing branch at the moment ... I will be making a merge into dev-master pretty soon though |
Hi, I'm using Less, and there doesn't seem to be any instructions on how exactly I can automatically compile a less file and have it served via the asset pipeline. I'd imagine I need to use Assetic or something to help with the compilation process. Please advise, thanks!
The text was updated successfully, but these errors were encountered: