[Pkg-javascript-commits] [less.js] 114/285: Point at the node version of less when imported and expose the environment non-specific one

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:23:45 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 2778f532667fbc271ce449436dc9f98802913b78
Author: Luke Page <luke.a.page at gmail.com>
Date:   Sun Sep 7 15:07:45 2014 +0100

    Point at the node version of less when imported and expose the environment non-specific one
---
 lib/less-node/index.js | 8 ++++++--
 package.json           | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/less-node/index.js b/lib/less-node/index.js
index d624dba..7b8f5c0 100644
--- a/lib/less-node/index.js
+++ b/lib/less-node/index.js
@@ -1,5 +1,9 @@
-var environment = require("./environment.js");
-var less = require("../less/index.js")(environment);
+var environment = require("./environment.js"),
+    createLess = require("../less/index.js"),
+    less = createLess(environment);
+
+// allow people to create less with their own environment
+less.createLess = createLess;
 
 less.formatError = function(ctx, options) {
     options = options || {};
diff --git a/package.json b/package.json
index b2c383f..ff44cfb 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
   "bin": {
     "lessc": "./bin/lessc"
   },
-  "main": "./lib/less/index",
+  "main": "./lib/less-node/index",
   "directories": {
     "test": "./test"
   },

-- 
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