In my project I have a master .less file which imports some other .less files.
I only need the .css file corresponding to this master .less file, but Web Essentials keeps compiling the other .less files to css when I modify them.
Is there any way to configure which CSS files should be generated?
It's obviously not possible to configure it in Web Essentials.
I finally ended up using dotless to manage LESS in my ASP.Net MVC application.
Sometime around the end of 2012, Web Essentials added the ability to ignore .less files that start with an underscore (_). So, if you don't want variables.less to be compiled, just name it to _variables.less.
Related
I have created the default play application in IntelliJ in directory P. I have over-written the default index.scala.html with my own html code. The html code refers to some css and js files which are outside the directory P. To include these external files, I added the directory of these files using project configuration settings.
My webpage doesn't load properly as the server returns 404 for the css and js files. What am I doing wrong?
When you added your directory using project structure, you only say:
Hey, IDEA, please consider this folder part of my project, consider
its contents source code and display it when I open my project.
However, when you deploy or run your app, you only deploy the usual folders to the server, which contain the resources which will be available for clients to access.
The external directory is not part of these directories and will not be deployed.
What you can do is to copy the file from the external directory as a part of your build process before deploying the application.
EDIT: Detailed answer here: What is intellij's build process for play applications
I have a less file main.less that #imports other less files so they can all be compiled into a single main.css file.
With Web Essentials 2013, saving any of the imported files would trigger a compile of the main.less - which isn't happening with this extension.
Is there a configuration I'm missing?
Right now I use Alt-Shift-y as a workaround to force compile all the less files.
I don't want to go with the grunt solution, described here
Do you have Web Workbench installed? That helped me, then it compiles automatically. https://visualstudiogallery.msdn.microsoft.com/2b96d16a-c986-4501-8f97-8008f9db141a
I'm trying to create a dojo build file. What do I need to add in the profile.js file to include all the .css files inside the dojo build.js file. I'm getting dijit.js and other .js files, but the dependent .css files are not getting built into the build.js file
I'm using dojo 1.8
It doesn't really make sense to ask to combine JS and CSS into a single file. JavaScript is JavaScript; CSS is CSS.
That said, you should be able to get down to as little as one CSS request by specifying cssOptimize: 'comments' in your build profile, which will strip comments from CSS files within packages the build processes, and flatten imports. As a result, each Dijit theme's main CSS file (e.g. themes/claro/claro.css) will then require only one request, rather than requests for each component.
I want to set web.xml for my first project. For managing project easily i want to arrange files in folders according to their extension in Web Content folder.
Anything wrong with just putting them in exactly those folders?
someapp/js/myscript.js
someapp/css/mystyles.css
I came to notice that there is one folder called assets in the root folder.To know more about it,I went through this link.Now I want to know adding some css in these files is good or shall I add css to to the main.css file inside css folder.
The asset folder is automatically generated by Yii based upon your environment so best avoid putting your CSS, images etc inside here. It also best to not commit these folders and files into SVN as they are automatically generated and folder names will differ from your qa/staging/live site to your local site.
There are some good reasons to use Yii's assets.
it prevents naming conflicts in css and js files
it allows you to keep CSS and JS files under your document-root but outside of your web-root (for easier version control)
it allows to easily switch between sets of CSS & JS files, rather than having to deal with each file individually (suppose the system admin needs to revert back to a previous version).
it allows you to publish assets (images, JS & CS) to several websites hosted on the same server.
Please check here or there for more details.
Well, when i started my first Yii project, i also put my CSS and JS files in assets. It works but then i found that its not just the right way. Its better to make a separate directory for your CSS file(s). Also there are some auto generated files in assets, so to avoid mix-up with those and your i prefer to make it separate. Hope you got the point.