GithubHelp home page GithubHelp logo

radupoe / lessmsbuildtasks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arryalove/lessmsbuildtasks

0.0 2.0 0.0 13.84 MB

A targets file and MsBuild tasks, that will enable compiling of .Less files

C# 99.53% CSS 0.47%

lessmsbuildtasks's Introduction

LessMsbuildTasks

A targets file and MsBuild tasks, that will enable compiling of .Less files

The easiest way to get it up and running is through installing it through NuGet

 Install-Package LessMsbuildTasks

The Nuget package will create a new folder in the solution directory called .less. This folder will contain a .targets file as well as some dll's that are required for the .targets to work.

It will also automatically import that .targets file into your project file.

Once the targets file is imported you will get a new Build Action "DotLess". This build action is selectable from the properties drop down. Any files you set to use this build action will be compiled with the .less compiler.

In addition, the compiler is smart and will only attempt to compile the file again if it or any of the files it imports have changed since the last time it was run.

Advanced Options

There are a few Msbuild properties that you can change in order to affect the functionality of the compile

LessOutputDirectory: (string) The base directory where the .css files will be output to (defaults to $(WebProjectOutputDir)) which is normally the project root but if being run from Tfs it is the the _PublishedWebsites directory.

LessKeepRelativeDirectory: (boolean) By default it will append the relative path from the project root to the Output directory path, set this to false if you want to override that behaivor.

LessMinifyOutput: (boolean) Output CSS will be compressed. (defaults to True for release builds and False for debug builds)

LessDebugMode (boolean) Print helpful debug comments in output.

LessDisableUrlRewriting (boolean) Disables changing urls in imported files

LessImportAllFilesAsLess (boolean) Treats every import as less even if ending in .css

LessInlineCssFiles (boolean) Inlines CSS file imports into the output

LessDisableVariableRedefines (boolean) Makes variables behave more like less.js, so the last variable definition is used

LessKeepFirstSpecialComment (boolean) Keeps the first comment begninning /** when minified

LessForceRun (boolean) If this is true, it will always run and not check to see if anything has changed

LessCreateSourceMap (boolean) Creates source maps for generated CSS files (filename.css.map)

lessmsbuildtasks's People

Contributors

arryalove avatar radupoe avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.