basic ability to overwrite some config options in browser

This commit is contained in:
cloudhead
2010-08-15 10:58:52 -04:00
parent 0f769a09bc
commit d15752ff5f
2 changed files with 5 additions and 3 deletions

View File

@@ -6,7 +6,8 @@ var isFileProtocol = (location.protocol === 'file:' ||
location.protocol === 'chrome:' ||
location.protocol === 'resource:');
less.env = location.hostname == '127.0.0.1' ||
less.env = less.env ||
location.hostname == '127.0.0.1' ||
location.hostname == '0.0.0.0' ||
location.hostname == 'localhost' ||
location.port.length > 0 ||
@@ -22,7 +23,7 @@ less.env = location.hostname == '127.0.0.1' ||
less.async = false;
// Interval between watch polls
less.poll = isFileProtocol ? 1000 : 1500;
less.poll = less.poll || (isFileProtocol ? 1000 : 1500);
//
// Watch mode

View File

@@ -4,7 +4,8 @@ if (typeof(window) === 'undefined') {
less = exports,
tree = require('less/tree');
} else {
less = window.less = {},
if (typeof(window.less) === 'undefined') { window.less = {} }
less = window.less,
tree = window.less.tree = {};
}
//