Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Code Refactor after finding plugin by same name

FireLess is a firebug extension targeting only the JS port of the less
framework.  I didn't find this in my initial research, and it is only
targeting the js version of the {less} framework.
https://addons.mozilla.org/en-US/firefox/addon/fireless/?src=search

My plugin is only targeting the dotLess port so far, so the code was
refactored to remove the name conflict and to reflect the current state
of the plugin.
  • Loading branch information...
commit d162595fabbb9086caacbd56b4deaaa87e0aa240 1 parent ab3e9a0
James Carpenter authored
15 README.md
View
@@ -1,13 +1,13 @@
-FireLess
+FireDotLess
========
-Firebug Extension: support for [{less} css](http://www.lesscss.org/)
+Firebug Extension: support for [dotLess](http://www.dotlesscss.org/) in debug mode
-The purpose of this extension is to display the correct file name and line number for CSS rules when using the [{less} css](http://www.lesscss.org/) framework. The file path and line number in the Style Side Panel of firebug with relect the server side file name & line number. Clicking on the link will continue to take you to the CSS tab, inspecting the combine CSS file.
+The purpose of this extension is to display the correct file name and line number for CSS rules when using the [dotLess](http://www.dotlesscss.org/) framework, dotLess port. The file path and line number in the Style Side Panel of firebug with relect the server side file name & line number. Clicking on the link will continue to take you to the CSS tab, inspecting the combine CSS file.
Background Info:
----------------
-At its simplest level, [{less} css](http://www.lesscss.org/) offers server side bundling of files (many CSS files into 1) to limit HTTP requests for more responsive online applications.
+At its simplest level, [dotLess](http://www.dotlesscss.org/) offers server side bundling of files (many CSS files into 1) to limit HTTP requests for more responsive online applications.
This causes a serious headache for developers when using firebug, as it is reporting the file name and line number of the bundled file. This information is accurate from the client side perspective, but it makes development difficult, due to the fact that the actual css rule could be in one of many files on the server and the line numbers are often inaccurate.
@@ -15,12 +15,15 @@ This causes a serious headache for developers when using firebug, as it is repor
Notes:
------
* As of version 0.5, this has only been tested against [dotLess](http://www.dotlesscss.org/), the .Net port of the less CSS framework.
- http://www.dotlesscss.org/
+ http://www.dotlesscss.org/
* Any feature request for other ports, or known issues should be directed to the github issue page:
https://github.com/jc4rp3nt3r/fireless/issues
-* See http://code.google.com/p/fbug/issues/detail?id=5961
+* If you are looking for the FireLess Extension for the JavaScript version of [{less} css](http://www.lesscss.org/):
+ https://addons.mozilla.org/en-US/firefox/addon/fireless/?src=search
+
+* See here for the firebug issue tracking the less inclusion request http://code.google.com/p/fbug/issues/detail?id=5961
* This plugin reads the debug output of dotLess in order to print the original line number and file name during website development.
Example Web.config Entry for dotLess:
12 chrome/content/lessModule.js
View
@@ -10,7 +10,7 @@ function(Obj, FBTrace, CSSStylePanel) {
// ********************************************************************************************* //
// Custom Module Implementation
-Firebug.LessModule = Obj.extend(Firebug.Module,
+Firebug.LessDotModule = Obj.extend(Firebug.Module,
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Initialization
@@ -22,7 +22,7 @@ Firebug.LessModule = Obj.extend(Firebug.Module,
// TODO: Module initialization (there is one module instance per browser window)
if (FBTrace.DBG_FIRELESS)
- FBTrace.sysout("fireless; LessModule.initialize");
+ FBTrace.sysout("fireless; DotLessModule.initialize");
},
shutdown: function()
@@ -30,7 +30,7 @@ Firebug.LessModule = Obj.extend(Firebug.Module,
Firebug.Module.shutdown.apply(this, arguments);
if (FBTrace.DBG_FIRELESS)
- FBTrace.sysout("fireless; LessModule.shutdown");
+ FBTrace.sysout("fireless; DotLessModule.shutdown");
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -66,7 +66,7 @@ Firebug.LessModule = Obj.extend(Firebug.Module,
getSourceLink: function(target, rule)
{
// get the normal sourceLink from firebug (Props: href, instance, line, type, object, col)
- var oSourceLink = Firebug.LessModule.styleGetSourceLink.apply(this, arguments);
+ var oSourceLink = Firebug.DotLessModule.styleGetSourceLink.apply(this, arguments);
// if this is a less file (there could be a mix in a site)
if (oSourceLink.href.indexOf('.less') !== -1)
@@ -100,9 +100,9 @@ Firebug.LessModule = Obj.extend(Firebug.Module,
// ********************************************************************************************* //
// Registration
-Firebug.registerModule(Firebug.LessModule);
+Firebug.registerModule(Firebug.DotLessModule);
-return Firebug.LessModule;
+return Firebug.DotLessModule;
// ********************************************************************************************* //
});
2  defaults/preferences/prefs.js
View
@@ -1 +1 @@
-pref("extensions.firebug.DBG_FIRELESS", false);
+pref("extensions.firebug.DBG_FIREDOTLESS", false);
2  install.rdf
View
@@ -18,7 +18,7 @@
</em:targetApplication>
<!-- Front End MetaData -->
- <em:name>FireLess</em:name>
+ <em:name>FireDotLess</em:name>
<em:description>Support for LESS CSS in Firebug</em:description>
<em:creator>James Carpenter</em:creator>
<em:homepageURL>https://github.com/jc4rp3nt3r/fireless</em:homepageURL>
Please sign in to comment.
Something went wrong with that request. Please try again.