Sunday, May 22, 2016

Attempt Compiling LESS into CSS with Visual Studio 2015 via Bundle Transformer: LESS

From the last time, I got disappointed for not successfull in trying to generate a CSS file from a LESS file using Web Compiler.

Reference: Attempt Compiling LESS into CSS with Visual Studio 2015 via Web Compiler.

Now I want to try the Bundle Transformer: LESS. Wish me luck.

I can install it from "Manage Nuget Packages for Solution.." in the Nuget Package Manager.



Some dependencies:

After the installation, I can see the Readme file opened automatically for me to read it. So I have to do some thing after the installation. This is some Post Install instruction:
   ====================
   POST-INSTALL ACTIONS
   ====================
   For correct working of this module is recommended to install one of
   the following NuGet packages: JavaScriptEngineSwitcher.Msie,
   JavaScriptEngineSwitcher.V8 or JavaScriptEngineSwitcher.ChakraCore.
   After package is installed, 
need set a name of JavaScript engine (for
   example, `MsieJsEngine`) to the `name` attribute of
   `/configuration/bundleTransformer/less/jsEngine` configuration
   element.

   To use a debugging HTTP-handler in the IIS Classic mode, you need add
   to the `/configuration/system.web/httpHandlers` element of the
   Web.config file a following code:
   <add
path="*.less" verb="GET"
type="BundleTransformer.Less.HttpHandlers.LessAssetHandler, BundleTransformer.Less" />
   =============
   DOCUMENTATION
   =============
   See documentation on CodePlex -
   http://bundletransformer.codeplex.com/documentation
*In the red font, I can't understand what it saying and what I have to do? I will read the documentation later.

So, do I have to install the mentioned packages? or is it just recommended? I can only see that I have to install them.

I choose to install the JavaScriptEngineSwitcher.Msie. Its another 195K size of packages to add. And ouch. Its also has some dependencies. Well, no choice but to install them.

Arrgh, another Readme with instructions:
===========
   DESCRIPTION
   ===========
   JavaScriptEngineSwitcher.Msie contains adapter `MsieJsEngine` (wrapper
   for the MSIE JavaScript Engine for .Net
   (http://github.com/Taritsyn/MsieJavaScriptEngine)). For correct
   working of the MSIE JavaScript Engine it is recommended to install
   Internet Explorer 9 and above on a server.
   =============
   RELEASE NOTES
   =============
   1. Added support of MSIE JavaScript Engine version 1.7.0;
   2. In configuration settings was added one new property -
      `EnableDebugging` (default `false`).
   =============
   DOCUMENTATION
   =============
   See documentation on GitHub -
   http://github.com/Taritsyn/JavaScriptEngineSwitcher

But it seems I just have to use IE9 or above. No problem with me. Proceed..

But wait, I misunderstood something, this is just a translator, not a compiler. Arrgh, wasted my time again.

But maybe I can use it later, so i must complete my step. but I still cannot understand this phrase:
need set a name of JavaScript engine (for example, `MsieJsEngine`) to the `name`attribute of `/configuration/bundleTransformer/less/jsEngine` configuration element.

Still no idea what the author is talking about. I'm not talking bad about the author, but just to say how noob I am. But still, I will try my best. For now, I can't proceed. Hope someone will assist me on this.

ps: Will try to find a working compiler for LESS to generate CSS for my Visual Studio 2015.



















No comments:

Post a Comment