[Pkg-javascript-commits] [less.js] 68/285: move source map output into root directory
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:23:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v2.0.0
in repository less.js.
commit 5148db6e3d1112b628e4f63f9a655d616df3d28a
Author: Luke Page <luke.a.page at gmail.com>
Date: Sun Aug 24 18:50:43 2014 +0100
move source map output into root directory
---
lib/less/non-node-index.js | 2 +-
lib/less/parser.js | 2 +-
lib/less/source-map-output.js | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/less/non-node-index.js b/lib/less/non-node-index.js
index 8c1abfc..d2b67ba 100644
--- a/lib/less/non-node-index.js
+++ b/lib/less/non-node-index.js
@@ -9,6 +9,6 @@ less.Parser = (require('./parser'))(less, less.tree, less.visitor);
less.functions = require('./functions/index.js')(less);
less.contexts = require("./contexts.js");
-less.tree.sourceMapOutput = require('./source-map-output.js')(less);
+less.SourceMapOutput = require('./source-map-output.js')(less);
module.exports = less;
diff --git a/lib/less/parser.js b/lib/less/parser.js
index e909957..4f0d915 100644
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@ -515,7 +515,7 @@ var Parser = function Parser(env) {
}
if (options.sourceMap) {
- evaldRoot = new tree.sourceMapOutput(
+ evaldRoot = new less.SourceMapOutput(
{
contentsIgnoredCharsMap: parser.imports.contentsIgnoredChars,
writeSourceMap: options.writeSourceMap,
diff --git a/lib/less/source-map-output.js b/lib/less/source-map-output.js
index 5d7d6a8..1bb1fac 100644
--- a/lib/less/source-map-output.js
+++ b/lib/less/source-map-output.js
@@ -1,6 +1,6 @@
module.exports = function (less) {
- var sourceMapOutput = function (options) {
+ var SourceMapOutput = function (options) {
this._css = [];
this._rootNode = options.rootNode;
this._writeSourceMap = options.writeSourceMap;
@@ -24,7 +24,7 @@ module.exports = function (less) {
this._column = 0;
};
- sourceMapOutput.prototype.normalizeFilename = function(filename) {
+ SourceMapOutput.prototype.normalizeFilename = function(filename) {
filename = filename.replace(/\\/g, '/');
if (this._sourceMapBasepath && filename.indexOf(this._sourceMapBasepath) === 0) {
@@ -36,7 +36,7 @@ module.exports = function (less) {
return (this._sourceMapRootpath || "") + filename;
};
- sourceMapOutput.prototype.add = function(chunk, fileInfo, index, mapLines) {
+ SourceMapOutput.prototype.add = function(chunk, fileInfo, index, mapLines) {
//ignore adding empty strings
if (!chunk) {
@@ -92,11 +92,11 @@ module.exports = function (less) {
this._css.push(chunk);
};
- sourceMapOutput.prototype.isEmpty = function() {
+ SourceMapOutput.prototype.isEmpty = function() {
return this._css.length === 0;
};
- sourceMapOutput.prototype.toCSS = function(env) {
+ SourceMapOutput.prototype.toCSS = function(env) {
this._sourceMapGenerator = new this._sourceMapGeneratorConstructor({ file: this._outputFilename, sourceRoot: null });
if (this._outputSourceFiles) {
@@ -138,5 +138,5 @@ module.exports = function (less) {
return this._css.join('');
};
- return sourceMapOutput;
+ return SourceMapOutput;
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git
More information about the Pkg-javascript-commits
mailing list