I'm facing an issue when moving my less files to a pod structure outside the styles folder.
I'm trying to put i.e:
pods/user/register/style.less
pods/components/app-login/styles
and import them from my styles/app.less file.
but so far it just compiles for the first time, but does not watch for future changes. I tried to create a symlink inside my styles folder to pods folder but sometimes works and sometimes breaks broccoli compilation so I declined.
Do you have a better workaround for this? For the moment im going back to the old structure.
Do you need to use Less? The Ember core team may bet on Sass and incorporate https://github.com/ebryn/ember-component-css into the framework at some point in the future. Using that addon would provide you with everything you are after ...
Related
I'm creating a bunch of themes by passing variables into ember-cli. Is there some reasonable way for me to configure Ember to only do the CSS build?
Is there a reason you need ember-cli if you are just building out the css? Couldn't you build out the themes with Sass or Less or PostCSS? Perhaps I'm not fully understanding the entire use case here but if you're just trying to compile styles, one of these tools may be of better use. If you must stay inside Ember, you can leverage addons like ember-cli-sass to make this process much easier.
I've started my first ember.js project with ember-cli including ember-cli-broccoli-compass to compile my stylesheets with compass. Now that I've done my first styling, my stylesheets need 5 seconds to compile. When I now work on my javascripts and there are any changes to my files, my whole project, including the stylesheets, is re-compiled, which lasts a bit too long for me. So, is there any way to exclude the stylesheets from the compiling process?
EDIT:
I don't know this is "the answer", but using https://github.com/quaertym/ember-cli-compass-compiler instead avoids the problem.
Not sure on compass but I think its related to this issue over on ember-cli-less with sourcemaps
https://github.com/gdub22/ember-cli-less/issues/10
https://github.com/ef4/broccoli-sourcemap-concat/pull/3
The issues have been closed but on a fresh ember new they are still present
After many projects writing my own responsive design i got a bit tired of it, after researching popular responsive frameworks decided to go with Zurb Foundation.
First i went for the css ready to go download. Then i tried to use the GEM, where i got a bit of resistance in trying to figure out things on my own. It seems the docs are not explaining enough scenarios, they are just raw docs.
First what i miss is a search for all the classes to find explanations fast, something like jquery's website has.
Many googling and reading to figure out i need to install ruby on windows. Then i ended thinking that my webserver also needs ruby installed, but figured out that SASS is just a preprocesor so it is only helping me write and maintain better code on my side :)
Here are some other problems i just can't figure out easy, without searching google for each thing:
1) I have configured dreamweaver to open .scss files also. Then each day i'm developing, i need to open ruby-console, navigate to project dir and put: compass watch. Now each time i save every modifications (so i can test i the browser), dreamweaver pops out message box: "file has been modified outside of dreamweaver,..do you want to save..blabla" - very very enoying
2) app.scss only holds a lot #import statements. _settings.scss holds the code i can change the default looks (this was my primary reason to use the gem since not a SASS guru yet). Should i uncomment some statement and change themn to my needs inside _settings.scss and will i lose all these changes after one day i succesfully update zurb with: gem update zurb-foundation? If so, is it better practice to create a new scss which holds all my overrides?
3) how to create new .scss file which should override some defaults that _settings.scss listens.
4) should i override the app.css or the _settings.scss
5) when changing top-bar links hover colors, why aren't these applied??? example: $topbar-link-color-hover: #fff; (_settings.scss)
6) i did not have an /img or /images folder in my project after creating it. Hence, i created one myself "/images"
7) any books to buy on foundation 4 with a lot of best practices and tutorials???
I'm sorry but for me honestly it seems way to much time to spend learning the very basics for zurb. I have a lot of experience in c++ projects as in mobile and desktop web projects, so i realy don't feel like a newby but it's almost like i'm pushed to buy support
First I will start off by saying, if you are new to frameworks try something that has a ton more documentation like Twitter-Bootstrap. However since you decided to use Foundation here are the answers to your questions.
1) Setup compass to write the files to another directory that Dreamweaver does not watch. Use a proxy like Charles Proxy to proxy in the files when you are developing locally. This will get rid of the annoying do you want to save this file message. Make the compilation of the SCSS files part of your build process before you deploy your application somewhere other than local.
2) Yes, app.scss has all the import statements. Some of which you might want to comment out if you are looking for raw speed, just fyi. In terms of overrides one thing that you can do is use the Mixins that are provided to you in the other files. Button.scss for example has some fantastic button mixins that allow you to not only create your own flair but inherit most of the Foundation Awesomeness. Another thing, if you notice how all of the variables have a !default. That means that if they are declared somewhere else(read import your variable first), the Default value will be overridden.
3) just make the file and add it as an import before the _settings.scss
4) app.scss has a ton of imports for all the parts of foundation, some you are most likely using and some maybe not.
5) Would need to see the compiled CSS for this one, my guess though without seeing anything is that you missed a variable.
6) Created it because Compass was looking for it? Unless you are planning on using images or creating a sprite (compass can create sprites, which is AWESOME) you can just comment or remove that from the config.rb.
7) Have not seen any. Foundation has much less of a community at this time when compared to Bootstrap. However you can get a leg up by studying up on SASS and SCSS, there is a lot more available on that part.
I've just started using Django and one thing I find that I'm doing is starting a lot of new projects. I'm finding this process to be pretty tedious every time, even using manage.py startproject * I'm constantly changing settings in settings.py like media_root and template paths. Just a little background, I come from PHP and CodeIgniter. I never used a stock CI directory. I modified it to meet my needs for a new project. When I needed a new project, I would just copy that directory. manage.py seems to generate the files on the fly so this approach doesn't seem that possible. Does anyone else have any advice on this?
Lincoln loop has some best practices, they suggest importing settings from a different file. http://lincolnloop.com/django-best-practices/projects/modules/settings.html
Also checkout pip requirements, you might be able to use this to install the settings module from an external source like a git repo.
I'm using Paver to automate my Django project setup.
I have a Bitbucket repository with my own bootstrap setup. Eventually I'll make this generic, but for now it might give you some example code
Sounds like you're starting new projects very often. I assume that's because you're learning. Sure, if there's a custom settings.py that will save you some typing as you generate your learning projects, create it and use it. You could make your template the whole project directory, but since you're unlikely to have a lot of project-level boilerplate outside of settings.py, just focus on that one file. The settings file is the essence of the project.
Django development is all about apps. As you learn more, apps will start to become your focus. My advice would be not to pour too much energy into making an efficient assembly line for project creation.
Also, please learn and use use version control. For bonus points, also learn and use virtualenv :)
I'm updating a 0.5.1 complete_project to 0.7beta3 + virtualenv + pip + fabric.
I have converted my project into multiple stand-alone applications and I have everything being pulled down by pip from a requirements.txt file.
I am now moving the code over and so far can get the Welcome page and perform a log-in, but then it breaks, due, it appears, to the introduction of Group support and the refactoring of Tribes into Tribes and Topics.
Has anyone successfully made this move? If you did, how did you handle migrating your data? What should I be looking out for? Anyone have a checklist or list of steps? What other exciting challenges do I have to look forward to?
The short answer as far as I'm aware (and I've been following Pinax development for some time now) is that there is no straightforward path to upgrade the project from 0.5.1 to 0.7beta3. I'm not sure how familiar you are with the code, but this is the process I would use based on my limited experience:
Start by using the social_project/ that ships with the latest version of Pinax. Copy into it any changes you made to the settings.py file as well as any custom apps you have.
The templates and media have moved to folders outside of the projects, but if you customized any of them (I'm sure you did) take the custom ones and drop them into the template folders in your project to override those in the default theme folders. You should compare them to those in the theme folders to see what changes may need to be made to keep up with changes in the apps.
The next step would be to do the same thing with urls.py copying any customizations over the one provided by the project.
Try getting it running at this point with a fresh DB. Hopefully any errors will point you in the right direction to stuff that you might have missed or not known about.
Once you gotten it running most of the DB tables should be the same (I believe) except as you mentioned the Tribes stuff. Migrating the data, though, is still beyond what I've had to deal with.
Disclaimer: I've been following development but never had to perform an upgrade quite this big. Good luck and (obviously) back up your work and data before trying to port it all over.
See the documentation and code ( http://github.com/pinax/pinax/tree/master ) for more details. The code is a convenient (though tedious) way to watch the evolution between 0.5.1 and 0.7beta3, for what that's worth.