Fixes #589, #638, #1241 and this UserVoice ticket.
The docs should go to http://www.github.com/madskristensen/vswebessentials.com/ which would eventually appear at http://www.vswebessentials.com/.
WEIgnore, .weignore, is a file containing the list of linefeed-separated file-path patterns to prevent compilers and linters used in Web Essentials (WE). As per @nschonni's kind suggestion and @SLaks' cool Minimatch utility -- a port of Nodejs' minimatch; it supports both Unix-like and Windows-like file paths.
That said, it supports all styles supported by .jshintignore.
Currently it only targets nodejs pipeline services, meaning TypeScript compilation (not TSLint) and Markdown are out. For markdown, we would probably shift to nodejs-based marked compiler, once this feature is implemented.
It works just like .jscs,.jshintrc, coffee.json, coffeelint.js and tslint.json. For each request, it looks for .weignore file in the current directory, then its parent till the drive's root. After that it will look into user's HOME directory (c:\users\<your-name>).
How it works:
The first config file that is found in the aforementioned chain takes effect. All the file-path patterns inside the .weignore file are relative to the source file being processed, not the .weignore file itself.
Note: The space between doodle.less and compiler is a TAB \t. Although TAB is not the disallowed character in any major file-system, but it's extremely obscure in usage -- hence the best candidate of our separator. If you have files with TAB anywhere file path, you are out of luck! :(
**/doodle.less less, autoprefixer
Here is the list of all the (node-based) compilers and linters currently supported by WE:
The parent list items are referred as "service-categories" and sub-list constitutes "service-names".
Advanced Usage (going crazy):
You can have negation for service type and service names as well!
**/doodle.less !less, autoprefixer
It will only ignore autoprefixer.
will not ignore coffeescript compilation, because the negation of pattern will take precedence. We can implement this logic, if its really desired. Meanwhile, it is recommended to keep your logic simplified (see this Wolfarm|Alpha's logic expression simplifier).
As describe above, it first skips the negative patterns (those starting with exclamation mark !).
Then it looks for service-category or service-name. If none is found, it moves on to test the pattern match.
If there was tab-separated service category/name specified on the line, before matching the pattern, it checks if the caller service needs to be ignored (or that it has !) and skips accordingly.
Take it for a spin with v2.2.3+ ........ 🚗
Feature: WEIgnore. (#589)
I want to produce two distinct css files from what I have in less folder. So I made a .weignore file such this:
It didn't work out. It produces bootstrap.css but not bootstrap-cosmo.css
When I reverse negate order it works for bootstrap-cosmo.less but not bootstrap.less.
Only first one.
I'm on latest (for Update 4) Web Essentials 2013.
I have the same problem.
Same problem with 2 negations.