mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-13 11:12:47 +00:00
Added files
This commit is contained in:
31
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine-helper.js
generated
vendored
Normal file
31
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine-helper.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/*global jasmine:false, window:false, document:false*/
|
||||
|
||||
(function(){
|
||||
'use strict';
|
||||
|
||||
var jasmineEnv = jasmine.getEnv();
|
||||
|
||||
jasmineEnv.updateInterval = 1000;
|
||||
var htmlReporter = new jasmine.HtmlReporter();
|
||||
jasmineEnv.addReporter(htmlReporter);
|
||||
|
||||
jasmineEnv.specFilter = function(spec) {
|
||||
return htmlReporter.specFilter(spec);
|
||||
};
|
||||
|
||||
var currentWindowOnload = window.onload;
|
||||
|
||||
if (document.readyState !== 'complete') {
|
||||
window.onload = function() {
|
||||
if (currentWindowOnload) {
|
||||
currentWindowOnload();
|
||||
}
|
||||
jasmineEnv.execute();
|
||||
};
|
||||
} else {
|
||||
jasmineEnv.execute();
|
||||
}
|
||||
|
||||
|
||||
}());
|
||||
|
||||
681
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine-html.js
generated
vendored
Normal file
681
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine-html.js
generated
vendored
Normal file
@@ -0,0 +1,681 @@
|
||||
jasmine.HtmlReporterHelpers = {};
|
||||
|
||||
jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
|
||||
var el = document.createElement(type);
|
||||
|
||||
for (var i = 2; i < arguments.length; i++) {
|
||||
var child = arguments[i];
|
||||
|
||||
if (typeof child === 'string') {
|
||||
el.appendChild(document.createTextNode(child));
|
||||
} else {
|
||||
if (child) {
|
||||
el.appendChild(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var attr in attrs) {
|
||||
if (attr == "className") {
|
||||
el[attr] = attrs[attr];
|
||||
} else {
|
||||
el.setAttribute(attr, attrs[attr]);
|
||||
}
|
||||
}
|
||||
|
||||
return el;
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
|
||||
var results = child.results();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.skipped) {
|
||||
status = 'skipped';
|
||||
}
|
||||
|
||||
return status;
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
|
||||
var parentDiv = this.dom.summary;
|
||||
var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
|
||||
var parent = child[parentSuite];
|
||||
|
||||
if (parent) {
|
||||
if (typeof this.views.suites[parent.id] == 'undefined') {
|
||||
this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
|
||||
}
|
||||
parentDiv = this.views.suites[parent.id].element;
|
||||
}
|
||||
|
||||
parentDiv.appendChild(childElement);
|
||||
};
|
||||
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
|
||||
for(var fn in jasmine.HtmlReporterHelpers) {
|
||||
ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter = function(_doc) {
|
||||
var self = this;
|
||||
var doc = _doc || window.document;
|
||||
|
||||
var reporterView;
|
||||
|
||||
var dom = {};
|
||||
|
||||
// Jasmine Reporter Public Interface
|
||||
self.logRunningSpecs = false;
|
||||
|
||||
self.reportRunnerStarting = function(runner) {
|
||||
var specs = runner.specs() || [];
|
||||
|
||||
if (specs.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
createReporterDom(runner.env.versionString());
|
||||
doc.body.appendChild(dom.reporter);
|
||||
setExceptionHandling();
|
||||
|
||||
reporterView = new jasmine.HtmlReporter.ReporterView(dom);
|
||||
reporterView.addSpecs(specs, self.specFilter);
|
||||
};
|
||||
|
||||
self.reportRunnerResults = function(runner) {
|
||||
reporterView && reporterView.complete();
|
||||
};
|
||||
|
||||
self.reportSuiteResults = function(suite) {
|
||||
reporterView.suiteComplete(suite);
|
||||
};
|
||||
|
||||
self.reportSpecStarting = function(spec) {
|
||||
if (self.logRunningSpecs) {
|
||||
self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
|
||||
}
|
||||
};
|
||||
|
||||
self.reportSpecResults = function(spec) {
|
||||
reporterView.specComplete(spec);
|
||||
};
|
||||
|
||||
self.log = function() {
|
||||
var console = jasmine.getGlobal().console;
|
||||
if (console && console.log) {
|
||||
if (console.log.apply) {
|
||||
console.log.apply(console, arguments);
|
||||
} else {
|
||||
console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
self.specFilter = function(spec) {
|
||||
if (!focusedSpecName()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return spec.getFullName().indexOf(focusedSpecName()) === 0;
|
||||
};
|
||||
|
||||
return self;
|
||||
|
||||
function focusedSpecName() {
|
||||
var specName;
|
||||
|
||||
(function memoizeFocusedSpec() {
|
||||
if (specName) {
|
||||
return;
|
||||
}
|
||||
|
||||
var paramMap = [];
|
||||
var params = jasmine.HtmlReporter.parameters(doc);
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
var p = params[i].split('=');
|
||||
paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
|
||||
}
|
||||
|
||||
specName = paramMap.spec;
|
||||
})();
|
||||
|
||||
return specName;
|
||||
}
|
||||
|
||||
function createReporterDom(version) {
|
||||
dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
|
||||
dom.banner = self.createDom('div', { className: 'banner' },
|
||||
self.createDom('span', { className: 'title' }, "Jasmine "),
|
||||
self.createDom('span', { className: 'version' }, version)),
|
||||
|
||||
dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
|
||||
dom.alert = self.createDom('div', {className: 'alert'},
|
||||
self.createDom('span', { className: 'exceptions' },
|
||||
self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),
|
||||
self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),
|
||||
dom.results = self.createDom('div', {className: 'results'},
|
||||
dom.summary = self.createDom('div', { className: 'summary' }),
|
||||
dom.details = self.createDom('div', { id: 'details' }))
|
||||
);
|
||||
}
|
||||
|
||||
function noTryCatch() {
|
||||
return window.location.search.match(/catch=false/);
|
||||
}
|
||||
|
||||
function searchWithCatch() {
|
||||
var params = jasmine.HtmlReporter.parameters(window.document);
|
||||
var removed = false;
|
||||
var i = 0;
|
||||
|
||||
while (!removed && i < params.length) {
|
||||
if (params[i].match(/catch=/)) {
|
||||
params.splice(i, 1);
|
||||
removed = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (jasmine.CATCH_EXCEPTIONS) {
|
||||
params.push("catch=false");
|
||||
}
|
||||
|
||||
return params.join("&");
|
||||
}
|
||||
|
||||
function setExceptionHandling() {
|
||||
var chxCatch = document.getElementById('no_try_catch');
|
||||
|
||||
if (noTryCatch()) {
|
||||
chxCatch.setAttribute('checked', true);
|
||||
jasmine.CATCH_EXCEPTIONS = false;
|
||||
}
|
||||
chxCatch.onclick = function() {
|
||||
window.location.search = searchWithCatch();
|
||||
};
|
||||
}
|
||||
};
|
||||
jasmine.HtmlReporter.parameters = function(doc) {
|
||||
var paramStr = doc.location.search.substring(1);
|
||||
var params = [];
|
||||
|
||||
if (paramStr.length > 0) {
|
||||
params = paramStr.split('&');
|
||||
}
|
||||
return params;
|
||||
}
|
||||
jasmine.HtmlReporter.sectionLink = function(sectionName) {
|
||||
var link = '?';
|
||||
var params = [];
|
||||
|
||||
if (sectionName) {
|
||||
params.push('spec=' + encodeURIComponent(sectionName));
|
||||
}
|
||||
if (!jasmine.CATCH_EXCEPTIONS) {
|
||||
params.push("catch=false");
|
||||
}
|
||||
if (params.length > 0) {
|
||||
link += params.join("&");
|
||||
}
|
||||
|
||||
return link;
|
||||
};
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);
|
||||
jasmine.HtmlReporter.ReporterView = function(dom) {
|
||||
this.startedAt = new Date();
|
||||
this.runningSpecCount = 0;
|
||||
this.completeSpecCount = 0;
|
||||
this.passedCount = 0;
|
||||
this.failedCount = 0;
|
||||
this.skippedCount = 0;
|
||||
|
||||
this.createResultsMenu = function() {
|
||||
this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
|
||||
this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
|
||||
' | ',
|
||||
this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
|
||||
|
||||
this.summaryMenuItem.onclick = function() {
|
||||
dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
|
||||
};
|
||||
|
||||
this.detailsMenuItem.onclick = function() {
|
||||
showDetails();
|
||||
};
|
||||
};
|
||||
|
||||
this.addSpecs = function(specs, specFilter) {
|
||||
this.totalSpecCount = specs.length;
|
||||
|
||||
this.views = {
|
||||
specs: {},
|
||||
suites: {}
|
||||
};
|
||||
|
||||
for (var i = 0; i < specs.length; i++) {
|
||||
var spec = specs[i];
|
||||
this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
|
||||
if (specFilter(spec)) {
|
||||
this.runningSpecCount++;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.specComplete = function(spec) {
|
||||
this.completeSpecCount++;
|
||||
|
||||
if (isUndefined(this.views.specs[spec.id])) {
|
||||
this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
|
||||
}
|
||||
|
||||
var specView = this.views.specs[spec.id];
|
||||
|
||||
switch (specView.status()) {
|
||||
case 'passed':
|
||||
this.passedCount++;
|
||||
break;
|
||||
|
||||
case 'failed':
|
||||
this.failedCount++;
|
||||
break;
|
||||
|
||||
case 'skipped':
|
||||
this.skippedCount++;
|
||||
break;
|
||||
}
|
||||
|
||||
specView.refresh();
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
this.suiteComplete = function(suite) {
|
||||
var suiteView = this.views.suites[suite.id];
|
||||
if (isUndefined(suiteView)) {
|
||||
return;
|
||||
}
|
||||
suiteView.refresh();
|
||||
};
|
||||
|
||||
this.refresh = function() {
|
||||
|
||||
if (isUndefined(this.resultsMenu)) {
|
||||
this.createResultsMenu();
|
||||
}
|
||||
|
||||
// currently running UI
|
||||
if (isUndefined(this.runningAlert)) {
|
||||
this.runningAlert = this.createDom('a', { href: jasmine.HtmlReporter.sectionLink(), className: "runningAlert bar" });
|
||||
dom.alert.appendChild(this.runningAlert);
|
||||
}
|
||||
this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
|
||||
|
||||
// skipped specs UI
|
||||
if (isUndefined(this.skippedAlert)) {
|
||||
this.skippedAlert = this.createDom('a', { href: jasmine.HtmlReporter.sectionLink(), className: "skippedAlert bar" });
|
||||
}
|
||||
|
||||
this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
|
||||
|
||||
if (this.skippedCount === 1 && isDefined(dom.alert)) {
|
||||
dom.alert.appendChild(this.skippedAlert);
|
||||
}
|
||||
|
||||
// passing specs UI
|
||||
if (isUndefined(this.passedAlert)) {
|
||||
this.passedAlert = this.createDom('span', { href: jasmine.HtmlReporter.sectionLink(), className: "passingAlert bar" });
|
||||
}
|
||||
this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
|
||||
|
||||
// failing specs UI
|
||||
if (isUndefined(this.failedAlert)) {
|
||||
this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
|
||||
}
|
||||
this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
|
||||
|
||||
if (this.failedCount === 1 && isDefined(dom.alert)) {
|
||||
dom.alert.appendChild(this.failedAlert);
|
||||
dom.alert.appendChild(this.resultsMenu);
|
||||
}
|
||||
|
||||
// summary info
|
||||
this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
|
||||
this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
|
||||
};
|
||||
|
||||
this.complete = function() {
|
||||
dom.alert.removeChild(this.runningAlert);
|
||||
|
||||
this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
|
||||
|
||||
if (this.failedCount === 0) {
|
||||
dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
|
||||
} else {
|
||||
showDetails();
|
||||
}
|
||||
|
||||
dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
|
||||
};
|
||||
|
||||
return this;
|
||||
|
||||
function showDetails() {
|
||||
if (dom.reporter.className.search(/showDetails/) === -1) {
|
||||
dom.reporter.className += " showDetails";
|
||||
}
|
||||
}
|
||||
|
||||
function isUndefined(obj) {
|
||||
return typeof obj === 'undefined';
|
||||
}
|
||||
|
||||
function isDefined(obj) {
|
||||
return !isUndefined(obj);
|
||||
}
|
||||
|
||||
function specPluralizedFor(count) {
|
||||
var str = count + " spec";
|
||||
if (count > 1) {
|
||||
str += "s"
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
|
||||
|
||||
|
||||
jasmine.HtmlReporter.SpecView = function(spec, dom, views) {
|
||||
this.spec = spec;
|
||||
this.dom = dom;
|
||||
this.views = views;
|
||||
|
||||
this.symbol = this.createDom('li', { className: 'pending' });
|
||||
this.dom.symbolSummary.appendChild(this.symbol);
|
||||
|
||||
this.summary = this.createDom('div', { className: 'specSummary' },
|
||||
this.createDom('a', {
|
||||
className: 'description',
|
||||
href: jasmine.HtmlReporter.sectionLink(this.spec.getFullName()),
|
||||
title: this.spec.getFullName()
|
||||
}, this.spec.description)
|
||||
);
|
||||
|
||||
this.detail = this.createDom('div', { className: 'specDetail' },
|
||||
this.createDom('a', {
|
||||
className: 'description',
|
||||
href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
|
||||
title: this.spec.getFullName()
|
||||
}, this.spec.getFullName())
|
||||
);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.status = function() {
|
||||
return this.getSpecStatus(this.spec);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.refresh = function() {
|
||||
this.symbol.className = this.status();
|
||||
|
||||
switch (this.status()) {
|
||||
case 'skipped':
|
||||
break;
|
||||
|
||||
case 'passed':
|
||||
this.appendSummaryToSuiteDiv();
|
||||
break;
|
||||
|
||||
case 'failed':
|
||||
this.appendSummaryToSuiteDiv();
|
||||
this.appendFailureDetail();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {
|
||||
this.summary.className += ' ' + this.status();
|
||||
this.appendToSummary(this.spec, this.summary);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {
|
||||
this.detail.className += ' ' + this.status();
|
||||
|
||||
var resultItems = this.spec.results().getItems();
|
||||
var messagesDiv = this.createDom('div', { className: 'messages' });
|
||||
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
|
||||
if (result.type == 'log') {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
|
||||
} else if (result.type == 'expect' && result.passed && !result.passed()) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
|
||||
|
||||
if (result.trace.stack) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (messagesDiv.childNodes.length > 0) {
|
||||
this.detail.appendChild(messagesDiv);
|
||||
this.dom.details.appendChild(this.detail);
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
|
||||
this.suite = suite;
|
||||
this.dom = dom;
|
||||
this.views = views;
|
||||
|
||||
this.element = this.createDom('div', { className: 'suite' },
|
||||
this.createDom('a', { className: 'description', href: jasmine.HtmlReporter.sectionLink(this.suite.getFullName()) }, this.suite.description)
|
||||
);
|
||||
|
||||
this.appendToSummary(this.suite, this.element);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SuiteView.prototype.status = function() {
|
||||
return this.getSpecStatus(this.suite);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
|
||||
this.element.className += " " + this.status();
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);
|
||||
|
||||
/* @deprecated Use jasmine.HtmlReporter instead
|
||||
*/
|
||||
jasmine.TrivialReporter = function(doc) {
|
||||
this.document = doc || document;
|
||||
this.suiteDivs = {};
|
||||
this.logRunningSpecs = false;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
|
||||
var el = document.createElement(type);
|
||||
|
||||
for (var i = 2; i < arguments.length; i++) {
|
||||
var child = arguments[i];
|
||||
|
||||
if (typeof child === 'string') {
|
||||
el.appendChild(document.createTextNode(child));
|
||||
} else {
|
||||
if (child) { el.appendChild(child); }
|
||||
}
|
||||
}
|
||||
|
||||
for (var attr in attrs) {
|
||||
if (attr == "className") {
|
||||
el[attr] = attrs[attr];
|
||||
} else {
|
||||
el.setAttribute(attr, attrs[attr]);
|
||||
}
|
||||
}
|
||||
|
||||
return el;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
|
||||
var showPassed, showSkipped;
|
||||
|
||||
this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
|
||||
this.createDom('div', { className: 'banner' },
|
||||
this.createDom('div', { className: 'logo' },
|
||||
this.createDom('span', { className: 'title' }, "Jasmine"),
|
||||
this.createDom('span', { className: 'version' }, runner.env.versionString())),
|
||||
this.createDom('div', { className: 'options' },
|
||||
"Show ",
|
||||
showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
|
||||
this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
|
||||
showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
|
||||
this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
|
||||
)
|
||||
),
|
||||
|
||||
this.runnerDiv = this.createDom('div', { className: 'runner running' },
|
||||
this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
|
||||
this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
|
||||
this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
|
||||
);
|
||||
|
||||
this.document.body.appendChild(this.outerDiv);
|
||||
|
||||
var suites = runner.suites();
|
||||
for (var i = 0; i < suites.length; i++) {
|
||||
var suite = suites[i];
|
||||
var suiteDiv = this.createDom('div', { className: 'suite' },
|
||||
this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
|
||||
this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
|
||||
this.suiteDivs[suite.id] = suiteDiv;
|
||||
var parentDiv = this.outerDiv;
|
||||
if (suite.parentSuite) {
|
||||
parentDiv = this.suiteDivs[suite.parentSuite.id];
|
||||
}
|
||||
parentDiv.appendChild(suiteDiv);
|
||||
}
|
||||
|
||||
this.startedAt = new Date();
|
||||
|
||||
var self = this;
|
||||
showPassed.onclick = function(evt) {
|
||||
if (showPassed.checked) {
|
||||
self.outerDiv.className += ' show-passed';
|
||||
} else {
|
||||
self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
|
||||
}
|
||||
};
|
||||
|
||||
showSkipped.onclick = function(evt) {
|
||||
if (showSkipped.checked) {
|
||||
self.outerDiv.className += ' show-skipped';
|
||||
} else {
|
||||
self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
||||
var results = runner.results();
|
||||
var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
|
||||
this.runnerDiv.setAttribute("class", className);
|
||||
//do it twice for IE
|
||||
this.runnerDiv.setAttribute("className", className);
|
||||
var specs = runner.specs();
|
||||
var specCount = 0;
|
||||
for (var i = 0; i < specs.length; i++) {
|
||||
if (this.specFilter(specs[i])) {
|
||||
specCount++;
|
||||
}
|
||||
}
|
||||
var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
|
||||
message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
|
||||
this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
|
||||
|
||||
this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
|
||||
var results = suite.results();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.totalCount === 0) { // todo: change this to check results.skipped
|
||||
status = 'skipped';
|
||||
}
|
||||
this.suiteDivs[suite.id].className += " " + status;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
|
||||
if (this.logRunningSpecs) {
|
||||
this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
|
||||
var results = spec.results();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.skipped) {
|
||||
status = 'skipped';
|
||||
}
|
||||
var specDiv = this.createDom('div', { className: 'spec ' + status },
|
||||
this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
|
||||
this.createDom('a', {
|
||||
className: 'description',
|
||||
href: '?spec=' + encodeURIComponent(spec.getFullName()),
|
||||
title: spec.getFullName()
|
||||
}, spec.description));
|
||||
|
||||
|
||||
var resultItems = results.getItems();
|
||||
var messagesDiv = this.createDom('div', { className: 'messages' });
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
|
||||
if (result.type == 'log') {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
|
||||
} else if (result.type == 'expect' && result.passed && !result.passed()) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
|
||||
|
||||
if (result.trace.stack) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (messagesDiv.childNodes.length > 0) {
|
||||
specDiv.appendChild(messagesDiv);
|
||||
}
|
||||
|
||||
this.suiteDivs[spec.suite.id].appendChild(specDiv);
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.log = function() {
|
||||
var console = jasmine.getGlobal().console;
|
||||
if (console && console.log) {
|
||||
if (console.log.apply) {
|
||||
console.log.apply(console, arguments);
|
||||
} else {
|
||||
console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.getLocation = function() {
|
||||
return this.document.location;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.specFilter = function(spec) {
|
||||
var paramMap = {};
|
||||
var params = this.getLocation().search.substring(1).split('&');
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
var p = params[i].split('=');
|
||||
paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
|
||||
}
|
||||
|
||||
if (!paramMap.spec) {
|
||||
return true;
|
||||
}
|
||||
return spec.getFullName().indexOf(paramMap.spec) === 0;
|
||||
};
|
||||
82
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine.css
generated
vendored
Normal file
82
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine.css
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
|
||||
|
||||
#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
|
||||
#HTMLReporter a { text-decoration: none; }
|
||||
#HTMLReporter a:hover { text-decoration: underline; }
|
||||
#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }
|
||||
#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }
|
||||
#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
|
||||
#HTMLReporter .version { color: #aaaaaa; }
|
||||
#HTMLReporter .banner { margin-top: 14px; }
|
||||
#HTMLReporter .duration { color: #aaaaaa; float: right; }
|
||||
#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; }
|
||||
#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; }
|
||||
#HTMLReporter .symbolSummary li.passed { font-size: 14px; }
|
||||
#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; }
|
||||
#HTMLReporter .symbolSummary li.failed { line-height: 9px; }
|
||||
#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; }
|
||||
#HTMLReporter .symbolSummary li.skipped { font-size: 14px; }
|
||||
#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; }
|
||||
#HTMLReporter .symbolSummary li.pending { line-height: 11px; }
|
||||
#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; }
|
||||
#HTMLReporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; }
|
||||
#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
|
||||
#HTMLReporter .runningAlert { background-color: #666666; }
|
||||
#HTMLReporter .skippedAlert { background-color: #aaaaaa; }
|
||||
#HTMLReporter .skippedAlert:first-child { background-color: #333333; }
|
||||
#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }
|
||||
#HTMLReporter .passingAlert { background-color: #a6b779; }
|
||||
#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }
|
||||
#HTMLReporter .failingAlert { background-color: #cf867e; }
|
||||
#HTMLReporter .failingAlert:first-child { background-color: #b03911; }
|
||||
#HTMLReporter .results { margin-top: 14px; }
|
||||
#HTMLReporter #details { display: none; }
|
||||
#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; }
|
||||
#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }
|
||||
#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
|
||||
#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }
|
||||
#HTMLReporter.showDetails .summary { display: none; }
|
||||
#HTMLReporter.showDetails #details { display: block; }
|
||||
#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }
|
||||
#HTMLReporter .summary { margin-top: 14px; }
|
||||
#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }
|
||||
#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; }
|
||||
#HTMLReporter .summary .specSummary.failed a { color: #b03911; }
|
||||
#HTMLReporter .description + .suite { margin-top: 0; }
|
||||
#HTMLReporter .suite { margin-top: 14px; }
|
||||
#HTMLReporter .suite a { color: #333333; }
|
||||
#HTMLReporter #details .specDetail { margin-bottom: 28px; }
|
||||
#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }
|
||||
#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }
|
||||
#HTMLReporter .resultMessage span.result { display: block; }
|
||||
#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }
|
||||
|
||||
#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ }
|
||||
#TrivialReporter a:visited, #TrivialReporter a { color: #303; }
|
||||
#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; }
|
||||
#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; }
|
||||
#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; }
|
||||
#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; }
|
||||
#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; }
|
||||
#TrivialReporter .runner.running { background-color: yellow; }
|
||||
#TrivialReporter .options { text-align: right; font-size: .8em; }
|
||||
#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; }
|
||||
#TrivialReporter .suite .suite { margin: 5px; }
|
||||
#TrivialReporter .suite.passed { background-color: #dfd; }
|
||||
#TrivialReporter .suite.failed { background-color: #fdd; }
|
||||
#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; }
|
||||
#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; }
|
||||
#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; }
|
||||
#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; }
|
||||
#TrivialReporter .spec.skipped { background-color: #bbb; }
|
||||
#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; }
|
||||
#TrivialReporter .passed { background-color: #cfc; display: none; }
|
||||
#TrivialReporter .failed { background-color: #fbb; }
|
||||
#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; }
|
||||
#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; }
|
||||
#TrivialReporter .resultMessage .mismatch { color: black; }
|
||||
#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; }
|
||||
#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; }
|
||||
#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; }
|
||||
#TrivialReporter #jasmine_content { position: fixed; right: 100%; }
|
||||
#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; }
|
||||
2600
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine.js
generated
vendored
Normal file
2600
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/jasmine.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
24
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/phantom-polyfill.js
generated
vendored
Normal file
24
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/phantom-polyfill.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (oThis) {
|
||||
if (typeof this !== "function") {
|
||||
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
||||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
FNOP = function () {},
|
||||
fBound = function () {
|
||||
return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
|
||||
FNOP.prototype = this.prototype;
|
||||
fBound.prototype = new FNOP();
|
||||
|
||||
return fBound;
|
||||
};
|
||||
}
|
||||
287
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/reporter.js
generated
vendored
Normal file
287
mongoui/mongoui-master/node_modules/derby/node_modules/less/.grunt/grunt-contrib-jasmine/reporter.js
generated
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
/*global window:false, alert:false, jasmine:false, Node:false, */
|
||||
/*jshint curly:false*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var phantom = {};
|
||||
|
||||
if (window._phantom) {
|
||||
console.log = function(){
|
||||
phantom.sendMessage('verbose',Array.prototype.slice.apply(arguments).join(', '));
|
||||
};
|
||||
}
|
||||
|
||||
phantom.sendMessage = function() {
|
||||
var args = [].slice.call( arguments );
|
||||
var payload = JSON.stringify( args );
|
||||
if (window._phantom) {
|
||||
// alerts are the communication bridge to grunt
|
||||
alert( payload );
|
||||
}
|
||||
};
|
||||
|
||||
(function(){
|
||||
|
||||
function PhantomReporter() {
|
||||
this.started = false;
|
||||
this.finished = false;
|
||||
this.suites_ = [];
|
||||
this.results_ = {};
|
||||
this.buffer = '';
|
||||
}
|
||||
|
||||
PhantomReporter.prototype.reportRunnerStarting = function(runner) {
|
||||
this.started = true;
|
||||
|
||||
var suites = runner.topLevelSuites();
|
||||
for (var i = 0; i < suites.length; i++) {
|
||||
var suite = suites[i];
|
||||
this.suites_.push(this.summarize_(suite));
|
||||
}
|
||||
phantom.sendMessage('jasmine.reportRunnerStarting', this.suites_);
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.reportSpecStarting = function(spec) {
|
||||
spec.startTime = (new Date()).getTime();
|
||||
var message = {
|
||||
suite : {
|
||||
description : spec.suite.description
|
||||
},
|
||||
description : spec.description
|
||||
};
|
||||
phantom.sendMessage('jasmine.reportSpecStarting', message);
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.suites = function() {
|
||||
return this.suites_;
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.summarize_ = function(suiteOrSpec) {
|
||||
var isSuite = suiteOrSpec instanceof jasmine.Suite;
|
||||
var summary = {
|
||||
id: suiteOrSpec.id,
|
||||
name: suiteOrSpec.description,
|
||||
type: isSuite ? 'suite' : 'spec',
|
||||
children: []
|
||||
};
|
||||
|
||||
if (isSuite) {
|
||||
var children = suiteOrSpec.children();
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
summary.children.push(this.summarize_(children[i]));
|
||||
}
|
||||
}
|
||||
return summary;
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.results = function() {
|
||||
return this.results_;
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.resultsForSpec = function(specId) {
|
||||
return this.results_[specId];
|
||||
};
|
||||
|
||||
function map(values, f) {
|
||||
var result = [];
|
||||
for (var ii = 0; ii < values.length; ii++) {
|
||||
result.push(f(values[ii]));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
PhantomReporter.prototype.reportRunnerResults = function(runner) {
|
||||
this.finished = true;
|
||||
var specIds = map(runner.specs(), function(a){return a.id;});
|
||||
var summary = this.resultsForSpecs(specIds);
|
||||
phantom.sendMessage('jasmine.reportRunnerResults',summary);
|
||||
phantom.sendMessage('jasmine.reportJUnitResults', this.generateJUnitSummary(runner));
|
||||
phantom.sendMessage('jasmine.done.PhantomReporter');
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.reportSuiteResults = function(suite) {
|
||||
if (suite.specs().length) {
|
||||
suite.timestamp = new Date();
|
||||
suite.duration = suite.timestamp.getTime() - suite.specs()[0].startTime;
|
||||
phantom.sendMessage('jasmine.reportSuiteResults',{
|
||||
description : suite.description,
|
||||
results : suite.results()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function stringify(obj) {
|
||||
if (typeof obj !== 'object') return obj;
|
||||
|
||||
var cache = [], keyMap = [], index;
|
||||
|
||||
var string = JSON.stringify(obj, function(key, value) {
|
||||
// Let json stringify falsy values
|
||||
if (!value) return value;
|
||||
|
||||
// If we're a node
|
||||
if (typeof(Node) !== 'undefined' && value instanceof Node) return '[ Node ]';
|
||||
|
||||
// jasmine-given has expectations on Specs. We intercept to return a
|
||||
// String to avoid stringifying the entire Jasmine environment, which
|
||||
// results in exponential string growth
|
||||
if (value instanceof jasmine.Spec) return '[ Spec: ' + value.description + ' ]';
|
||||
|
||||
// If we're a window (logic stolen from jQuery)
|
||||
if (value.window && value.window === value.window.window) return '[ Window ]';
|
||||
|
||||
// Simple function reporting
|
||||
if (typeof value === 'function') return '[ Function ]';
|
||||
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
|
||||
if (index = cache.indexOf(value) !== -1) {
|
||||
// If we have it in cache, report the circle with the key we first found it in
|
||||
return '[ Circular {' + (keyMap[index] || 'root') + '} ]';
|
||||
}
|
||||
cache.push(value);
|
||||
keyMap.push(key);
|
||||
}
|
||||
return value;
|
||||
});
|
||||
return string;
|
||||
}
|
||||
|
||||
PhantomReporter.prototype.reportSpecResults = function(spec) {
|
||||
spec.duration = (new Date()).getTime() - spec.startTime;
|
||||
var _results = spec.results();
|
||||
var results = {
|
||||
description : _results.description,
|
||||
messages : _results.getItems(),
|
||||
failedCount : _results.failedCount,
|
||||
totalCount : _results.totalCount,
|
||||
passedCount : _results.passedCount,
|
||||
skipped : _results.skipped,
|
||||
passed : _results.passed(),
|
||||
msg : _results.failedCount > 0 ? "failed" : "passed"
|
||||
};
|
||||
this.results_[spec.id] = results;
|
||||
|
||||
// Quick hack to alleviate cyclical object breaking JSONification.
|
||||
for (var ii = 0; ii < results.messages.length; ii++) {
|
||||
var item = results.messages[ii];
|
||||
if (item.expected) {
|
||||
item.expected = stringify(item.expected);
|
||||
}
|
||||
if (item.actual) {
|
||||
item.actual = stringify(item.actual);
|
||||
}
|
||||
}
|
||||
|
||||
phantom.sendMessage( 'jasmine.reportSpecResults', spec.id, results, this.getFullName(spec));
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.getFullName = function(spec) {
|
||||
return getNestedSuiteName(spec.suite, ':: ') + ':: ' + spec.description;
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.resultsForSpecs = function(specIds){
|
||||
var results = {};
|
||||
for (var i = 0; i < specIds.length; i++) {
|
||||
var specId = specIds[i];
|
||||
results[specId] = this.summarizeResult_(this.results_[specId]);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
PhantomReporter.prototype.summarizeResult_ = function(result){
|
||||
var summaryMessages = [];
|
||||
var messagesLength = result.messages.length;
|
||||
for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
|
||||
var resultMessage = result.messages[messageIndex];
|
||||
summaryMessages.push({
|
||||
text: resultMessage.type === 'log' ? resultMessage.toString() : jasmine.undefined,
|
||||
passed: resultMessage.passed ? resultMessage.passed() : true,
|
||||
type: resultMessage.type,
|
||||
message: resultMessage.message,
|
||||
trace: {
|
||||
stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
result : result.result,
|
||||
messages : summaryMessages
|
||||
};
|
||||
};
|
||||
|
||||
function getNestedSuiteName(suite, sep) {
|
||||
var names = [];
|
||||
while (suite) {
|
||||
names.unshift(suite.description);
|
||||
suite = suite.parentSuite;
|
||||
}
|
||||
return names.join(sep ? sep : ' ');
|
||||
}
|
||||
|
||||
function getTopLevelSuiteId(suite) {
|
||||
var id;
|
||||
while (suite) {
|
||||
id = suite.id;
|
||||
suite = suite.parentSuite;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
PhantomReporter.prototype.generateJUnitSummary = function(runner) {
|
||||
var consolidatedSuites = {},
|
||||
suites = map(runner.suites(), function(suite) {
|
||||
var failures = 0;
|
||||
|
||||
var testcases = map(suite.specs(), function(spec) {
|
||||
var failureMessages = [];
|
||||
var specResults = spec.results();
|
||||
var resultsItems = specResults.items_;
|
||||
var resultsItemCount = resultsItems.length;
|
||||
|
||||
if (specResults.failedCount) {
|
||||
failures++;
|
||||
|
||||
for (var ii = 0; ii < resultsItemCount; ii++) {
|
||||
var expectation = resultsItems[ii];
|
||||
if (!expectation.passed()) {
|
||||
failureMessages.push(expectation.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
assertions: resultsItemCount,
|
||||
className: getNestedSuiteName(spec.suite),
|
||||
name: spec.description,
|
||||
time: spec.duration / 1000,
|
||||
failureMessages: failureMessages
|
||||
};
|
||||
});
|
||||
|
||||
var data = {
|
||||
name: getNestedSuiteName(suite),
|
||||
time: suite.duration / 1000,
|
||||
timestamp: suite.timestamp,
|
||||
tests: suite.specs().length,
|
||||
errors: 0, // TODO: These exist in the JUnit XML but not sure how they map to jasmine things
|
||||
testcases: testcases,
|
||||
failures: failures
|
||||
};
|
||||
|
||||
if (suite.parentSuite) {
|
||||
consolidatedSuites[getTopLevelSuiteId(suite)].push(data);
|
||||
} else {
|
||||
consolidatedSuites[suite.id] = [data];
|
||||
}
|
||||
return data;
|
||||
});
|
||||
|
||||
return {
|
||||
suites: suites,
|
||||
consolidatedSuites: consolidatedSuites
|
||||
};
|
||||
};
|
||||
|
||||
jasmine.getEnv().addReporter( new PhantomReporter() );
|
||||
}());
|
||||
1
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/.name
generated
vendored
Normal file
1
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/.name
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
less.js
|
||||
5
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/encodings.xml
generated
vendored
Normal file
5
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/encodings.xml
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
|
||||
</project>
|
||||
|
||||
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/inspectionProfiles/Project_Default.xml
generated
vendored
Normal file
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/inspectionProfiles/Project_Default.xml
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0" is_locked="false">
|
||||
<option name="myName" value="Project Default" />
|
||||
<option name="myLocal" value="false" />
|
||||
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/inspectionProfiles/profiles_settings.xml
generated
vendored
Normal file
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/inspectionProfiles/profiles_settings.xml
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
8
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/jsLibraryMappings.xml
generated
vendored
Normal file
8
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/jsLibraryMappings.xml
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$/lib/less/functions.js" libraries="{Node.js Globals}" />
|
||||
<file url="PROJECT" libraries="{Node.js v0.8.4 Core Modules}" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/jsLinters/jshint.xml
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/jsLinters/jshint.xml
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JSHintConfiguration" version="1.0.0" use-config-file="false">
|
||||
<option bitwise="true" />
|
||||
<option curly="true" />
|
||||
<option eqeqeq="true" />
|
||||
<option forin="true" />
|
||||
<option noarg="true" />
|
||||
<option noempty="true" />
|
||||
<option nonew="true" />
|
||||
<option undef="true" />
|
||||
<option node="true" />
|
||||
<option maxerr="200" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/less.js.iml
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/less.js.iml
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.grunt" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/projectFilesBackup" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Node.js v0.8.4 Core Modules" level="application" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
8
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/libraries/sass_stdlib.xml
generated
vendored
Normal file
8
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/libraries/sass_stdlib.xml
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<component name="libraryTable">
|
||||
<library name="sass-stdlib">
|
||||
<CLASSES />
|
||||
<SOURCES>
|
||||
<root url="file://$APPLICATION_HOME_DIR$/plugins/sass/lib/stubs/sass_functions.scss" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
5
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/misc.xml
generated
vendored
Normal file
5
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/misc.xml
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" />
|
||||
</project>
|
||||
|
||||
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/modules.xml
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/modules.xml
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/less.js.iml" filepath="$PROJECT_DIR$/.idea/less.js.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
5
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/scopes/scope_settings.xml
generated
vendored
Normal file
5
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/scopes/scope_settings.xml
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
||||
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/vcs.xml
generated
vendored
Normal file
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/vcs.xml
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
622
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/workspace.xml
generated
vendored
Normal file
622
mongoui/mongoui-master/node_modules/derby/node_modules/less/.idea/workspace.xml
generated
vendored
Normal file
@@ -0,0 +1,622 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/less/index.js" afterPath="$PROJECT_DIR$/lib/less/index.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
|
||||
</list>
|
||||
<ignored path="less.js.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
<file path="/Dummy.txt" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384623004566" ignored="false" />
|
||||
<file path="/functions.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379356464686" ignored="false" />
|
||||
<file path="/merge.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367345312764" ignored="false" />
|
||||
<file path="/merge.css" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367345371581" ignored="false" />
|
||||
<file path="/parser.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384623574418" ignored="false" />
|
||||
<file path="/rule.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374175620781" ignored="false" />
|
||||
<file path="/a.dummy" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384704235894" ignored="false" />
|
||||
<file path="/nth-function.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367351948429" ignored="false" />
|
||||
<file path="/SelectorPath.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367352844032" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/templates/pages/doc.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367650256341" ignored="false" />
|
||||
<file path="/doc.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367511155988" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/templates/pages/reference.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367650256341" ignored="false" />
|
||||
<file path="/reference.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367511521223" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/templates/pages/synopsis.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367650256341" ignored="false" />
|
||||
<file path="/synopsis.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367512577237" ignored="false" />
|
||||
<file path="/CHANGELOG.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384707108757" ignored="false" />
|
||||
<file path="/env.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378330486285" ignored="false" />
|
||||
<file path="/less-test.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1375300238188" ignored="false" />
|
||||
<file path="/common.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1377113623956" ignored="false" />
|
||||
<file path="/lessc" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384706167285" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/templates/pages/index.rhtml" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382362199135" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/templates/pages/about.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1367650256341" ignored="false" />
|
||||
<file path="/compression.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378056773801" ignored="false" />
|
||||
<file path="/selector.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374087280500" ignored="false" />
|
||||
<file path="/css-guards.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1372667548849" ignored="false" />
|
||||
<file path="/ruleset.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379366254610" ignored="false" />
|
||||
<file path="/no-js-errors.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1372668666786" ignored="false" />
|
||||
<file path="/no-js-errors.txt" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1372671114701" ignored="false" />
|
||||
<file path="/runner-no-js-errors.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1372671176132" ignored="false" />
|
||||
<file path="/browser-test-prepare.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1377068774816" ignored="false" />
|
||||
<file path="/lessc_helper.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384705418739" ignored="false" />
|
||||
<file path="/alpha.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1373574350907" ignored="false" />
|
||||
<file path="/to-css-visitor.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378658031292" ignored="false" />
|
||||
<file path="/Makefile" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1375304491807" ignored="false" />
|
||||
<file path="/visitor.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1373043545554" ignored="false" />
|
||||
<file path="/directive.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379359102231" ignored="false" />
|
||||
<file path="/media.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1375301701331" ignored="false" />
|
||||
<file path="/comment.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1375301621807" ignored="false" />
|
||||
<file path="/browser.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378034792983" ignored="false" />
|
||||
<file path="/media.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379523525707" ignored="false" />
|
||||
<file path="/media.css" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1373053829141" ignored="false" />
|
||||
<file path="/package.json" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1375302882301" ignored="false" />
|
||||
<file path="/tree.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378657399843" ignored="false" />
|
||||
<file path="/anonymous.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379434364712" ignored="false" />
|
||||
<file path="/assignment.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1373571953626" ignored="false" />
|
||||
<file path="/call.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374356861450" ignored="false" />
|
||||
<file path="/color.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379156478591" ignored="false" />
|
||||
<file path="/dimension.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378056696377" ignored="false" />
|
||||
<file path="/expression.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1373576744139" ignored="false" />
|
||||
<file path="/element.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374125317693" ignored="false" />
|
||||
<file path="/import.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379434336020" ignored="false" />
|
||||
<file path="/keyword.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374125602299" ignored="false" />
|
||||
<file path="/source-map-output.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384706268256" ignored="false" />
|
||||
<file path="/basic.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379432631064" ignored="false" />
|
||||
<file path="/basic.json" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374178313233" ignored="false" />
|
||||
<file path="/.npmignore" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374328321137" ignored="false" />
|
||||
<file path="/css-3.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374328763861" ignored="false" />
|
||||
<file path="/mixins-args.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379520900857" ignored="false" />
|
||||
<file path="/README.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374330838557" ignored="false" />
|
||||
<file path="/CONTRIBUTING.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1374330872908" ignored="false" />
|
||||
<file path="/.jshintrc" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378033719481" ignored="false" />
|
||||
<file path="/quoted.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1381857163438" ignored="false" />
|
||||
<file path="/index.html" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379432766230" ignored="false" />
|
||||
<file path="/import-visitor.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379524434085" ignored="false" />
|
||||
<file path="/value.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1376599932204" ignored="false" />
|
||||
<file path="/strings.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379163271597" ignored="false" />
|
||||
<file path="/browser-header.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1376601721278" ignored="false" />
|
||||
<file path="/test-runner-main.htm" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1377108298892" ignored="false" />
|
||||
<file path="/template.htm" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1377109474311" ignored="false" />
|
||||
<file path="/runner-console-errors.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1377112419174" ignored="false" />
|
||||
<file path="/test-error.txt" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1377195013482" ignored="false" />
|
||||
<file path="/extend-visitor.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1381871630563" ignored="false" />
|
||||
<file path="/extend-selector.css" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378043359906" ignored="false" />
|
||||
<file path="/mixin.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379522541276" ignored="false" />
|
||||
<file path="/Gruntfile.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378761925237" ignored="false" />
|
||||
<file path="/less-benchmark.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378362092117" ignored="false" />
|
||||
<file path="/.jshintignore" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378362199452" ignored="false" />
|
||||
<file path="/*.regexp" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1378758302330" ignored="false" />
|
||||
<file path="/functions.css" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379156751207" ignored="false" />
|
||||
<file path="/mixins-guards.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379479142100" ignored="false" />
|
||||
<file path="/color-func-invalid-color.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379356574472" ignored="false" />
|
||||
<file path="/functions.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379479777370" ignored="false" />
|
||||
<file path="/imported.css" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379432649832" ignored="false" />
|
||||
<file path="/unit-function.txt" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379479902633" ignored="false" />
|
||||
<file path="/runner-errors-options.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379480007230" ignored="false" />
|
||||
<file path="/mixins-important.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379522756238" ignored="false" />
|
||||
<file path="/import-once.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1380865674077" ignored="false" />
|
||||
<file path="/import-once-test-c.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1379524800174" ignored="false" />
|
||||
<file path="/import-test-f.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1380865710653" ignored="false" />
|
||||
<file path="/extend-chaining.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1381864586893" ignored="false" />
|
||||
<file path="/multiple-guards-on-css-selectors.txt" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382028478537" ignored="false" />
|
||||
<file path="/extend.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382030485416" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/templates/pages/changes.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382343724645" ignored="false" />
|
||||
<file path="/changes.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382343697611" ignored="false" />
|
||||
<file path="/index.rhtml" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382348009192" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../lesscss.org/public/less/main.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382348100818" ignored="false" />
|
||||
<file path="/main.less" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382348099815" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/templates/index.hbs" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382366686104" ignored="false" />
|
||||
<file path="/index.hbs" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382366638789" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/_gh_pages/index.html" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382871352768" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/_gh_pages/functions.html" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382871352768" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/_gh_pages/assets/css/docs.css" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382871352768" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/_gh_pages/about.html" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382871352768" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/_gh_pages/features.html" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382386851856" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/templates/functions.hbs" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382369093161" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/features/import-directives.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382374448421" ignored="false" />
|
||||
<file path="/import-directives.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382374439007" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/features/variables.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382387949751" ignored="false" />
|
||||
<file path="/variables.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382371763346" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/templates/includes/translations.hbs" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382376766702" ignored="false" />
|
||||
<file path="/translations.hbs" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382376766702" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/translations.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382377201638" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/features/merge.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382388169396" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/features/Parent-Selectors.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382387070516" ignored="false" />
|
||||
<file path="/Parent-Selectors.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382387070516" ignored="false" />
|
||||
<file path="/merge.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382388140793" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/features/extend.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382878661928" ignored="false" />
|
||||
<file path="/extend.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382878661928" ignored="false" />
|
||||
<file path="$PROJECT_DIR$/../less-docs/content/features/less-extends.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382391289964" ignored="false" />
|
||||
<file path="/less-extends.md" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1382391191974" ignored="false" />
|
||||
<file path="/index.js" changelist="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" time="1384702831330" ignored="false" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
||||
<component name="CreatePatchCommitExecutor">
|
||||
<option name="PATCH_PATH" value="" />
|
||||
</component>
|
||||
<component name="DaemonCodeAnalyzer">
|
||||
<disable_hints />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FavoritesManager">
|
||||
<favorites_list name="less.js" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file leaf-file-name="parser.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/parser.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="471" column="45" selection-start="17182" selection-end="17182" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="less-1.5.0.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/dist/less-1.5.0.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="14" column="2" selection-start="266" selection-end="266" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Gruntfile.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/Gruntfile.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="30" column="13" selection-start="929" selection-end="929" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="source-map-output.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/source-map-output.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="100" column="19" selection-start="3873" selection-end="3873" vertical-scroll-proportion="-9.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="lessc" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/bin/lessc">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="325" column="32" selection-start="9587" selection-end="9599" vertical-scroll-proportion="-4.44">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="lessc_helper.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/lessc_helper.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="46" column="43" selection-start="2655" selection-end="2655" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="CHANGELOG.md" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="11" column="0" selection-start="548" selection-end="548" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="package.json" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="2" column="19" selection-start="39" selection-end="39" vertical-scroll-proportion="-1.3076923">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="index.js" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="4" column="0" selection-start="91" selection-end="91" vertical-scroll-proportion="0.2125">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FindManager">
|
||||
<FindUsagesManager>
|
||||
<setting name="OPEN_NEW_TAB" value="false" />
|
||||
</FindUsagesManager>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="GitLogSettings">
|
||||
<option name="myDateState">
|
||||
<MyDateState />
|
||||
</option>
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="changedFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/test/less/css-3.less" />
|
||||
<option value="$PROJECT_DIR$/test/css/css-3.css" />
|
||||
<option value="$PROJECT_DIR$/test/css/extend-spaces.css" />
|
||||
<option value="$PROJECT_DIR$/test/less/errors/multiple-guards-on-css-selectors.less" />
|
||||
<option value="$PROJECT_DIR$/lib/less/tree/extend.js" />
|
||||
<option value="$PROJECT_DIR$/lib/less/browser.js" />
|
||||
<option value="$PROJECT_DIR$/test/less/errors/multiple-guards-on-css-selectors.txt" />
|
||||
<option value="$PROJECT_DIR$/Gruntfile.js" />
|
||||
<option value="$PROJECT_DIR$/bower.json" />
|
||||
<option value="$PROJECT_DIR$/lib/less/parser.js" />
|
||||
<option value="$PROJECT_DIR$/lib/less/lessc_helper.js" />
|
||||
<option value="$PROJECT_DIR$/bin/lessc" />
|
||||
<option value="$PROJECT_DIR$/lib/less/source-map-output.js" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/package.json" />
|
||||
<option value="$PROJECT_DIR$/lib/less/index.js" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="54" />
|
||||
<option name="y" value="-8" />
|
||||
<option name="width" value="1320" />
|
||||
<option name="height" value="784" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectReloadState">
|
||||
<option name="STATE" value="0" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
|
||||
<flattenPackages />
|
||||
<showMembers />
|
||||
<showModules />
|
||||
<showLibraryContents ProjectPane="true" />
|
||||
<hideEmptyPackages />
|
||||
<abbreviatePackageNames />
|
||||
<autoscrollToSource />
|
||||
<autoscrollFromSource />
|
||||
<sortByType />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="lib" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="less.js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="bin" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="options.splitter.main.proportions" value="0.3" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="options.lastSelected" value="JavaScript.Libraries" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/dist/less-1.5.1.min.js" />
|
||||
<property name="FullScreen" value="false" />
|
||||
<property name="options.splitter.details.proportions" value="0.2" />
|
||||
<property name="options.searchVisible" value="true" />
|
||||
<property name="GoToClass.includeJavaFiles" value="false" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="C:\git\less.js\test\less\errors" />
|
||||
<recent name="C:\git\less.js\test\less\import" />
|
||||
<recent name="C:\git\less.js\test\browser" />
|
||||
<recent name="C:\git\less.js\test\browser\css\console-errors" />
|
||||
<recent name="C:\git\less.js\lib\less" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\git\less.js\test\browser\less\console-errors" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration default="true" type="DartUnitRunConfigurationType" factoryName="DartUnit">
|
||||
<option name="VMOptions" />
|
||||
<option name="arguments" />
|
||||
<option name="filePath" />
|
||||
<option name="scope" value="ALL" />
|
||||
<option name="testName" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" working-dir="$PROJECT_DIR$">
|
||||
<method />
|
||||
</configuration>
|
||||
<list size="0" />
|
||||
</component>
|
||||
<component name="ShelveChangesManager" show_recycled="false" />
|
||||
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="all">
|
||||
<option name="USER" value="" />
|
||||
<option name="PASSWORD" value="" />
|
||||
<option name="mySSHConnectionTimeout" value="30000" />
|
||||
<option name="mySSHReadTimeout" value="30000" />
|
||||
<option name="LAST_MERGED_REVISION" />
|
||||
<option name="MERGE_DRY_RUN" value="false" />
|
||||
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
||||
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
||||
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
|
||||
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
|
||||
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
|
||||
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
|
||||
<option name="FORCE_UPDATE" value="false" />
|
||||
<option name="IGNORE_EXTERNALS" value="false" />
|
||||
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="50832ad7-0bb2-445d-8bdb-45c8a0f7f27b" name="Default" comment="" />
|
||||
<created>1357400236487</created>
|
||||
<updated>1357400236487</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="54" y="-8" width="1320" height="784" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.354067" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26619828" sideWeight="0.64593303" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
|
||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
|
||||
<option name="CHECK_NEW_TODO" value="true" />
|
||||
<option name="myTodoPanelSettings">
|
||||
<value>
|
||||
<are-packages-shown value="false" />
|
||||
<are-modules-shown value="false" />
|
||||
<flatten-packages value="false" />
|
||||
<is-autoscroll-to-source value="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
|
||||
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
|
||||
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
|
||||
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
|
||||
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
|
||||
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
|
||||
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
|
||||
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
|
||||
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
|
||||
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
|
||||
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
|
||||
<option name="SHORT_DIFF_HORIZONTALLY" value="true" />
|
||||
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
|
||||
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
|
||||
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
|
||||
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
|
||||
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
|
||||
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
|
||||
<option name="SHOW_DIRTY_RECURSIVELY" value="false" />
|
||||
<option name="LIMIT_HISTORY" value="true" />
|
||||
<option name="MAXIMUM_HISTORY_ROWS" value="1000" />
|
||||
<option name="UPDATE_FILTER_SCOPE_NAME" />
|
||||
<option name="USE_COMMIT_MESSAGE_MARGIN" value="false" />
|
||||
<option name="COMMIT_MESSAGE_MARGIN_SIZE" value="72" />
|
||||
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
|
||||
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
|
||||
<option name="LAST_COMMIT_MESSAGE" />
|
||||
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
||||
<option name="ACTIVE_VCS_NAME" />
|
||||
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
||||
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
||||
<option name="UPDATE_FILTER_BY_SCOPE" value="false" />
|
||||
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
||||
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<option name="time" value="1" />
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/test/less/errors/multiple-guards-on-css-selectors.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="4" column="0" selection-start="173" selection-end="173" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/functions.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="447" column="32" selection-start="16304" selection-end="16304" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/test/less-test.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="234" column="39" selection-start="8082" selection-end="8082" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/LICENSE">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/dist/less-1.5.0.min.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/dist/less-1.5.0.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="14" column="2" selection-start="266" selection-end="266" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/bower.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="7" column="10" selection-start="130" selection-end="130" vertical-scroll-proportion="0.35843372">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Gruntfile.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="30" column="13" selection-start="929" selection-end="929" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/lessc_helper.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="46" column="43" selection-start="2655" selection-end="2655" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/parser.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="471" column="45" selection-start="17182" selection-end="17182" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/bin/lessc">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="325" column="32" selection-start="9587" selection-end="9599" vertical-scroll-proportion="-4.44">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/source-map-output.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="100" column="19" selection-start="3873" selection-end="3873" vertical-scroll-proportion="-9.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="11" column="0" selection-start="548" selection-end="548" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="2" column="19" selection-start="39" selection-end="39" vertical-scroll-proportion="-1.3076923">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/dist/less-1.5.1.min.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/less/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="4" column="0" selection-start="91" selection-end="91" vertical-scroll-proportion="0.2125">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/.jshintrc
generated
vendored
Normal file
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/.jshintrc
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"evil": true,
|
||||
"boss": true,
|
||||
"expr": true,
|
||||
"laxbreak": true,
|
||||
"latedef": true,
|
||||
"node": true,
|
||||
"undef": true,
|
||||
"unused": "vars",
|
||||
"noarg": true
|
||||
}
|
||||
1
mongoui/mongoui-master/node_modules/derby/node_modules/less/.npmignore
generated
vendored
Normal file
1
mongoui/mongoui-master/node_modules/derby/node_modules/less/.npmignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.gitattributes
|
||||
224
mongoui/mongoui-master/node_modules/derby/node_modules/less/CHANGELOG.md
generated
vendored
Normal file
224
mongoui/mongoui-master/node_modules/derby/node_modules/less/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
# 1.5.1
|
||||
|
||||
2013-11-17
|
||||
|
||||
- Added source-map-URL option
|
||||
- Fixed a bug which meant the minimised 1.5.0 browser version was not wrapped, meaning it interfered with require js
|
||||
- Fixed a bug where the browser version assume port was specified
|
||||
- Added the ability to specify variables on the command line
|
||||
- Upgraded clean-css and fixed it from trying to import
|
||||
- correct a bug meaning imports weren't synchronous (syncImport option available for full synchronous behaviour)
|
||||
- better mixin matching behaviour with calling multiple classes e.g. .a.b.c;
|
||||
|
||||
# 1.5.0
|
||||
|
||||
2013-10-21
|
||||
|
||||
- sourcemap support
|
||||
- support for import inline option to include css that you do NOT want less to parse e.g. `@import (inline) "file.css";`
|
||||
- better support for modifyVars (refresh styles with new variables, using a file cache), is now more resiliant
|
||||
- support for import reference option to reference external css, but not output it. Any mixin calls or extend's will be output.
|
||||
- support for guards on selectors (currently only if you have a single selector)
|
||||
- allow property merging through the +: syntax
|
||||
- Added min/max functions
|
||||
- Added length function and improved extract to work with comma seperated values
|
||||
- when using import multiple, sub imports are imported multiple times into final output
|
||||
- fix bad spaces between namespace operators
|
||||
- do not compress comment if it begins with an exclamation mark
|
||||
- Fix the saturate function to pass through when using the CSS syntax
|
||||
- Added svg-gradient function
|
||||
- Added no-js option to lessc (in browser, use javascriptEnabled: false) which disallows JavaScript in less files
|
||||
- switched from the little supported and buggy cssmin (previously ycssmin) to clean-css
|
||||
- support transparent as a color, but not convert between rgba(0, 0, 0, 0) and transparent
|
||||
- remove sys.puts calls to stop deprecation warnings in future node.js releases
|
||||
- Browser: added logLevel option to control logging (2 = everything, 1 = errors only, 0 = no logging)
|
||||
- Browser: added errorReporting option which can be "html" (default) or "console" or a function
|
||||
- Now uses grunt for building and testing
|
||||
- A few bug fixes for media queries, extends, scoping, compression and import once.
|
||||
|
||||
# 1.4.2
|
||||
|
||||
2013-07-20
|
||||
|
||||
- if you don't pass a strict maths option, font size/line height options are output correctly again
|
||||
- npmignore now include .gitattributes
|
||||
- property names may include capital letters
|
||||
- various windows path fixes (capital letters, multiple // in a path)
|
||||
|
||||
# 1.4.1
|
||||
|
||||
2013-07-05
|
||||
|
||||
- fix syncImports and yui-compress option, as they were being ignored
|
||||
- fixed several global variable leaks
|
||||
- handle getting null or undefined passed as the options object
|
||||
|
||||
# 1.4.0
|
||||
|
||||
2013-06-05
|
||||
|
||||
- fix passing of strict maths option
|
||||
|
||||
# 1.4.0 Beta 4
|
||||
|
||||
2013-05-04
|
||||
|
||||
- change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript.
|
||||
- change lessc option for strict units to --strict-units=off
|
||||
|
||||
# 1.4.0 Beta 3
|
||||
|
||||
2013-04-30
|
||||
|
||||
- strictUnits now defaults to false and the true case now gives more useful but less correct results, e.g. 2px/1px = 2px
|
||||
- Process ./ when having relative paths
|
||||
- add isunit function for mixin guards and non basic units
|
||||
- extends recognise attributes
|
||||
- exception errors extend the JavaScript Error
|
||||
- remove es-5-shim as standard from the browser
|
||||
- Fix path issues with windows/linux local paths
|
||||
|
||||
# 1.4.0 Beta 1 & 2
|
||||
|
||||
2013-03-07
|
||||
|
||||
- support for `:extend()` in selectors (e.g. `input:extend(.button) {}`) and `&:extend();` in ruleset (e.g. `input { &:extend(.button all); }`)
|
||||
- maths is now only done inside brackets. This means font: statements, media queries and the calc function can use a simpler format without being escaped. Disable this with --strict-maths-off in lessc and strictMaths:false in JavaScript.
|
||||
- units are calculated, e.g. 200cm+1m = 3m, 3px/1px = 3. If you use units inconsistently you will get an error. Suppress this error with --strict-units-off in lessc or strictUnits:false in JavaScript
|
||||
- `(~"@var")` selector interpolation is removed. Use @{var} in selectors to have variable selectors
|
||||
- default behaviour of import is to import each file once. `@import-once` has been removed.
|
||||
- You can specify options on imports to force it to behave as css or less `@import (less) "file.css"` will process the file as less
|
||||
- variables in mixins no longer 'leak' into their calling scope
|
||||
- added data-uri function which will inline an image into the output css. If ieCompat option is true and file is too large, it will fallback to a url()
|
||||
- significant bug fixes to our debug options
|
||||
- other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
|
||||
- an error is shown if properties are used outside of a ruleset
|
||||
- added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
|
||||
- added luma, hsvhue, hsvsaturation, hsvvalue functions
|
||||
- added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
|
||||
- added convert function, e.g. convert(1rad, deg) => value in degrees
|
||||
- lessc makes output directories if they don't exist
|
||||
- lessc `@import` supports https and 301's
|
||||
- lessc "-depends" option for lessc writes out the list of import files used in makefile format
|
||||
- lessc "-lint" option just reports errors
|
||||
- support for namespaces in attributes and selector interpolation in attributes
|
||||
- other bug fixes
|
||||
|
||||
# 1.3.3
|
||||
|
||||
2012-12-30
|
||||
|
||||
- Fix critical bug with mixin call if using multiple brackets
|
||||
- when using the filter contrast function, the function is passed through if the first argument is not a color
|
||||
|
||||
# 1.3.2
|
||||
|
||||
2012-12-28
|
||||
|
||||
- browser and server url re-writing is now aligned to not re-write (previous lessc behaviour)
|
||||
- url-rewriting can be made to re-write to be relative to the entry file using the relative-urls option (less.relativeUrls option)
|
||||
- rootpath option can be used to add a base path to every url
|
||||
- Support mixin argument seperator of ';' so you can pass comma seperated values. e.g. `.mixin(23px, 12px;);`
|
||||
- Fix lots of problems with named arguments in corner cases, not behaving as expected
|
||||
- hsv, hsva, unit functions
|
||||
- fixed lots more bad error messages
|
||||
- fix `@import-once` to use the full path, not the relative one for determining if an import has been imported already
|
||||
- support `:not(:nth-child(3))`
|
||||
- mixin guards take units into account
|
||||
- support unicode descriptors (`U+00A1-00A9`)
|
||||
- support calling mixins with a stack when using `&` (broken in 1.3.1)
|
||||
- support `@namespace` and namespace combinators
|
||||
- when using % with colour functions, take into account a colour is out of 256
|
||||
- when doing maths with a % do not divide by 100 and keep the unit
|
||||
- allow url to contain % (e.g. %20 for a space)
|
||||
- if a mixin guard stops execution a default mixin is not required
|
||||
- units are output in strings (use the unit function if you need to get the value without unit)
|
||||
- do not infinite recurse when mixins call mixins of the same name
|
||||
- fix issue on important on mixin calls
|
||||
- fix issue with multiple comments being confused
|
||||
- tolerate multiple semi-colons on rules
|
||||
- ignore subsequant `@charset`
|
||||
- syncImport option for node.js to read files syncronously
|
||||
- write the output directory if it is missing
|
||||
- change dependency on cssmin to ycssmin
|
||||
- lessc can load files over http
|
||||
- allow calling less.watch() in non dev mode
|
||||
- don't cache in dev mode
|
||||
- less files cope with query parameters better
|
||||
- sass debug statements are now chrome compatible
|
||||
- modifyVars function added to re-render with different root variables
|
||||
|
||||
# 1.3.1
|
||||
|
||||
2012-10-18
|
||||
|
||||
- Support for comment and @media debugging statements
|
||||
- bug fix for async access in chrome extensions
|
||||
- new functions tint, shade, multiply, screen, overlay, hardlight, difference, exclusion, average, negation, softlight, red, green, blue, contrast
|
||||
- allow escaped characters in attributes
|
||||
- in selectors support @{a} directly, e.g. .a.@{a} { color: black; }
|
||||
- add fraction parameter to round function
|
||||
- much better support for & selector
|
||||
- preserve order of link statements client side
|
||||
- lessc has better help
|
||||
- rhino version fixed
|
||||
- fix bugs in clientside error handling
|
||||
- support dpi, vmin, vm, dppx, dpcm units
|
||||
- Fix ratios in media statements
|
||||
- in mixin guards allow comparing colors and strings
|
||||
- support for -*-keyframes (for -khtml but now supports any)
|
||||
- in mix function, default weight to 50%
|
||||
- support @import-once
|
||||
- remove duplicate rules in output
|
||||
- implement named parameters when calling mixins
|
||||
- many numerous bug fixes
|
||||
|
||||
# 1.3.0
|
||||
|
||||
2012-03-10
|
||||
|
||||
- @media bubbling
|
||||
- Support arbitrary entities as selectors
|
||||
- [Variadic argument support](https://gist.github.com/1933613)
|
||||
- Behaviour of zero-arity mixins has [changed](https://gist.github.com/1933613)
|
||||
- Allow `@import` directives in any selector
|
||||
- Media-query features can now be a variable
|
||||
- Automatic merging of media-query conditions
|
||||
- Fix global variable leaks
|
||||
- Fix error message on wrong-arity call
|
||||
- Fix an `@arguments` behaviour bug
|
||||
- Fix `::` selector output
|
||||
- Fix a bug when using @media with mixins
|
||||
|
||||
|
||||
# 1.2.1
|
||||
|
||||
2012-01-15
|
||||
|
||||
- Fix imports in browser
|
||||
- Improve error reporting in browser
|
||||
- Fix Runtime error reports from imported files
|
||||
- Fix `File not found` import error reporting
|
||||
|
||||
|
||||
# 1.2.0
|
||||
|
||||
2012-01-07
|
||||
|
||||
- Mixin guards
|
||||
- New function `percentage`
|
||||
- New `color` function to parse hex color strings
|
||||
- New type-checking stylesheet functions
|
||||
- Fix Rhino support
|
||||
- Fix bug in string arguments to mixin call
|
||||
- Fix error reporting when index is 0
|
||||
- Fix browser support in WebKit and IE
|
||||
- Fix string interpolation bug when var is empty
|
||||
- Support `!important` after mixin calls
|
||||
- Support vanilla @keyframes directive
|
||||
- Support variables in certain css selectors, like `nth-child`
|
||||
- Support @media and @import features properly
|
||||
- Improve @import support with media features
|
||||
- Improve error reports from imported files
|
||||
- Improve function call error reporting
|
||||
- Improve error-reporting
|
||||
49
mongoui/mongoui-master/node_modules/derby/node_modules/less/CONTRIBUTING.md
generated
vendored
Normal file
49
mongoui/mongoui-master/node_modules/derby/node_modules/less/CONTRIBUTING.md
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# Contributing to Less.js
|
||||
|
||||
> We welcome feature requests and bug reports. Please read these guidelines before submitting one.
|
||||
|
||||
|
||||
<span class="warning">**Words that begin with the at sign (`@`) must be wrapped in backticks!** </span>. As a courtesy to avoid sending notifications to any user that might have the `@username` being referenced, please remember that GitHub usernames also start with the at sign. If you don't wrap them in backticks, users will get unintended notifications from you.
|
||||
|
||||
GitHub has other great markdown features as well, [go here to learn more about them](https://help.github.com/articles/github-flavored-markdown).
|
||||
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Less.js core. Please read the following guidelines before opening any issue.
|
||||
|
||||
1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
|
||||
2. **Create an isolated and reproducible test case.** Be sure the problem exists in Less.js's code with [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
|
||||
3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js.
|
||||
3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases.
|
||||
4. **Share as much information as possible.** Include operating system and version. Describe how you use Less. If you use it in the browser, please include browser and version, and the version of Less.js you're using. Let us know if you're using the command line (`lessc`) or an external tool. And try to include steps to reproduce the bug.
|
||||
|
||||
|
||||
## Feature Requests
|
||||
|
||||
* Please search for existing feature requests first to see if something similar already exists.
|
||||
* Include a clear and specific use-case. We love new ideas, but we do not add language features without a reason.
|
||||
* Consider whether or not your language feature would be better as a function or implemented in a 3rd-party build system such as [assemble-less](http://github.com/assemble/assemble-less).
|
||||
|
||||
|
||||
## Pull Requests
|
||||
|
||||
_Pull requests are encouraged!_
|
||||
|
||||
* Start by adding a feature request to get feedback and see how your idea is received.
|
||||
* If your pull request solves an existing issue, but it's different in some way, _please create a new issue_ and make sure to discuss it with the core contributors. Otherwise you risk your hard work being rejected.
|
||||
* Do not change the **./dist/** folder, we do this when releasing
|
||||
* _Please add tests_ for your work. Use `make test` to see if they pass node.js tests and `make browser-test` to see the browser ([PhantomJS](http://phantomjs.org/)) tests pass.
|
||||
|
||||
|
||||
### Coding Standards
|
||||
|
||||
* Always use spaces, never tabs
|
||||
* End lines in semi-colons.
|
||||
* Loosely aim towards jsHint standards
|
||||
|
||||
|
||||
## Developing
|
||||
If you want to take an issue just add a small comment saying you are having a go at something, so we don't get duplication.
|
||||
|
||||
Learn more about [developing Less.js](https://github.com/less/less.js/wiki/Developing-less.js).
|
||||
273
mongoui/mongoui-master/node_modules/derby/node_modules/less/Gruntfile.js
generated
vendored
Normal file
273
mongoui/mongoui-master/node_modules/derby/node_modules/less/Gruntfile.js
generated
vendored
Normal file
@@ -0,0 +1,273 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
// Report the elapsed execution time of tasks.
|
||||
require('time-grunt')(grunt);
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
|
||||
// Metadata required for build.
|
||||
build: grunt.file.readYAML('build/build.yml'),
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
meta: {
|
||||
license: '<%= _.pluck(pkg.licenses, "type").join(", ") %>',
|
||||
copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>',
|
||||
banner:
|
||||
'/*! \n' +
|
||||
' * LESS - <%= pkg.description %> v<%= pkg.version %> \n' +
|
||||
' * http://lesscss.org \n' +
|
||||
' * \n' +
|
||||
' * <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> \n' +
|
||||
' * Licensed under the <%= meta.license %> License. \n' +
|
||||
' * \n' +
|
||||
' * @licence \n' +
|
||||
' */ \n\n'
|
||||
},
|
||||
|
||||
shell: {
|
||||
options: {stdout: true, failOnError: true},
|
||||
test: {
|
||||
command: 'node test/less-test.js'
|
||||
},
|
||||
benchmark: {
|
||||
command: 'node benchmark/less-benchmark.js'
|
||||
},
|
||||
"browsertest-server": {
|
||||
command: 'node node_modules/http-server/bin/http-server . -p 8088'
|
||||
},
|
||||
"sourcemap-test": {
|
||||
command: [
|
||||
'node bin/lessc --source-map --source-map-inline test/less/import.less test/sourcemaps/import.css',
|
||||
'node bin/lessc --source-map --source-map-inline test/less/sourcemaps/basic.less test/sourcemaps/basic.css',
|
||||
'node node_modules/http-server/bin/http-server test/sourcemaps -p 8084'].join('&&')
|
||||
}
|
||||
},
|
||||
concat: {
|
||||
options: {
|
||||
stripBanners: 'all',
|
||||
banner: '<%= meta.banner %>\n\n(function (window, undefined) {',
|
||||
footer: '\n})(window);'
|
||||
},
|
||||
// Browser versions
|
||||
browsertest: {
|
||||
src: ['<%= build.browser %>'],
|
||||
dest: 'test/browser/less.js'
|
||||
},
|
||||
stable: {
|
||||
src: ['<%= build.browser %>'],
|
||||
dest: 'dist/less-<%= pkg.version %>.js'
|
||||
},
|
||||
// Rhino
|
||||
rhino: {
|
||||
options: {
|
||||
banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
|
||||
footer: '' // override task-level footer
|
||||
},
|
||||
src: ['<%= build.rhino %>'],
|
||||
dest: 'dist/less-rhino-<%= pkg.version %>.js'
|
||||
},
|
||||
// Generate readme
|
||||
readme: {
|
||||
// override task-level banner and footer
|
||||
options: {process: true, banner: '', footer: ''},
|
||||
src: ['build/README.md'],
|
||||
dest: 'README.md'
|
||||
}
|
||||
},
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
banner: '<%= meta.banner %>',
|
||||
mangle: true
|
||||
},
|
||||
stable: {
|
||||
src: ['<%= concat.stable.dest %>'],
|
||||
dest: 'dist/less-<%= pkg.version %>.min.js'
|
||||
}
|
||||
},
|
||||
|
||||
jshint: {
|
||||
options: {jshintrc: '.jshintrc'},
|
||||
files: {
|
||||
src: [
|
||||
'Gruntfile.js',
|
||||
'lib/**/*.js'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
connect: {
|
||||
server: {
|
||||
options: {
|
||||
port: 8081
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jasmine: {
|
||||
options: {
|
||||
// version: '2.0.0-rc2',
|
||||
keepRunner: true,
|
||||
host: 'http://localhost:8081/',
|
||||
vendor: ['test/browser/common.js', 'test/browser/less.js'],
|
||||
template: 'test/browser/test-runner-template.tmpl'
|
||||
},
|
||||
main: {
|
||||
// src is used to build list of less files to compile
|
||||
src: ['test/less/*.less', '!test/less/javascript.less', '!test/less/urls.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-main-options.js',
|
||||
specs: 'test/browser/runner-main-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-main.html'
|
||||
}
|
||||
},
|
||||
legacy: {
|
||||
src: ['test/less/legacy/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-legacy-options.js',
|
||||
specs: 'test/browser/runner-legacy-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-legacy.html'
|
||||
}
|
||||
},
|
||||
errors: {
|
||||
src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less'],
|
||||
options: {
|
||||
timeout: 20000,
|
||||
helpers: 'test/browser/runner-errors-options.js',
|
||||
specs: 'test/browser/runner-errors-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-errors.html'
|
||||
}
|
||||
},
|
||||
noJsErrors: {
|
||||
src: ['test/less/no-js-errors/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-no-js-errors-options.js',
|
||||
specs: 'test/browser/runner-no-js-errors-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-no-js-errors.html'
|
||||
}
|
||||
},
|
||||
browser: {
|
||||
src: ['test/browser/less/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-browser-options.js',
|
||||
specs: 'test/browser/runner-browser-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-browser.html'
|
||||
}
|
||||
},
|
||||
relativeUrls: {
|
||||
src: ['test/browser/less/relative-urls/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-relative-urls-options.js',
|
||||
specs: 'test/browser/runner-relative-urls-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-relative-urls.html'
|
||||
}
|
||||
},
|
||||
rootpath: {
|
||||
src: ['test/browser/less/rootpath/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-rootpath-options.js',
|
||||
specs: 'test/browser/runner-rootpath-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-rootpath.html'
|
||||
}
|
||||
},
|
||||
rootpathRelative: {
|
||||
src: ['test/browser/less/rootpath-relative/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-rootpath-relative-options.js',
|
||||
specs: 'test/browser/runner-rootpath-relative-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-rootpath-relative.html'
|
||||
}
|
||||
},
|
||||
production: {
|
||||
src: ['test/browser/less/production/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-production-options.js',
|
||||
specs: 'test/browser/runner-production-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-production.html'
|
||||
}
|
||||
},
|
||||
modifyVars: {
|
||||
src: ['test/browser/less/modify-vars/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-modify-vars-options.js',
|
||||
specs: 'test/browser/runner-modify-vars-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-modify-vars.html'
|
||||
}
|
||||
},
|
||||
globalVars: {
|
||||
src: ['test/browser/less/global-vars/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-global-vars-options.js',
|
||||
specs: 'test/browser/runner-global-vars-spec.js',
|
||||
outfile: 'tmp/browser/test-runner-global-vars.html'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Clean the version of less built for the tests
|
||||
clean: {
|
||||
test: ['test/browser/less.js', 'tmp'],
|
||||
"sourcemap-test": ['test/sourcemaps/*.css', 'test/sourcemaps/*.map']
|
||||
}
|
||||
});
|
||||
|
||||
// Load these plugins to provide the necessary tasks
|
||||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
|
||||
|
||||
// Actually load this plugin's task(s).
|
||||
grunt.loadTasks('build/tasks');
|
||||
|
||||
// by default, run tests
|
||||
grunt.registerTask('default', [
|
||||
'test'
|
||||
]);
|
||||
|
||||
// Release
|
||||
grunt.registerTask('stable', [
|
||||
'concat:stable',
|
||||
'uglify:stable'
|
||||
]);
|
||||
|
||||
// Run all browser tests
|
||||
grunt.registerTask('browsertest', [
|
||||
'browser',
|
||||
'connect',
|
||||
'jasmine'
|
||||
]);
|
||||
|
||||
// setup a web server to run the browser tests in a browser rather than phantom
|
||||
grunt.registerTask('browsertest-server', [
|
||||
'shell:browsertest-server'
|
||||
]);
|
||||
|
||||
// Create the browser version of less.js
|
||||
grunt.registerTask('browser', [
|
||||
'concat:browsertest'
|
||||
]);
|
||||
|
||||
// Run all tests
|
||||
grunt.registerTask('test', [
|
||||
'clean',
|
||||
'jshint',
|
||||
'shell:test',
|
||||
'browsertest'
|
||||
]);
|
||||
|
||||
// generate a good test environment for testing sourcemaps
|
||||
grunt.registerTask('sourcemap-test', [
|
||||
'clean:sourcemap-test',
|
||||
'shell:sourcemap-test'
|
||||
]);
|
||||
|
||||
// Run benchmark
|
||||
grunt.registerTask('benchmark', [
|
||||
'shell:benchmark'
|
||||
]);
|
||||
|
||||
// Readme.
|
||||
grunt.registerTask('readme', [
|
||||
'concat:readme'
|
||||
]);
|
||||
};
|
||||
179
mongoui/mongoui-master/node_modules/derby/node_modules/less/LICENSE
generated
vendored
Normal file
179
mongoui/mongoui-master/node_modules/derby/node_modules/less/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Copyright (c) 2009-2010 Alexis Sellier
|
||||
335
mongoui/mongoui-master/node_modules/derby/node_modules/less/README.md
generated
vendored
Normal file
335
mongoui/mongoui-master/node_modules/derby/node_modules/less/README.md
generated
vendored
Normal file
@@ -0,0 +1,335 @@
|
||||
# [Less.js v1.5.1](http://lesscss.org)
|
||||
|
||||
> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
|
||||
|
||||
This is the JavaScript, and now official, stable version of LESS.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Options for adding Less.js to your project:
|
||||
|
||||
* Install with [NPM](https://npmjs.org/): `npm install less`
|
||||
* [Download the latest release][download]
|
||||
* Clone the repo: `git clone git://github.com/less/less.js.git`
|
||||
|
||||
|
||||
|
||||
## Feature Highlights
|
||||
LESS extends CSS with dynamic features such as:
|
||||
|
||||
* [nesting](#nesting)
|
||||
* [variables](#variables)
|
||||
* [operations](#operations)
|
||||
* [mixins](#mixins)
|
||||
* [extend](#extend) (selector inheritance)
|
||||
|
||||
To learn about the many other features Less.js has to offer please visit [http://lesscss.org](http://lesscss.org) and [the Less.js wiki][wiki]
|
||||
|
||||
|
||||
### Examples
|
||||
#### nesting
|
||||
Take advantage of nesting to make code more readable and maintainable. This:
|
||||
|
||||
```less
|
||||
.nav > li > a {
|
||||
border: 1px solid #f5f5f5;
|
||||
&:hover {
|
||||
border-color: #ddd;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
.nav > li > a {
|
||||
border: 1px solid #f5f5f5;
|
||||
}
|
||||
.nav > li > a:hover {
|
||||
border-color: #ddd;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### variables
|
||||
Updated commonly used values from a single location.
|
||||
|
||||
```less
|
||||
// Variables ("inline" comments like this can be used)
|
||||
@link-color: #428bca; // appears as "sea blue"
|
||||
|
||||
/* Or "block comments" that span
|
||||
multiple lines, like this */
|
||||
a {
|
||||
color: @link-color; // use the variable in styles
|
||||
}
|
||||
```
|
||||
|
||||
Variables can also be used in `@import` statements, URLs, selector names, and more.
|
||||
|
||||
|
||||
|
||||
#### operations
|
||||
Continuing with the same example above, we can use our variables even easier to maintain with _operations_, which enables the use of addition, subraction, multiplication and division in your styles:
|
||||
|
||||
```less
|
||||
// Variables
|
||||
@link-color: #428bca;
|
||||
@link-color-hover: darken(@link-color, 10%);
|
||||
|
||||
// Styles
|
||||
a {
|
||||
color: @link-color;
|
||||
}
|
||||
a:hover {
|
||||
color: @link-color-hover;
|
||||
}
|
||||
```
|
||||
renders to:
|
||||
|
||||
```css
|
||||
a {
|
||||
color: #428bca;
|
||||
}
|
||||
a:hover {
|
||||
color: #3071a9;
|
||||
}
|
||||
```
|
||||
|
||||
#### mixins
|
||||
##### "implicit" mixins
|
||||
Mixins enable you to apply the styles of one selector inside another selector like this:
|
||||
|
||||
```less
|
||||
// Any "regular" class...
|
||||
.link {
|
||||
color: @link-color;
|
||||
}
|
||||
a {
|
||||
font-weight: bold;
|
||||
.link; // ...can be used as an "implicit" mixin
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
.link {
|
||||
color: #428bca;
|
||||
}
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #428bca;
|
||||
}
|
||||
```
|
||||
|
||||
So any selector can be an "implicit mixin". We'll show you a DRYer way to do this below.
|
||||
|
||||
|
||||
|
||||
##### parametric mixins
|
||||
Mixins can also accept parameters:
|
||||
|
||||
```less
|
||||
// Transition mixin
|
||||
.transition(@transition) {
|
||||
-webkit-transition: @transition;
|
||||
-moz-transition: @transition;
|
||||
-o-transition: @transition;
|
||||
transition: @transition;
|
||||
}
|
||||
```
|
||||
|
||||
used like this:
|
||||
|
||||
```less
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: @link-color;
|
||||
.transition(color .2s ease-in-out);
|
||||
// Hover state
|
||||
&:hover {
|
||||
color: @link-color-hover;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #428bca;
|
||||
-webkit-transition: color 0.2s ease-in-out;
|
||||
-moz-transition: color 0.2s ease-in-out;
|
||||
-o-transition: color 0.2s ease-in-out;
|
||||
transition: color 0.2s ease-in-out;
|
||||
}
|
||||
a:hover {
|
||||
color: #3071a9;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### extend
|
||||
The `extend` feature can be thought of as the _inverse_ of mixins. It accomplishes the goal of "borrowing styles", but rather than copying all the rules of _Selector A_ over to _Selector B_, `extend` copies the name of the _inheriting selector_ (_Selector B_) over to the _extending selector_ (_Selector A_). So continuing with the example used for [mixins](#mixins) above, extend works like this:
|
||||
|
||||
```less
|
||||
.link {
|
||||
color: @link-color;
|
||||
}
|
||||
a:extend(.link) {
|
||||
font-weight: bold;
|
||||
}
|
||||
// Can also be written as
|
||||
a {
|
||||
&:extend(.link);
|
||||
font-weight: bold;
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
.link, a {
|
||||
color: #428bca;
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Compiling and Parsing
|
||||
Invoke the compiler from node:
|
||||
|
||||
```javascript
|
||||
var less = require('less');
|
||||
|
||||
less.render('.class { width: (1 + 1) }', function (e, css) {
|
||||
console.log(css);
|
||||
});
|
||||
```
|
||||
|
||||
Outputs:
|
||||
|
||||
```css
|
||||
.class {
|
||||
width: 2;
|
||||
}
|
||||
```
|
||||
|
||||
You may also manually invoke the parser and compiler:
|
||||
|
||||
```javascript
|
||||
var parser = new(less.Parser);
|
||||
|
||||
parser.parse('.class { width: (1 + 1) }', function (err, tree) {
|
||||
if (err) { return console.error(err) }
|
||||
console.log(tree.toCSS());
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
### Configuration
|
||||
You may also pass options to the compiler:
|
||||
|
||||
```javascript
|
||||
var parser = new(less.Parser)({
|
||||
paths: ['.', './src/less'], // Specify search paths for @import directives
|
||||
filename: 'style.less' // Specify a filename, for better error messages
|
||||
});
|
||||
|
||||
parser.parse('.class { width: (1 + 1) }', function (e, tree) {
|
||||
tree.toCSS({ compress: true }); // Minify CSS output
|
||||
});
|
||||
```
|
||||
|
||||
## More information
|
||||
|
||||
For general information on the language, configuration options or usage visit [lesscss.org](http://lesscss.org) or [the less wiki][wiki].
|
||||
|
||||
Here are other resources for using Less.js:
|
||||
|
||||
* [stackoverflow.com][so] is a great place to get answers about Less.
|
||||
* [node.js tools](https://github.com/less/less.js/wiki/Converting-LESS-to-CSS) for converting Less to CSS
|
||||
* [GUI compilers for Less](https://github.com/less/less.js/wiki/GUI-compilers-that-use-LESS.js)
|
||||
* [Less.js Issues][issues] for reporting bugs
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
Please read [CONTRIBUTING.md](./CONTRIBUTING.md). Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
|
||||
|
||||
### Reporting Issues
|
||||
|
||||
Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/). After that if you find a bug or would like to make feature request, [please open a new issue][issues].
|
||||
|
||||
|
||||
|
||||
### Development
|
||||
|
||||
#### Install Less.js
|
||||
|
||||
Start by either [downloading this project][download] manually, or in the command line:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/less/less.js.git "less"
|
||||
```
|
||||
and then `cd less`.
|
||||
|
||||
|
||||
#### Install dependencies
|
||||
|
||||
To install all the dependencies for less development, run:
|
||||
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
If you haven't run grunt before, install grunt-cli globally so you can just run `grunt`
|
||||
|
||||
```shell
|
||||
npm install grunt-cli -g
|
||||
```
|
||||
|
||||
You should now be able to build Less.js, run tests, benchmarking, and other tasks listed in the Gruntfile.
|
||||
|
||||
## Using Less.js Grunt
|
||||
|
||||
Tests, benchmarking and building is done using Grunt `~0.4.1`. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to install and use Grunt plugins, which are necessary for development with Less.js.
|
||||
|
||||
The Less.js [Gruntfile](Gruntfile.js) is configured with the following "convenience tasks" :
|
||||
|
||||
#### test - `grunt`
|
||||
Runs jshint, nodeunit and headless jasmine tests using [phantomjs](http://code.google.com/p/phantomjs/). You must have phantomjs installed for the jasmine tests to run.
|
||||
|
||||
#### test - `grunt benchmark`
|
||||
Runs the benchmark suite.
|
||||
|
||||
#### build for testing browser - 'grunt browser'
|
||||
This builds less.js and puts it in 'test/browser/less.js'
|
||||
|
||||
#### build - `grunt stable | grunt beta | grunt alpha`
|
||||
Builds Less.js from from the `/lib/less` source files. This is done by the developer releasing a new release, do not do this if you are creating a pull request.
|
||||
|
||||
#### readme - `grunt readme`
|
||||
Build the README file from [a template](build/README.md) to ensure that metadata is up-to-date and (more likely to be) correct.
|
||||
|
||||
Please review the [Gruntfile](Gruntfile.js) to become acquainted with the other available tasks.
|
||||
|
||||
**Please note** that if you have any issues installing dependencies or running any of the Gruntfile commands, please make sure to uninstall any previous versions, both in the local node_modules directory, and clear your global npm cache, and then try running `npm install` again. After that if you still have issues, please let us know about it so we can help.
|
||||
|
||||
|
||||
## Release History
|
||||
See the [changelog](CHANGELOG)
|
||||
|
||||
## [License](LICENSE)
|
||||
|
||||
Copyright (c) 2009-2013 [Alexis Sellier](http://cloudhead.io/) & The Core Less Team
|
||||
Licensed under the [Apache License](LICENSE).
|
||||
|
||||
|
||||
[so]: http://stackoverflow.com/questions/tagged/twitter-bootstrap+less "StackOverflow.com"
|
||||
[issues]: https://github.com/less/less.js/issues "GitHub Issues for Less.js"
|
||||
[wiki]: https://github.com/less/less.js/wiki "The official wiki for Less.js"
|
||||
[download]: https://github.com/less/less.js/zipball/master "Download Less.js"
|
||||
3979
mongoui/mongoui-master/node_modules/derby/node_modules/less/benchmark/benchmark.less
generated
vendored
Normal file
3979
mongoui/mongoui-master/node_modules/derby/node_modules/less/benchmark/benchmark.less
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
46
mongoui/mongoui-master/node_modules/derby/node_modules/less/benchmark/less-benchmark.js
generated
vendored
Normal file
46
mongoui/mongoui-master/node_modules/derby/node_modules/less/benchmark/less-benchmark.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
var path = require('path'),
|
||||
fs = require('fs'),
|
||||
sys = require('util');
|
||||
|
||||
var less = require('../lib/less');
|
||||
var file = path.join(__dirname, 'benchmark.less');
|
||||
|
||||
if (process.argv[2]) { file = path.join(process.cwd(), process.argv[2]) }
|
||||
|
||||
fs.readFile(file, 'utf8', function (e, data) {
|
||||
var tree, css, start, end, total;
|
||||
|
||||
console.log("Benchmarking...\n", path.basename(file) + " (" +
|
||||
parseInt(data.length / 1024) + " KB)", "");
|
||||
|
||||
start = new(Date);
|
||||
|
||||
new(less.Parser)({ optimization: 2 }).parse(data, function (err, tree) {
|
||||
end = new Date();
|
||||
|
||||
total = end - start;
|
||||
|
||||
console.log("Parsing: " +
|
||||
total + " ms (" +
|
||||
Number(1000 / total * data.length / 1024) + " KB\/s)");
|
||||
|
||||
start = new Date();
|
||||
css = tree.toCSS();
|
||||
end = new Date();
|
||||
|
||||
console.log("Generation: " + (end - start) + " ms (" +
|
||||
parseInt(1000 / (end - start) *
|
||||
data.length / 1024) + " KB\/s)");
|
||||
|
||||
total += end - start;
|
||||
|
||||
console.log("Total: " + total + "ms (" +
|
||||
Number(1000 / total * data.length / 1024) + " KB/s)");
|
||||
|
||||
if (err) {
|
||||
less.writeError(err);
|
||||
process.exit(3);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
368
mongoui/mongoui-master/node_modules/derby/node_modules/less/bin/lessc
generated
vendored
Executable file
368
mongoui/mongoui-master/node_modules/derby/node_modules/less/bin/lessc
generated
vendored
Executable file
@@ -0,0 +1,368 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var path = require('path'),
|
||||
fs = require('fs'),
|
||||
sys = require('util'),
|
||||
os = require('os'),
|
||||
mkdirp;
|
||||
|
||||
var less = require('../lib/less');
|
||||
var args = process.argv.slice(1);
|
||||
var options = {
|
||||
depends: false,
|
||||
compress: false,
|
||||
cleancss: false,
|
||||
max_line_len: -1,
|
||||
optimization: 1,
|
||||
silent: false,
|
||||
verbose: false,
|
||||
lint: false,
|
||||
paths: [],
|
||||
color: true,
|
||||
strictImports: false,
|
||||
insecure: false,
|
||||
rootpath: '',
|
||||
relativeUrls: false,
|
||||
ieCompat: true,
|
||||
strictMath: false,
|
||||
strictUnits: false,
|
||||
globalVariables: '',
|
||||
modifyVariables: ''
|
||||
};
|
||||
var continueProcessing = true,
|
||||
currentErrorcode;
|
||||
|
||||
// calling process.exit does not flush stdout always
|
||||
// so use this to set the exit code
|
||||
process.on('exit', function() { process.reallyExit(currentErrorcode) });
|
||||
|
||||
var checkArgFunc = function(arg, option) {
|
||||
if (!option) {
|
||||
console.log(arg + " option requires a parameter");
|
||||
continueProcessing = false;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var checkBooleanArg = function(arg) {
|
||||
var onOff = /^((on|t|true|y|yes)|(off|f|false|n|no))$/i.exec(arg);
|
||||
if (!onOff) {
|
||||
console.log(" unable to parse "+arg+" as a boolean. use one of on/t/true/y/yes/off/f/false/n/no");
|
||||
continueProcessing = false;
|
||||
return false;
|
||||
}
|
||||
return Boolean(onOff[2]);
|
||||
};
|
||||
|
||||
var parseVariableOption = function(option) {
|
||||
var parts = option.split('=', 2);
|
||||
return '@' + parts[0] + ': ' + parts[1] + ';\n';
|
||||
};
|
||||
|
||||
var warningMessages = "";
|
||||
var sourceMapFileInline = false;
|
||||
|
||||
args = args.filter(function (arg) {
|
||||
var match;
|
||||
|
||||
if (match = arg.match(/^-I(.+)$/)) {
|
||||
options.paths.push(match[1]);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (match = arg.match(/^--?([a-z][0-9a-z-]*)(?:=(.*))?$/i)) { arg = match[1] }
|
||||
else { return arg }
|
||||
|
||||
switch (arg) {
|
||||
case 'v':
|
||||
case 'version':
|
||||
console.log("lessc " + less.version.join('.') + " (LESS Compiler) [JavaScript]");
|
||||
continueProcessing = false;
|
||||
case 'verbose':
|
||||
options.verbose = true;
|
||||
break;
|
||||
case 's':
|
||||
case 'silent':
|
||||
options.silent = true;
|
||||
break;
|
||||
case 'l':
|
||||
case 'lint':
|
||||
options.lint = true;
|
||||
break;
|
||||
case 'strict-imports':
|
||||
options.strictImports = true;
|
||||
break;
|
||||
case 'h':
|
||||
case 'help':
|
||||
require('../lib/less/lessc_helper').printUsage();
|
||||
continueProcessing = false;
|
||||
case 'x':
|
||||
case 'compress':
|
||||
options.compress = true;
|
||||
break;
|
||||
case 'insecure':
|
||||
options.insecure = true;
|
||||
break;
|
||||
case 'M':
|
||||
case 'depends':
|
||||
options.depends = true;
|
||||
break;
|
||||
case 'yui-compress':
|
||||
warningMessages += "yui-compress option has been removed. ignoring.";
|
||||
break;
|
||||
case 'clean-css':
|
||||
options.cleancss = true;
|
||||
break;
|
||||
case 'max-line-len':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.maxLineLen = parseInt(match[2], 10);
|
||||
if (options.maxLineLen <= 0) {
|
||||
options.maxLineLen = -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'no-color':
|
||||
options.color = false;
|
||||
break;
|
||||
case 'no-ie-compat':
|
||||
options.ieCompat = false;
|
||||
break;
|
||||
case 'no-js':
|
||||
options.javascriptEnabled = false;
|
||||
break;
|
||||
case 'include-path':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':')
|
||||
.map(function(p) {
|
||||
if (p) {
|
||||
return path.resolve(process.cwd(), p);
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'O0': options.optimization = 0; break;
|
||||
case 'O1': options.optimization = 1; break;
|
||||
case 'O2': options.optimization = 2; break;
|
||||
case 'line-numbers':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.dumpLineNumbers = match[2];
|
||||
}
|
||||
break;
|
||||
case 'source-map':
|
||||
if (!match[2]) {
|
||||
options.sourceMap = true;
|
||||
} else {
|
||||
options.sourceMap = match[2];
|
||||
}
|
||||
break;
|
||||
case 'source-map-rootpath':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.sourceMapRootpath = match[2];
|
||||
}
|
||||
break;
|
||||
case 'source-map-basepath':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.sourceMapBasepath = match[2];
|
||||
}
|
||||
break;
|
||||
case 'source-map-map-inline':
|
||||
sourceMapFileInline = true;
|
||||
options.sourceMap = true;
|
||||
break;
|
||||
case 'source-map-less-inline':
|
||||
options.outputSourceFiles = true;
|
||||
break;
|
||||
case 'source-map-url':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.sourceMapURL = match[2];
|
||||
}
|
||||
break;
|
||||
case 'rp':
|
||||
case 'rootpath':
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.rootpath = match[2].replace(/\\/g, '/');
|
||||
}
|
||||
break;
|
||||
case "ru":
|
||||
case "relative-urls":
|
||||
options.relativeUrls = true;
|
||||
break;
|
||||
case "sm":
|
||||
case "strict-math":
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.strictMath = checkBooleanArg(match[2]);
|
||||
}
|
||||
break;
|
||||
case "su":
|
||||
case "strict-units":
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.strictUnits = checkBooleanArg(match[2]);
|
||||
}
|
||||
break;
|
||||
case "global-var":
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.globalVariables += parseVariableOption(match[2]);
|
||||
}
|
||||
break;
|
||||
case "modify-var":
|
||||
if (checkArgFunc(arg, match[2])) {
|
||||
options.modifyVariables += parseVariableOption(match[2]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
require('../lib/less/lessc_helper').printUsage();
|
||||
continueProcessing = false;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
if (!continueProcessing) {
|
||||
process.reallyExit(1);
|
||||
}
|
||||
|
||||
var input = args[1];
|
||||
var inputbase = args[1];
|
||||
if (input && input != '-') {
|
||||
input = path.resolve(process.cwd(), input);
|
||||
}
|
||||
var output = args[2];
|
||||
var outputbase = args[2];
|
||||
if (output) {
|
||||
options.sourceMapOutputFilename = output;
|
||||
output = path.resolve(process.cwd(), output);
|
||||
if (warningMessages) {
|
||||
console.log(warningMessages);
|
||||
}
|
||||
}
|
||||
|
||||
options.sourceMapBasepath = options.sourceMapBasepath || (input ? path.dirname(input) : process.cwd());
|
||||
|
||||
if (options.sourceMap === true) {
|
||||
if (!output && !sourceMapFileInline) {
|
||||
console.log("the sourcemap option only has an optional filename if the css filename is given");
|
||||
return;
|
||||
}
|
||||
options.sourceMapFullFilename = options.sourceMapOutputFilename + ".map";
|
||||
options.sourceMap = path.basename(options.sourceMapFullFilename);
|
||||
}
|
||||
|
||||
if (options.cleancss && options.sourceMap) {
|
||||
console.log("the sourcemap option is not compatible with sourcemap support at the moment. See Issue #1656");
|
||||
return;
|
||||
}
|
||||
|
||||
if (! input) {
|
||||
console.log("lessc: no input files");
|
||||
console.log("");
|
||||
require('../lib/less/lessc_helper').printUsage();
|
||||
currentErrorcode = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
var ensureDirectory = function (filepath) {
|
||||
var dir = path.dirname(filepath),
|
||||
cmd,
|
||||
existsSync = fs.existsSync || path.existsSync;
|
||||
if (!existsSync(dir)) {
|
||||
if (mkdirp === undefined) {
|
||||
try {mkdirp = require('mkdirp');}
|
||||
catch(e) { mkdirp = null; }
|
||||
}
|
||||
cmd = mkdirp && mkdirp.sync || fs.mkdirSync;
|
||||
cmd(dir);
|
||||
}
|
||||
};
|
||||
|
||||
if (options.depends) {
|
||||
if (!outputbase) {
|
||||
sys.print("option --depends requires an output path to be specified");
|
||||
return;
|
||||
}
|
||||
sys.print(outputbase + ": ");
|
||||
}
|
||||
|
||||
if (!sourceMapFileInline) {
|
||||
var writeSourceMap = function(output) {
|
||||
var filename = options.sourceMapFullFilename || options.sourceMap;
|
||||
ensureDirectory(filename);
|
||||
fs.writeFileSync(filename, output, 'utf8');
|
||||
};
|
||||
}
|
||||
|
||||
var parseLessFile = function (e, data) {
|
||||
if (e) {
|
||||
console.log("lessc: " + e.message);
|
||||
currentErrorcode = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
data = options.globalVariables + data + options.modifyVariables;
|
||||
|
||||
options.paths = [path.dirname(input)].concat(options.paths);
|
||||
options.filename = input;
|
||||
|
||||
var parser = new(less.Parser)(options);
|
||||
parser.parse(data, function (err, tree) {
|
||||
if (err) {
|
||||
less.writeError(err, options);
|
||||
currentErrorcode = 1;
|
||||
return;
|
||||
} else if (options.depends) {
|
||||
for(var file in parser.imports.files) {
|
||||
sys.print(file + " ")
|
||||
}
|
||||
sys.print("\n");
|
||||
} else if(!options.lint) {
|
||||
try {
|
||||
var css = tree.toCSS({
|
||||
silent: options.silent,
|
||||
verbose: options.verbose,
|
||||
ieCompat: options.ieCompat,
|
||||
compress: options.compress,
|
||||
cleancss: options.cleancss,
|
||||
sourceMap: Boolean(options.sourceMap),
|
||||
sourceMapFilename: options.sourceMap,
|
||||
sourceMapURL: options.sourceMapURL,
|
||||
sourceMapOutputFilename: options.sourceMapOutputFilename,
|
||||
sourceMapBasepath: options.sourceMapBasepath,
|
||||
sourceMapRootpath: options.sourceMapRootpath || "",
|
||||
outputSourceFiles: options.outputSourceFiles,
|
||||
writeSourceMap: writeSourceMap,
|
||||
maxLineLen: options.maxLineLen,
|
||||
strictMath: options.strictMath,
|
||||
strictUnits: options.strictUnits
|
||||
});
|
||||
if (output) {
|
||||
ensureDirectory(output);
|
||||
fs.writeFileSync(output, css, 'utf8');
|
||||
if (options.verbose) {
|
||||
console.log('lessc: wrote ' + output);
|
||||
}
|
||||
} else {
|
||||
sys.print(css);
|
||||
}
|
||||
} catch (e) {
|
||||
less.writeError(e, options);
|
||||
currentErrorcode = 2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (input != '-') {
|
||||
fs.readFile(input, 'utf8', parseLessFile);
|
||||
} else {
|
||||
process.stdin.resume();
|
||||
process.stdin.setEncoding('utf8');
|
||||
|
||||
var buffer = '';
|
||||
process.stdin.on('data', function(data) {
|
||||
buffer += data;
|
||||
});
|
||||
|
||||
process.stdin.on('end', function() {
|
||||
parseLessFile(false, buffer);
|
||||
});
|
||||
}
|
||||
18
mongoui/mongoui-master/node_modules/derby/node_modules/less/bower.json
generated
vendored
Normal file
18
mongoui/mongoui-master/node_modules/derby/node_modules/less/bower.json
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "less",
|
||||
"version": "1.5.0",
|
||||
"main": "./dist/less-1.5.0.js",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"benchmark",
|
||||
"bin",
|
||||
"build",
|
||||
"lib",
|
||||
"test",
|
||||
"*.md",
|
||||
"LICENSE",
|
||||
"Gruntfile.js",
|
||||
"package.json",
|
||||
"bower.json"
|
||||
]
|
||||
}
|
||||
335
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/README.md
generated
vendored
Normal file
335
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/README.md
generated
vendored
Normal file
@@ -0,0 +1,335 @@
|
||||
# [Less.js v<%= pkg.version %>](http://lesscss.org)
|
||||
|
||||
> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
|
||||
|
||||
This is the JavaScript, and now official, stable version of LESS.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Options for adding Less.js to your project:
|
||||
|
||||
* Install with [NPM](https://npmjs.org/): `npm install less`
|
||||
* [Download the latest release][download]
|
||||
* Clone the repo: `git clone git://github.com/less/less.js.git`
|
||||
|
||||
|
||||
|
||||
## Feature Highlights
|
||||
LESS extends CSS with dynamic features such as:
|
||||
|
||||
* [nesting](#nesting)
|
||||
* [variables](#variables)
|
||||
* [operations](#operations)
|
||||
* [mixins](#mixins)
|
||||
* [extend](#extend) (selector inheritance)
|
||||
|
||||
To learn about the many other features Less.js has to offer please visit [http://lesscss.org](http://lesscss.org) and [the Less.js wiki][wiki]
|
||||
|
||||
|
||||
### Examples
|
||||
#### nesting
|
||||
Take advantage of nesting to make code more readable and maintainable. This:
|
||||
|
||||
```less
|
||||
.nav > li > a {
|
||||
border: 1px solid #f5f5f5;
|
||||
&:hover {
|
||||
border-color: #ddd;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
.nav > li > a {
|
||||
border: 1px solid #f5f5f5;
|
||||
}
|
||||
.nav > li > a:hover {
|
||||
border-color: #ddd;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### variables
|
||||
Updated commonly used values from a single location.
|
||||
|
||||
```less
|
||||
// Variables ("inline" comments like this can be used)
|
||||
@link-color: #428bca; // appears as "sea blue"
|
||||
|
||||
/* Or "block comments" that span
|
||||
multiple lines, like this */
|
||||
a {
|
||||
color: @link-color; // use the variable in styles
|
||||
}
|
||||
```
|
||||
|
||||
Variables can also be used in `@import` statements, URLs, selector names, and more.
|
||||
|
||||
|
||||
|
||||
#### operations
|
||||
Continuing with the same example above, we can use our variables even easier to maintain with _operations_, which enables the use of addition, subraction, multiplication and division in your styles:
|
||||
|
||||
```less
|
||||
// Variables
|
||||
@link-color: #428bca;
|
||||
@link-color-hover: darken(@link-color, 10%);
|
||||
|
||||
// Styles
|
||||
a {
|
||||
color: @link-color;
|
||||
}
|
||||
a:hover {
|
||||
color: @link-color-hover;
|
||||
}
|
||||
```
|
||||
renders to:
|
||||
|
||||
```css
|
||||
a {
|
||||
color: #428bca;
|
||||
}
|
||||
a:hover {
|
||||
color: #3071a9;
|
||||
}
|
||||
```
|
||||
|
||||
#### mixins
|
||||
##### "implicit" mixins
|
||||
Mixins enable you to apply the styles of one selector inside another selector like this:
|
||||
|
||||
```less
|
||||
// Any "regular" class...
|
||||
.link {
|
||||
color: @link-color;
|
||||
}
|
||||
a {
|
||||
font-weight: bold;
|
||||
.link; // ...can be used as an "implicit" mixin
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
.link {
|
||||
color: #428bca;
|
||||
}
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #428bca;
|
||||
}
|
||||
```
|
||||
|
||||
So any selector can be an "implicit mixin". We'll show you a DRYer way to do this below.
|
||||
|
||||
|
||||
|
||||
##### parametric mixins
|
||||
Mixins can also accept parameters:
|
||||
|
||||
```less
|
||||
// Transition mixin
|
||||
.transition(@transition) {
|
||||
-webkit-transition: @transition;
|
||||
-moz-transition: @transition;
|
||||
-o-transition: @transition;
|
||||
transition: @transition;
|
||||
}
|
||||
```
|
||||
|
||||
used like this:
|
||||
|
||||
```less
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: @link-color;
|
||||
.transition(color .2s ease-in-out);
|
||||
// Hover state
|
||||
&:hover {
|
||||
color: @link-color-hover;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #428bca;
|
||||
-webkit-transition: color 0.2s ease-in-out;
|
||||
-moz-transition: color 0.2s ease-in-out;
|
||||
-o-transition: color 0.2s ease-in-out;
|
||||
transition: color 0.2s ease-in-out;
|
||||
}
|
||||
a:hover {
|
||||
color: #3071a9;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### extend
|
||||
The `extend` feature can be thought of as the _inverse_ of mixins. It accomplishes the goal of "borrowing styles", but rather than copying all the rules of _Selector A_ over to _Selector B_, `extend` copies the name of the _inheriting selector_ (_Selector B_) over to the _extending selector_ (_Selector A_). So continuing with the example used for [mixins](#mixins) above, extend works like this:
|
||||
|
||||
```less
|
||||
.link {
|
||||
color: @link-color;
|
||||
}
|
||||
a:extend(.link) {
|
||||
font-weight: bold;
|
||||
}
|
||||
// Can also be written as
|
||||
a {
|
||||
&:extend(.link);
|
||||
font-weight: bold;
|
||||
}
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
```css
|
||||
.link, a {
|
||||
color: #428bca;
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Compiling and Parsing
|
||||
Invoke the compiler from node:
|
||||
|
||||
```javascript
|
||||
var less = require('less');
|
||||
|
||||
less.render('.class { width: (1 + 1) }', function (e, css) {
|
||||
console.log(css);
|
||||
});
|
||||
```
|
||||
|
||||
Outputs:
|
||||
|
||||
```css
|
||||
.class {
|
||||
width: 2;
|
||||
}
|
||||
```
|
||||
|
||||
You may also manually invoke the parser and compiler:
|
||||
|
||||
```javascript
|
||||
var parser = new(less.Parser);
|
||||
|
||||
parser.parse('.class { width: (1 + 1) }', function (err, tree) {
|
||||
if (err) { return console.error(err) }
|
||||
console.log(tree.toCSS());
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
### Configuration
|
||||
You may also pass options to the compiler:
|
||||
|
||||
```javascript
|
||||
var parser = new(less.Parser)({
|
||||
paths: ['.', './src/less'], // Specify search paths for @import directives
|
||||
filename: 'style.less' // Specify a filename, for better error messages
|
||||
});
|
||||
|
||||
parser.parse('.class { width: (1 + 1) }', function (e, tree) {
|
||||
tree.toCSS({ compress: true }); // Minify CSS output
|
||||
});
|
||||
```
|
||||
|
||||
## More information
|
||||
|
||||
For general information on the language, configuration options or usage visit [lesscss.org](http://lesscss.org) or [the less wiki][wiki].
|
||||
|
||||
Here are other resources for using Less.js:
|
||||
|
||||
* [stackoverflow.com][so] is a great place to get answers about Less.
|
||||
* [node.js tools](https://github.com/less/less.js/wiki/Converting-LESS-to-CSS) for converting Less to CSS
|
||||
* [GUI compilers for Less](https://github.com/less/less.js/wiki/GUI-compilers-that-use-LESS.js)
|
||||
* [Less.js Issues][issues] for reporting bugs
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
Please read [CONTRIBUTING.md](./CONTRIBUTING.md). Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
|
||||
|
||||
### Reporting Issues
|
||||
|
||||
Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/). After that if you find a bug or would like to make feature request, [please open a new issue][issues].
|
||||
|
||||
|
||||
|
||||
### Development
|
||||
|
||||
#### Install Less.js
|
||||
|
||||
Start by either [downloading this project][download] manually, or in the command line:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/less/less.js.git "less"
|
||||
```
|
||||
and then `cd less`.
|
||||
|
||||
|
||||
#### Install dependencies
|
||||
|
||||
To install all the dependencies for less development, run:
|
||||
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
If you haven't run grunt before, install grunt-cli globally so you can just run `grunt`
|
||||
|
||||
```shell
|
||||
npm install grunt-cli -g
|
||||
```
|
||||
|
||||
You should now be able to build Less.js, run tests, benchmarking, and other tasks listed in the Gruntfile.
|
||||
|
||||
## Using Less.js Grunt
|
||||
|
||||
Tests, benchmarking and building is done using Grunt `<%= pkg.devDependencies.grunt %>`. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to install and use Grunt plugins, which are necessary for development with Less.js.
|
||||
|
||||
The Less.js [Gruntfile](Gruntfile.js) is configured with the following "convenience tasks" :
|
||||
|
||||
#### test - `grunt`
|
||||
Runs jshint, nodeunit and headless jasmine tests using [phantomjs](http://code.google.com/p/phantomjs/). You must have phantomjs installed for the jasmine tests to run.
|
||||
|
||||
#### test - `grunt benchmark`
|
||||
Runs the benchmark suite.
|
||||
|
||||
#### build for testing browser - 'grunt browser'
|
||||
This builds less.js and puts it in 'test/browser/less.js'
|
||||
|
||||
#### build - `grunt stable | grunt beta | grunt alpha`
|
||||
Builds Less.js from from the `/lib/less` source files. This is done by the developer releasing a new release, do not do this if you are creating a pull request.
|
||||
|
||||
#### readme - `grunt readme`
|
||||
Build the README file from [a template](build/README.md) to ensure that metadata is up-to-date and (more likely to be) correct.
|
||||
|
||||
Please review the [Gruntfile](Gruntfile.js) to become acquainted with the other available tasks.
|
||||
|
||||
**Please note** that if you have any issues installing dependencies or running any of the Gruntfile commands, please make sure to uninstall any previous versions, both in the local node_modules directory, and clear your global npm cache, and then try running `npm install` again. After that if you still have issues, please let us know about it so we can help.
|
||||
|
||||
|
||||
## Release History
|
||||
See the [changelog](CHANGELOG)
|
||||
|
||||
## [License](LICENSE)
|
||||
|
||||
Copyright (c) 2009-<%= grunt.template.today("yyyy") %> [Alexis Sellier](http://cloudhead.io/) & The Core Less Team
|
||||
Licensed under the [Apache License](LICENSE).
|
||||
|
||||
|
||||
[so]: http://stackoverflow.com/questions/tagged/twitter-bootstrap+less "StackOverflow.com"
|
||||
[issues]: https://github.com/less/less.js/issues "GitHub Issues for Less.js"
|
||||
[wiki]: https://github.com/less/less.js/wiki "The official wiki for Less.js"
|
||||
[download]: https://github.com/less/less.js/zipball/master "Download Less.js"
|
||||
6
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/amd.js
generated
vendored
Normal file
6
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/amd.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// amd.js
|
||||
//
|
||||
// Define Less as an AMD module.
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(function () { return less; } );
|
||||
}
|
||||
4
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/browser-header.js
generated
vendored
Normal file
4
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/browser-header.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
if (typeof(window.less) === 'undefined' || typeof(window.less.nodeType) !== 'undefined') { window.less = {}; }
|
||||
less = window.less;
|
||||
tree = window.less.tree = {};
|
||||
less.mode = 'browser';
|
||||
147
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/build.yml
generated
vendored
Normal file
147
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/build.yml
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
###
|
||||
# NOTICE:
|
||||
# this file is specifically for controlling
|
||||
# paths for Less.js source files, as well as
|
||||
# the order in which source files are
|
||||
# concatenated.
|
||||
#
|
||||
# Please do not add paths for anything else
|
||||
# to this file. All other paths for testing,
|
||||
# benchmarking and so on should be controlled
|
||||
# in the Gruntfile.
|
||||
###
|
||||
|
||||
# Less.js Lib
|
||||
lib: lib/less
|
||||
|
||||
|
||||
# =================================
|
||||
# General
|
||||
# =================================
|
||||
prepend:
|
||||
browser: ['build/require.js', 'build/browser-header.js']
|
||||
rhino: build/require-rhino.js
|
||||
|
||||
append:
|
||||
amd: build/amd.js
|
||||
browser: <%= build.lib %>/browser.js
|
||||
rhino: <%= build.lib %>/rhino.js
|
||||
|
||||
|
||||
# =================================
|
||||
# Core less files
|
||||
# =================================
|
||||
|
||||
# <%= build.less.* %>
|
||||
less:
|
||||
parser : <%= build.lib %>/parser.js
|
||||
functions : <%= build.lib %>/functions.js
|
||||
colors : <%= build.lib %>/colors.js
|
||||
tree : <%= build.lib %>/tree.js
|
||||
treedir : <%= build.lib %>/tree/*.js # glob all files in ./lib/less/tree directory
|
||||
env : <%= build.lib %>/env.js
|
||||
visitor : <%= build.lib %>/visitor.js
|
||||
import_visitor : <%= build.lib %>/import-visitor.js
|
||||
join : <%= build.lib %>/join-selector-visitor.js
|
||||
to_css_visitor : <%= build.lib %>/to-css-visitor.js
|
||||
extend_visitor : <%= build.lib %>/extend-visitor.js
|
||||
browser : <%= build.lib %>/browser.js
|
||||
source_map_output: <%= build.lib %>/source-map-output.js
|
||||
|
||||
|
||||
# =================================
|
||||
# Browser build
|
||||
# =================================
|
||||
|
||||
# <%= build.browser %>
|
||||
browser:
|
||||
|
||||
# prepend utils
|
||||
- <%= build.prepend.browser %>
|
||||
|
||||
# core
|
||||
- <%= build.less.parser %>
|
||||
- <%= build.less.functions %>
|
||||
- <%= build.less.colors %>
|
||||
- <%= build.less.tree %>
|
||||
- <%= build.less.treedir %> # glob all files
|
||||
- <%= build.less.env %>
|
||||
- <%= build.less.visitor %>
|
||||
- <%= build.less.import_visitor %>
|
||||
- <%= build.less.join %>
|
||||
- <%= build.less.to_css_visitor %>
|
||||
- <%= build.less.extend_visitor %>
|
||||
- <%= build.less.source_map_output %>
|
||||
|
||||
# append browser-specific code
|
||||
- <%= build.append.browser %>
|
||||
- <%= build.append.amd %>
|
||||
|
||||
|
||||
# =================================
|
||||
# Rhino build
|
||||
# =================================
|
||||
|
||||
# <%= build.rhino %>
|
||||
rhino:
|
||||
# prepend utils
|
||||
- <%= build.prepend.rhino %>
|
||||
|
||||
# core
|
||||
- <%= build.less.parser %>
|
||||
- <%= build.less.env %>
|
||||
- <%= build.less.visitor %>
|
||||
- <%= build.less.import_visitor %>
|
||||
- <%= build.less.join %>
|
||||
- <%= build.less.to_css_visitor %>
|
||||
- <%= build.less.extend_visitor %>
|
||||
- <%= build.less.functions %>
|
||||
- <%= build.less.colors %>
|
||||
- <%= build.less.tree %>
|
||||
- <%= build.less.treedir %> # glob all files
|
||||
- <%= build.less.source_map_output %>
|
||||
|
||||
# append rhino-specific code
|
||||
- <%= build.append.rhino %>
|
||||
|
||||
|
||||
# =================================
|
||||
# Tree files
|
||||
# =================================
|
||||
|
||||
# <%= build.tree %>
|
||||
# Technically listing the array out this way isn't
|
||||
# necessary since we can glob the files in alphabetical
|
||||
# order anyway. But this gives you control over the order
|
||||
# the files are used, and allows targeting of individual
|
||||
# files directly in the Gruntfile. But be we can just
|
||||
# remove this if files can be concatenated in any order.
|
||||
tree:
|
||||
- <%= build.lib %>/tree/alpha.js
|
||||
- <%= build.lib %>/tree/anonymous.js
|
||||
- <%= build.lib %>/tree/assignment.js
|
||||
- <%= build.lib %>/tree/call.js
|
||||
- <%= build.lib %>/tree/color.js
|
||||
- <%= build.lib %>/tree/comment.js
|
||||
- <%= build.lib %>/tree/condition.js
|
||||
- <%= build.lib %>/tree/dimension.js
|
||||
- <%= build.lib %>/tree/directive.js
|
||||
- <%= build.lib %>/tree/element.js
|
||||
- <%= build.lib %>/tree/expression.js
|
||||
- <%= build.lib %>/tree/extend.js
|
||||
- <%= build.lib %>/tree/import.js
|
||||
- <%= build.lib %>/tree/javascript.js
|
||||
- <%= build.lib %>/tree/keyword.js
|
||||
- <%= build.lib %>/tree/media.js
|
||||
- <%= build.lib %>/tree/mixin.js
|
||||
- <%= build.lib %>/tree/negative.js
|
||||
- <%= build.lib %>/tree/operation.js
|
||||
- <%= build.lib %>/tree/paren.js
|
||||
- <%= build.lib %>/tree/quoted.js
|
||||
- <%= build.lib %>/tree/rule.js
|
||||
- <%= build.lib %>/tree/ruleset.js
|
||||
- <%= build.lib %>/tree/selector.js
|
||||
- <%= build.lib %>/tree/unicode-descriptor.js
|
||||
- <%= build.lib %>/tree/url.js
|
||||
- <%= build.lib %>/tree/value.js
|
||||
- <%= build.lib %>/tree/variable.js
|
||||
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/require-rhino.js
generated
vendored
Normal file
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/require-rhino.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
//
|
||||
// Stub out `require` in rhino
|
||||
//
|
||||
function require(arg) {
|
||||
return less[arg.split('/')[1]];
|
||||
};
|
||||
|
||||
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/require.js
generated
vendored
Normal file
7
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/require.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
//
|
||||
// Stub out `require` in the browser
|
||||
//
|
||||
function require(arg) {
|
||||
return window.less[arg.split('/')[1]];
|
||||
};
|
||||
|
||||
4
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/rhino-header.js
generated
vendored
Normal file
4
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/rhino-header.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
if (typeof(window) === 'undefined') { less = {} }
|
||||
else { less = window.less = {} }
|
||||
tree = less.tree = {};
|
||||
less.mode = 'rhino';
|
||||
1
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/tasks/.gitkeep
generated
vendored
Normal file
1
mongoui/mongoui-master/node_modules/derby/node_modules/less/build/tasks/.gitkeep
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
# Reserved for specialized Less.js tasks.
|
||||
2695
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.0.js
generated
vendored
Normal file
2695
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.0.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.0.min.js
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.0.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2710
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.1.js
generated
vendored
Normal file
2710
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.1.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.1.min.js
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.1.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2712
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.2.js
generated
vendored
Normal file
2712
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.2.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.2.min.js
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.2.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2721
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.3.js
generated
vendored
Normal file
2721
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.3.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.3.min.js
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.3.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2769
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.4.js
generated
vendored
Normal file
2769
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.4.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.4.min.js
generated
vendored
Normal file
16
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.4.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2805
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.5.js
generated
vendored
Normal file
2805
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.5.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.5.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.5.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3004
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.6.js
generated
vendored
Normal file
3004
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.6.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.6.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.1.6.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3293
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.0.js
generated
vendored
Normal file
3293
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.0.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.0.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.0.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3318
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.1.js
generated
vendored
Normal file
3318
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.1.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.1.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.1.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3337
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.2.js
generated
vendored
Normal file
3337
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.2.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.2.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.2.2.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3478
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.0.js
generated
vendored
Normal file
3478
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.0.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.0.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.0.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4011
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.1.js
generated
vendored
Normal file
4011
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.1.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.1.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.1.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4401
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.2.js
generated
vendored
Normal file
4401
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.2.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.2.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.2.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4413
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.3.js
generated
vendored
Normal file
4413
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.3.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.3.min.js
generated
vendored
Normal file
9
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.3.3.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5830
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0-beta.js
generated
vendored
Normal file
5830
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0-beta.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0-beta.min.js
generated
vendored
Normal file
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0-beta.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5830
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0.js
generated
vendored
Normal file
5830
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0.min.js
generated
vendored
Normal file
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.0.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5837
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.1.js
generated
vendored
Normal file
5837
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.1.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.1.min.js
generated
vendored
Normal file
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.1.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5837
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.2.js
generated
vendored
Normal file
5837
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.2.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.2.min.js
generated
vendored
Normal file
11
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.4.2.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6914
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.0.js
generated
vendored
Normal file
6914
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.0.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.0.min.js
generated
vendored
Normal file
13
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.0.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6941
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.1.js
generated
vendored
Normal file
6941
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.1.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.1.min.js
generated
vendored
Normal file
13
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-1.5.1.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2460
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.1.3.js
generated
vendored
Normal file
2460
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.1.3.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2481
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.1.5.js
generated
vendored
Normal file
2481
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.1.5.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3725
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.3.1.js
generated
vendored
Normal file
3725
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.3.1.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3990
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.3.2.js
generated
vendored
Normal file
3990
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.3.2.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4002
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.3.3.js
generated
vendored
Normal file
4002
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.3.3.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4273
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.4.0.js
generated
vendored
Normal file
4273
mongoui/mongoui-master/node_modules/derby/node_modules/less/dist/less-rhino-1.4.0.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
687
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/browser.js
generated
vendored
Normal file
687
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/browser.js
generated
vendored
Normal file
@@ -0,0 +1,687 @@
|
||||
//
|
||||
// browser.js - client-side engine
|
||||
//
|
||||
/*global less, window, document, XMLHttpRequest, location */
|
||||
|
||||
var isFileProtocol = /^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol);
|
||||
|
||||
less.env = less.env || (location.hostname == '127.0.0.1' ||
|
||||
location.hostname == '0.0.0.0' ||
|
||||
location.hostname == 'localhost' ||
|
||||
(location.port &&
|
||||
location.port.length > 0) ||
|
||||
isFileProtocol ? 'development'
|
||||
: 'production');
|
||||
|
||||
var logLevel = {
|
||||
info: 2,
|
||||
errors: 1,
|
||||
none: 0
|
||||
};
|
||||
|
||||
// The amount of logging in the javascript console.
|
||||
// 2 - Information and errors
|
||||
// 1 - Errors
|
||||
// 0 - None
|
||||
// Defaults to 2
|
||||
less.logLevel = typeof(less.logLevel) != 'undefined' ? less.logLevel : logLevel.info;
|
||||
|
||||
// Load styles asynchronously (default: false)
|
||||
//
|
||||
// This is set to `false` by default, so that the body
|
||||
// doesn't start loading before the stylesheets are parsed.
|
||||
// Setting this to `true` can result in flickering.
|
||||
//
|
||||
less.async = less.async || false;
|
||||
less.fileAsync = less.fileAsync || false;
|
||||
|
||||
// Interval between watch polls
|
||||
less.poll = less.poll || (isFileProtocol ? 1000 : 1500);
|
||||
|
||||
//Setup user functions
|
||||
if (less.functions) {
|
||||
for(var func in less.functions) {
|
||||
less.tree.functions[func] = less.functions[func];
|
||||
}
|
||||
}
|
||||
|
||||
var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);
|
||||
if (dumpLineNumbers) {
|
||||
less.dumpLineNumbers = dumpLineNumbers[1];
|
||||
}
|
||||
|
||||
var typePattern = /^text\/(x-)?less$/;
|
||||
var cache = null;
|
||||
var fileCache = {};
|
||||
var varsPre = "";
|
||||
|
||||
function log(str, level) {
|
||||
if (less.env == 'development' && typeof(console) !== 'undefined' && less.logLevel >= level) {
|
||||
console.log('less: ' + str);
|
||||
}
|
||||
}
|
||||
|
||||
function extractId(href) {
|
||||
return href.replace(/^[a-z-]+:\/+?[^\/]+/, '' ) // Remove protocol & domain
|
||||
.replace(/^\//, '' ) // Remove root /
|
||||
.replace(/\.[a-zA-Z]+$/, '' ) // Remove simple extension
|
||||
.replace(/[^\.\w-]+/g, '-') // Replace illegal characters
|
||||
.replace(/\./g, ':'); // Replace dots with colons(for valid id)
|
||||
}
|
||||
|
||||
function errorConsole(e, rootHref) {
|
||||
var template = '{line} {content}';
|
||||
var filename = e.filename || rootHref;
|
||||
var errors = [];
|
||||
var content = (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') +
|
||||
" in " + filename + " ";
|
||||
|
||||
var errorline = function (e, i, classname) {
|
||||
if (e.extract[i] !== undefined) {
|
||||
errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1))
|
||||
.replace(/\{class\}/, classname)
|
||||
.replace(/\{content\}/, e.extract[i]));
|
||||
}
|
||||
};
|
||||
|
||||
if (e.extract) {
|
||||
errorline(e, 0, '');
|
||||
errorline(e, 1, 'line');
|
||||
errorline(e, 2, '');
|
||||
content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':\n' +
|
||||
errors.join('\n');
|
||||
} else if (e.stack) {
|
||||
content += e.stack;
|
||||
}
|
||||
log(content, logLevel.errors);
|
||||
}
|
||||
|
||||
function createCSS(styles, sheet, lastModified) {
|
||||
// Strip the query-string
|
||||
var href = sheet.href || '';
|
||||
|
||||
// If there is no title set, use the filename, minus the extension
|
||||
var id = 'less:' + (sheet.title || extractId(href));
|
||||
|
||||
// If this has already been inserted into the DOM, we may need to replace it
|
||||
var oldCss = document.getElementById(id);
|
||||
var keepOldCss = false;
|
||||
|
||||
// Create a new stylesheet node for insertion or (if necessary) replacement
|
||||
var css = document.createElement('style');
|
||||
css.setAttribute('type', 'text/css');
|
||||
if (sheet.media) {
|
||||
css.setAttribute('media', sheet.media);
|
||||
}
|
||||
css.id = id;
|
||||
|
||||
if (css.styleSheet) { // IE
|
||||
try {
|
||||
css.styleSheet.cssText = styles;
|
||||
} catch (e) {
|
||||
throw new(Error)("Couldn't reassign styleSheet.cssText.");
|
||||
}
|
||||
} else {
|
||||
css.appendChild(document.createTextNode(styles));
|
||||
|
||||
// If new contents match contents of oldCss, don't replace oldCss
|
||||
keepOldCss = (oldCss !== null && oldCss.childNodes.length > 0 && css.childNodes.length > 0 &&
|
||||
oldCss.firstChild.nodeValue === css.firstChild.nodeValue);
|
||||
}
|
||||
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
|
||||
// If there is no oldCss, just append; otherwise, only append if we need
|
||||
// to replace oldCss with an updated stylesheet
|
||||
if (oldCss === null || keepOldCss === false) {
|
||||
var nextEl = sheet && sheet.nextSibling || null;
|
||||
if (nextEl) {
|
||||
nextEl.parentNode.insertBefore(css, nextEl);
|
||||
} else {
|
||||
head.appendChild(css);
|
||||
}
|
||||
}
|
||||
if (oldCss && keepOldCss === false) {
|
||||
oldCss.parentNode.removeChild(oldCss);
|
||||
}
|
||||
|
||||
// Don't update the local store if the file wasn't modified
|
||||
if (lastModified && cache) {
|
||||
log('saving ' + href + ' to cache.', logLevel.info);
|
||||
try {
|
||||
cache.setItem(href, styles);
|
||||
cache.setItem(href + ':timestamp', lastModified);
|
||||
} catch(e) {
|
||||
//TODO - could do with adding more robust error handling
|
||||
log('failed to save', logLevel.errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function errorHTML(e, rootHref) {
|
||||
var id = 'less-error-message:' + extractId(rootHref || "");
|
||||
var template = '<li><label>{line}</label><pre class="{class}">{content}</pre></li>';
|
||||
var elem = document.createElement('div'), timer, content, errors = [];
|
||||
var filename = e.filename || rootHref;
|
||||
var filenameNoPath = filename.match(/([^\/]+(\?.*)?)$/)[1];
|
||||
|
||||
elem.id = id;
|
||||
elem.className = "less-error-message";
|
||||
|
||||
content = '<h3>' + (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') +
|
||||
'</h3>' + '<p>in <a href="' + filename + '">' + filenameNoPath + "</a> ";
|
||||
|
||||
var errorline = function (e, i, classname) {
|
||||
if (e.extract[i] !== undefined) {
|
||||
errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1))
|
||||
.replace(/\{class\}/, classname)
|
||||
.replace(/\{content\}/, e.extract[i]));
|
||||
}
|
||||
};
|
||||
|
||||
if (e.extract) {
|
||||
errorline(e, 0, '');
|
||||
errorline(e, 1, 'line');
|
||||
errorline(e, 2, '');
|
||||
content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':</p>' +
|
||||
'<ul>' + errors.join('') + '</ul>';
|
||||
} else if (e.stack) {
|
||||
content += '<br/>' + e.stack.split('\n').slice(1).join('<br/>');
|
||||
}
|
||||
elem.innerHTML = content;
|
||||
|
||||
// CSS for error messages
|
||||
createCSS([
|
||||
'.less-error-message ul, .less-error-message li {',
|
||||
'list-style-type: none;',
|
||||
'margin-right: 15px;',
|
||||
'padding: 4px 0;',
|
||||
'margin: 0;',
|
||||
'}',
|
||||
'.less-error-message label {',
|
||||
'font-size: 12px;',
|
||||
'margin-right: 15px;',
|
||||
'padding: 4px 0;',
|
||||
'color: #cc7777;',
|
||||
'}',
|
||||
'.less-error-message pre {',
|
||||
'color: #dd6666;',
|
||||
'padding: 4px 0;',
|
||||
'margin: 0;',
|
||||
'display: inline-block;',
|
||||
'}',
|
||||
'.less-error-message pre.line {',
|
||||
'color: #ff0000;',
|
||||
'}',
|
||||
'.less-error-message h3 {',
|
||||
'font-size: 20px;',
|
||||
'font-weight: bold;',
|
||||
'padding: 15px 0 5px 0;',
|
||||
'margin: 0;',
|
||||
'}',
|
||||
'.less-error-message a {',
|
||||
'color: #10a',
|
||||
'}',
|
||||
'.less-error-message .error {',
|
||||
'color: red;',
|
||||
'font-weight: bold;',
|
||||
'padding-bottom: 2px;',
|
||||
'border-bottom: 1px dashed red;',
|
||||
'}'
|
||||
].join('\n'), { title: 'error-message' });
|
||||
|
||||
elem.style.cssText = [
|
||||
"font-family: Arial, sans-serif",
|
||||
"border: 1px solid #e00",
|
||||
"background-color: #eee",
|
||||
"border-radius: 5px",
|
||||
"-webkit-border-radius: 5px",
|
||||
"-moz-border-radius: 5px",
|
||||
"color: #e00",
|
||||
"padding: 15px",
|
||||
"margin-bottom: 15px"
|
||||
].join(';');
|
||||
|
||||
if (less.env == 'development') {
|
||||
timer = setInterval(function () {
|
||||
if (document.body) {
|
||||
if (document.getElementById(id)) {
|
||||
document.body.replaceChild(elem, document.getElementById(id));
|
||||
} else {
|
||||
document.body.insertBefore(elem, document.body.firstChild);
|
||||
}
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
|
||||
function error(e, rootHref) {
|
||||
if (!less.errorReporting || less.errorReporting === "html") {
|
||||
errorHTML(e, rootHref);
|
||||
} else if (less.errorReporting === "console") {
|
||||
errorConsole(e, rootHref);
|
||||
} else if (typeof less.errorReporting === 'function') {
|
||||
less.errorReporting("add", e, rootHref);
|
||||
}
|
||||
}
|
||||
|
||||
function removeErrorHTML(path) {
|
||||
var node = document.getElementById('less-error-message:' + extractId(path));
|
||||
if (node) {
|
||||
node.parentNode.removeChild(node);
|
||||
}
|
||||
}
|
||||
|
||||
function removeErrorConsole(path) {
|
||||
//no action
|
||||
}
|
||||
|
||||
function removeError(path) {
|
||||
if (!less.errorReporting || less.errorReporting === "html") {
|
||||
removeErrorHTML(path);
|
||||
} else if (less.errorReporting === "console") {
|
||||
removeErrorConsole(path);
|
||||
} else if (typeof less.errorReporting === 'function') {
|
||||
less.errorReporting("remove", path);
|
||||
}
|
||||
}
|
||||
|
||||
function loadStyles(newVars) {
|
||||
var styles = document.getElementsByTagName('style'),
|
||||
style;
|
||||
for (var i = 0; i < styles.length; i++) {
|
||||
style = styles[i];
|
||||
if (style.type.match(typePattern)) {
|
||||
var env = new less.tree.parseEnv(less),
|
||||
lessText = style.innerHTML || '';
|
||||
env.filename = document.location.href.replace(/#.*$/, '');
|
||||
|
||||
if (newVars || varsPre) {
|
||||
env.useFileCache = true;
|
||||
|
||||
lessText = varsPre + lessText;
|
||||
|
||||
if (newVars) {
|
||||
lessText += "\n" + newVars;
|
||||
}
|
||||
}
|
||||
|
||||
/*jshint loopfunc:true */
|
||||
// use closure to store current value of i
|
||||
var callback = (function(style) {
|
||||
return function (e, cssAST) {
|
||||
if (e) {
|
||||
return error(e, "inline");
|
||||
}
|
||||
var css = cssAST.toCSS(less);
|
||||
style.type = 'text/css';
|
||||
if (style.styleSheet) {
|
||||
style.styleSheet.cssText = css;
|
||||
} else {
|
||||
style.innerHTML = css;
|
||||
}
|
||||
};
|
||||
})(style);
|
||||
new(less.Parser)(env).parse(lessText, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function extractUrlParts(url, baseUrl) {
|
||||
// urlParts[1] = protocol&hostname || /
|
||||
// urlParts[2] = / if path relative to host base
|
||||
// urlParts[3] = directories
|
||||
// urlParts[4] = filename
|
||||
// urlParts[5] = parameters
|
||||
|
||||
var urlPartsRegex = /^((?:[a-z-]+:)?\/+?(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/i,
|
||||
urlParts = url.match(urlPartsRegex),
|
||||
returner = {}, directories = [], i, baseUrlParts;
|
||||
|
||||
if (!urlParts) {
|
||||
throw new Error("Could not parse sheet href - '"+url+"'");
|
||||
}
|
||||
|
||||
// Stylesheets in IE don't always return the full path
|
||||
if (!urlParts[1] || urlParts[2]) {
|
||||
baseUrlParts = baseUrl.match(urlPartsRegex);
|
||||
if (!baseUrlParts) {
|
||||
throw new Error("Could not parse page url - '"+baseUrl+"'");
|
||||
}
|
||||
urlParts[1] = urlParts[1] || baseUrlParts[1] || "";
|
||||
if (!urlParts[2]) {
|
||||
urlParts[3] = baseUrlParts[3] + urlParts[3];
|
||||
}
|
||||
}
|
||||
|
||||
if (urlParts[3]) {
|
||||
directories = urlParts[3].replace(/\\/g, "/").split("/");
|
||||
|
||||
// extract out . before .. so .. doesn't absorb a non-directory
|
||||
for(i = 0; i < directories.length; i++) {
|
||||
if (directories[i] === ".") {
|
||||
directories.splice(i, 1);
|
||||
i -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 0; i < directories.length; i++) {
|
||||
if (directories[i] === ".." && i > 0) {
|
||||
directories.splice(i-1, 2);
|
||||
i -= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
returner.hostPart = urlParts[1];
|
||||
returner.directories = directories;
|
||||
returner.path = urlParts[1] + directories.join("/");
|
||||
returner.fileUrl = returner.path + (urlParts[4] || "");
|
||||
returner.url = returner.fileUrl + (urlParts[5] || "");
|
||||
return returner;
|
||||
}
|
||||
|
||||
function pathDiff(url, baseUrl) {
|
||||
// diff between two paths to create a relative path
|
||||
|
||||
var urlParts = extractUrlParts(url),
|
||||
baseUrlParts = extractUrlParts(baseUrl),
|
||||
i, max, urlDirectories, baseUrlDirectories, diff = "";
|
||||
if (urlParts.hostPart !== baseUrlParts.hostPart) {
|
||||
return "";
|
||||
}
|
||||
max = Math.max(baseUrlParts.directories.length, urlParts.directories.length);
|
||||
for(i = 0; i < max; i++) {
|
||||
if (baseUrlParts.directories[i] !== urlParts.directories[i]) { break; }
|
||||
}
|
||||
baseUrlDirectories = baseUrlParts.directories.slice(i);
|
||||
urlDirectories = urlParts.directories.slice(i);
|
||||
for(i = 0; i < baseUrlDirectories.length-1; i++) {
|
||||
diff += "../";
|
||||
}
|
||||
for(i = 0; i < urlDirectories.length-1; i++) {
|
||||
diff += urlDirectories[i] + "/";
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
|
||||
function getXMLHttpRequest() {
|
||||
if (window.XMLHttpRequest) {
|
||||
return new XMLHttpRequest();
|
||||
} else {
|
||||
try {
|
||||
/*global ActiveXObject */
|
||||
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
|
||||
} catch (e) {
|
||||
log("browser doesn't support AJAX.", logLevel.errors);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doXHR(url, type, callback, errback) {
|
||||
var xhr = getXMLHttpRequest();
|
||||
var async = isFileProtocol ? less.fileAsync : less.async;
|
||||
|
||||
if (typeof(xhr.overrideMimeType) === 'function') {
|
||||
xhr.overrideMimeType('text/css');
|
||||
}
|
||||
log("XHR: Getting '" + url + "'", logLevel.info);
|
||||
xhr.open('GET', url, async);
|
||||
xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5');
|
||||
xhr.send(null);
|
||||
|
||||
function handleResponse(xhr, callback, errback) {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
callback(xhr.responseText,
|
||||
xhr.getResponseHeader("Last-Modified"));
|
||||
} else if (typeof(errback) === 'function') {
|
||||
errback(xhr.status, url);
|
||||
}
|
||||
}
|
||||
|
||||
if (isFileProtocol && !less.fileAsync) {
|
||||
if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {
|
||||
callback(xhr.responseText);
|
||||
} else {
|
||||
errback(xhr.status, url);
|
||||
}
|
||||
} else if (async) {
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4) {
|
||||
handleResponse(xhr, callback, errback);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
handleResponse(xhr, callback, errback);
|
||||
}
|
||||
}
|
||||
|
||||
function loadFile(originalHref, currentFileInfo, callback, env, newVars) {
|
||||
|
||||
if (currentFileInfo && currentFileInfo.currentDirectory && !/^([a-z-]+:)?\//.test(originalHref)) {
|
||||
originalHref = currentFileInfo.currentDirectory + originalHref;
|
||||
}
|
||||
|
||||
// sheet may be set to the stylesheet for the initial load or a collection of properties including
|
||||
// some env variables for imports
|
||||
var hrefParts = extractUrlParts(originalHref, window.location.href);
|
||||
var href = hrefParts.url;
|
||||
var newFileInfo = {
|
||||
currentDirectory: hrefParts.path,
|
||||
filename: href
|
||||
};
|
||||
|
||||
if (currentFileInfo) {
|
||||
newFileInfo.entryPath = currentFileInfo.entryPath;
|
||||
newFileInfo.rootpath = currentFileInfo.rootpath;
|
||||
newFileInfo.rootFilename = currentFileInfo.rootFilename;
|
||||
newFileInfo.relativeUrls = currentFileInfo.relativeUrls;
|
||||
} else {
|
||||
newFileInfo.entryPath = hrefParts.path;
|
||||
newFileInfo.rootpath = less.rootpath || hrefParts.path;
|
||||
newFileInfo.rootFilename = href;
|
||||
newFileInfo.relativeUrls = env.relativeUrls;
|
||||
}
|
||||
|
||||
if (newFileInfo.relativeUrls) {
|
||||
if (env.rootpath) {
|
||||
newFileInfo.rootpath = extractUrlParts(env.rootpath + pathDiff(hrefParts.path, newFileInfo.entryPath)).path;
|
||||
} else {
|
||||
newFileInfo.rootpath = hrefParts.path;
|
||||
}
|
||||
}
|
||||
|
||||
if (env.useFileCache && fileCache[href]) {
|
||||
try {
|
||||
var lessText = fileCache[href];
|
||||
if (newVars) {
|
||||
lessText += "\n" + newVars;
|
||||
}
|
||||
callback(null, lessText, href, newFileInfo, { lastModified: new Date() });
|
||||
} catch (e) {
|
||||
callback(e, null, href);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
doXHR(href, env.mime, function (data, lastModified) {
|
||||
data = varsPre + data;
|
||||
|
||||
// per file cache
|
||||
fileCache[href] = data;
|
||||
|
||||
// Use remote copy (re-parse)
|
||||
try {
|
||||
callback(null, data, href, newFileInfo, { lastModified: lastModified });
|
||||
} catch (e) {
|
||||
callback(e, null, href);
|
||||
}
|
||||
}, function (status, url) {
|
||||
callback({ type: 'File', message: "'" + url + "' wasn't found (" + status + ")" }, null, href);
|
||||
});
|
||||
}
|
||||
|
||||
function loadStyleSheet(sheet, callback, reload, remaining, newVars) {
|
||||
|
||||
var env = new less.tree.parseEnv(less);
|
||||
env.mime = sheet.type;
|
||||
|
||||
if (newVars || varsPre) {
|
||||
env.useFileCache = true;
|
||||
}
|
||||
|
||||
loadFile(sheet.href, null, function(e, data, path, newFileInfo, webInfo) {
|
||||
|
||||
if (webInfo) {
|
||||
webInfo.remaining = remaining;
|
||||
|
||||
var css = cache && cache.getItem(path),
|
||||
timestamp = cache && cache.getItem(path + ':timestamp');
|
||||
|
||||
if (!reload && timestamp && webInfo.lastModified &&
|
||||
(new(Date)(webInfo.lastModified).valueOf() ===
|
||||
new(Date)(timestamp).valueOf())) {
|
||||
// Use local copy
|
||||
createCSS(css, sheet);
|
||||
webInfo.local = true;
|
||||
callback(null, null, data, sheet, webInfo, path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//TODO add tests around how this behaves when reloading
|
||||
removeError(path);
|
||||
|
||||
if (data) {
|
||||
env.currentFileInfo = newFileInfo;
|
||||
new(less.Parser)(env).parse(data, function (e, root) {
|
||||
if (e) { return callback(e, null, null, sheet); }
|
||||
try {
|
||||
callback(e, root, data, sheet, webInfo, path);
|
||||
} catch (e) {
|
||||
callback(e, null, null, sheet);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback(e, null, null, sheet, webInfo, path);
|
||||
}
|
||||
}, env, newVars);
|
||||
}
|
||||
|
||||
function loadStyleSheets(callback, reload, newVars) {
|
||||
for (var i = 0; i < less.sheets.length; i++) {
|
||||
loadStyleSheet(less.sheets[i], callback, reload, less.sheets.length - (i + 1), newVars);
|
||||
}
|
||||
}
|
||||
|
||||
function initRunningMode(){
|
||||
if (less.env === 'development') {
|
||||
less.optimization = 0;
|
||||
less.watchTimer = setInterval(function () {
|
||||
if (less.watchMode) {
|
||||
loadStyleSheets(function (e, root, _, sheet, env) {
|
||||
if (e) {
|
||||
error(e, sheet.href);
|
||||
} else if (root) {
|
||||
createCSS(root.toCSS(less), sheet, env.lastModified);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, less.poll);
|
||||
} else {
|
||||
less.optimization = 3;
|
||||
}
|
||||
}
|
||||
|
||||
function serializeVars(vars) {
|
||||
var s = "";
|
||||
|
||||
for (var name in vars) {
|
||||
s += ((name.slice(0,1) === '@')? '' : '@') + name +': '+
|
||||
((vars[name].slice(-1) === ';')? vars[name] : vars[name] +';');
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Watch mode
|
||||
//
|
||||
less.watch = function () {
|
||||
if (!less.watchMode ){
|
||||
less.env = 'development';
|
||||
initRunningMode();
|
||||
}
|
||||
return this.watchMode = true;
|
||||
};
|
||||
|
||||
less.unwatch = function () {clearInterval(less.watchTimer); return this.watchMode = false; };
|
||||
|
||||
if (/!watch/.test(location.hash)) {
|
||||
less.watch();
|
||||
}
|
||||
|
||||
if (less.env != 'development') {
|
||||
try {
|
||||
cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
//
|
||||
// Get all <link> tags with the 'rel' attribute set to "stylesheet/less"
|
||||
//
|
||||
var links = document.getElementsByTagName('link');
|
||||
|
||||
less.sheets = [];
|
||||
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
if (links[i].rel === 'stylesheet/less' || (links[i].rel.match(/stylesheet/) &&
|
||||
(links[i].type.match(typePattern)))) {
|
||||
less.sheets.push(links[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// With this function, it's possible to alter variables and re-render
|
||||
// CSS without reloading less-files
|
||||
//
|
||||
less.modifyVars = function(record) {
|
||||
less.refresh(false, serializeVars(record));
|
||||
};
|
||||
|
||||
less.refresh = function (reload, newVars) {
|
||||
var startTime, endTime;
|
||||
startTime = endTime = new Date();
|
||||
|
||||
loadStyleSheets(function (e, root, _, sheet, env) {
|
||||
if (e) {
|
||||
return error(e, sheet.href);
|
||||
}
|
||||
if (env.local) {
|
||||
log("loading " + sheet.href + " from cache.", logLevel.info);
|
||||
} else {
|
||||
log("parsed " + sheet.href + " successfully.", logLevel.info);
|
||||
createCSS(root.toCSS(less), sheet, env.lastModified);
|
||||
}
|
||||
log("css for " + sheet.href + " generated in " + (new Date() - endTime) + 'ms', logLevel.info);
|
||||
if (env.remaining === 0) {
|
||||
log("css generated in " + (new Date() - startTime) + 'ms', logLevel.info);
|
||||
}
|
||||
endTime = new Date();
|
||||
}, reload, newVars);
|
||||
|
||||
loadStyles(newVars);
|
||||
};
|
||||
|
||||
if (less.globalVars) {
|
||||
varsPre = serializeVars(less.globalVars) + "\n";
|
||||
}
|
||||
|
||||
less.refreshStyles = loadStyles;
|
||||
|
||||
less.Parser.fileLoader = loadFile;
|
||||
|
||||
less.refresh(less.env === 'development');
|
||||
151
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/colors.js
generated
vendored
Normal file
151
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/colors.js
generated
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
(function (tree) {
|
||||
tree.colors = {
|
||||
'aliceblue':'#f0f8ff',
|
||||
'antiquewhite':'#faebd7',
|
||||
'aqua':'#00ffff',
|
||||
'aquamarine':'#7fffd4',
|
||||
'azure':'#f0ffff',
|
||||
'beige':'#f5f5dc',
|
||||
'bisque':'#ffe4c4',
|
||||
'black':'#000000',
|
||||
'blanchedalmond':'#ffebcd',
|
||||
'blue':'#0000ff',
|
||||
'blueviolet':'#8a2be2',
|
||||
'brown':'#a52a2a',
|
||||
'burlywood':'#deb887',
|
||||
'cadetblue':'#5f9ea0',
|
||||
'chartreuse':'#7fff00',
|
||||
'chocolate':'#d2691e',
|
||||
'coral':'#ff7f50',
|
||||
'cornflowerblue':'#6495ed',
|
||||
'cornsilk':'#fff8dc',
|
||||
'crimson':'#dc143c',
|
||||
'cyan':'#00ffff',
|
||||
'darkblue':'#00008b',
|
||||
'darkcyan':'#008b8b',
|
||||
'darkgoldenrod':'#b8860b',
|
||||
'darkgray':'#a9a9a9',
|
||||
'darkgrey':'#a9a9a9',
|
||||
'darkgreen':'#006400',
|
||||
'darkkhaki':'#bdb76b',
|
||||
'darkmagenta':'#8b008b',
|
||||
'darkolivegreen':'#556b2f',
|
||||
'darkorange':'#ff8c00',
|
||||
'darkorchid':'#9932cc',
|
||||
'darkred':'#8b0000',
|
||||
'darksalmon':'#e9967a',
|
||||
'darkseagreen':'#8fbc8f',
|
||||
'darkslateblue':'#483d8b',
|
||||
'darkslategray':'#2f4f4f',
|
||||
'darkslategrey':'#2f4f4f',
|
||||
'darkturquoise':'#00ced1',
|
||||
'darkviolet':'#9400d3',
|
||||
'deeppink':'#ff1493',
|
||||
'deepskyblue':'#00bfff',
|
||||
'dimgray':'#696969',
|
||||
'dimgrey':'#696969',
|
||||
'dodgerblue':'#1e90ff',
|
||||
'firebrick':'#b22222',
|
||||
'floralwhite':'#fffaf0',
|
||||
'forestgreen':'#228b22',
|
||||
'fuchsia':'#ff00ff',
|
||||
'gainsboro':'#dcdcdc',
|
||||
'ghostwhite':'#f8f8ff',
|
||||
'gold':'#ffd700',
|
||||
'goldenrod':'#daa520',
|
||||
'gray':'#808080',
|
||||
'grey':'#808080',
|
||||
'green':'#008000',
|
||||
'greenyellow':'#adff2f',
|
||||
'honeydew':'#f0fff0',
|
||||
'hotpink':'#ff69b4',
|
||||
'indianred':'#cd5c5c',
|
||||
'indigo':'#4b0082',
|
||||
'ivory':'#fffff0',
|
||||
'khaki':'#f0e68c',
|
||||
'lavender':'#e6e6fa',
|
||||
'lavenderblush':'#fff0f5',
|
||||
'lawngreen':'#7cfc00',
|
||||
'lemonchiffon':'#fffacd',
|
||||
'lightblue':'#add8e6',
|
||||
'lightcoral':'#f08080',
|
||||
'lightcyan':'#e0ffff',
|
||||
'lightgoldenrodyellow':'#fafad2',
|
||||
'lightgray':'#d3d3d3',
|
||||
'lightgrey':'#d3d3d3',
|
||||
'lightgreen':'#90ee90',
|
||||
'lightpink':'#ffb6c1',
|
||||
'lightsalmon':'#ffa07a',
|
||||
'lightseagreen':'#20b2aa',
|
||||
'lightskyblue':'#87cefa',
|
||||
'lightslategray':'#778899',
|
||||
'lightslategrey':'#778899',
|
||||
'lightsteelblue':'#b0c4de',
|
||||
'lightyellow':'#ffffe0',
|
||||
'lime':'#00ff00',
|
||||
'limegreen':'#32cd32',
|
||||
'linen':'#faf0e6',
|
||||
'magenta':'#ff00ff',
|
||||
'maroon':'#800000',
|
||||
'mediumaquamarine':'#66cdaa',
|
||||
'mediumblue':'#0000cd',
|
||||
'mediumorchid':'#ba55d3',
|
||||
'mediumpurple':'#9370d8',
|
||||
'mediumseagreen':'#3cb371',
|
||||
'mediumslateblue':'#7b68ee',
|
||||
'mediumspringgreen':'#00fa9a',
|
||||
'mediumturquoise':'#48d1cc',
|
||||
'mediumvioletred':'#c71585',
|
||||
'midnightblue':'#191970',
|
||||
'mintcream':'#f5fffa',
|
||||
'mistyrose':'#ffe4e1',
|
||||
'moccasin':'#ffe4b5',
|
||||
'navajowhite':'#ffdead',
|
||||
'navy':'#000080',
|
||||
'oldlace':'#fdf5e6',
|
||||
'olive':'#808000',
|
||||
'olivedrab':'#6b8e23',
|
||||
'orange':'#ffa500',
|
||||
'orangered':'#ff4500',
|
||||
'orchid':'#da70d6',
|
||||
'palegoldenrod':'#eee8aa',
|
||||
'palegreen':'#98fb98',
|
||||
'paleturquoise':'#afeeee',
|
||||
'palevioletred':'#d87093',
|
||||
'papayawhip':'#ffefd5',
|
||||
'peachpuff':'#ffdab9',
|
||||
'peru':'#cd853f',
|
||||
'pink':'#ffc0cb',
|
||||
'plum':'#dda0dd',
|
||||
'powderblue':'#b0e0e6',
|
||||
'purple':'#800080',
|
||||
'red':'#ff0000',
|
||||
'rosybrown':'#bc8f8f',
|
||||
'royalblue':'#4169e1',
|
||||
'saddlebrown':'#8b4513',
|
||||
'salmon':'#fa8072',
|
||||
'sandybrown':'#f4a460',
|
||||
'seagreen':'#2e8b57',
|
||||
'seashell':'#fff5ee',
|
||||
'sienna':'#a0522d',
|
||||
'silver':'#c0c0c0',
|
||||
'skyblue':'#87ceeb',
|
||||
'slateblue':'#6a5acd',
|
||||
'slategray':'#708090',
|
||||
'slategrey':'#708090',
|
||||
'snow':'#fffafa',
|
||||
'springgreen':'#00ff7f',
|
||||
'steelblue':'#4682b4',
|
||||
'tan':'#d2b48c',
|
||||
'teal':'#008080',
|
||||
'thistle':'#d8bfd8',
|
||||
'tomato':'#ff6347',
|
||||
'turquoise':'#40e0d0',
|
||||
'violet':'#ee82ee',
|
||||
'wheat':'#f5deb3',
|
||||
'white':'#ffffff',
|
||||
'whitesmoke':'#f5f5f5',
|
||||
'yellow':'#ffff00',
|
||||
'yellowgreen':'#9acd32'
|
||||
};
|
||||
})(require('./tree'));
|
||||
133
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/env.js
generated
vendored
Normal file
133
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/env.js
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
(function (tree) {
|
||||
|
||||
var parseCopyProperties = [
|
||||
'paths', // option - unmodified - paths to search for imports on
|
||||
'optimization', // option - optimization level (for the chunker)
|
||||
'files', // list of files that have been imported, used for import-once
|
||||
'contents', // browser-only, contents of all the files
|
||||
'relativeUrls', // option - whether to adjust URL's to be relative
|
||||
'rootpath', // option - rootpath to append to URL's
|
||||
'strictImports', // option -
|
||||
'insecure', // option - whether to allow imports from insecure ssl hosts
|
||||
'dumpLineNumbers', // option - whether to dump line numbers
|
||||
'compress', // option - whether to compress
|
||||
'processImports', // option - whether to process imports. if false then imports will not be imported
|
||||
'syncImport', // option - whether to import synchronously
|
||||
'javascriptEnabled',// option - whether JavaScript is enabled. if undefined, defaults to true
|
||||
'mime', // browser only - mime type for sheet import
|
||||
'useFileCache', // browser only - whether to use the per file session cache
|
||||
'currentFileInfo' // information about the current file - for error reporting and importing and making urls relative etc.
|
||||
];
|
||||
|
||||
//currentFileInfo = {
|
||||
// 'relativeUrls' - option - whether to adjust URL's to be relative
|
||||
// 'filename' - full resolved filename of current file
|
||||
// 'rootpath' - path to append to normal URLs for this node
|
||||
// 'currentDirectory' - path to the current file, absolute
|
||||
// 'rootFilename' - filename of the base file
|
||||
// 'entryPath' - absolute path to the entry file
|
||||
// 'reference' - whether the file should not be output and only output parts that are referenced
|
||||
|
||||
tree.parseEnv = function(options) {
|
||||
copyFromOriginal(options, this, parseCopyProperties);
|
||||
|
||||
if (!this.contents) { this.contents = {}; }
|
||||
if (!this.files) { this.files = {}; }
|
||||
|
||||
if (!this.currentFileInfo) {
|
||||
var filename = (options && options.filename) || "input";
|
||||
var entryPath = filename.replace(/[^\/\\]*$/, "");
|
||||
if (options) {
|
||||
options.filename = null;
|
||||
}
|
||||
this.currentFileInfo = {
|
||||
filename: filename,
|
||||
relativeUrls: this.relativeUrls,
|
||||
rootpath: (options && options.rootpath) || "",
|
||||
currentDirectory: entryPath,
|
||||
entryPath: entryPath,
|
||||
rootFilename: filename
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
var evalCopyProperties = [
|
||||
'silent', // whether to swallow errors and warnings
|
||||
'verbose', // whether to log more activity
|
||||
'compress', // whether to compress
|
||||
'yuicompress', // whether to compress with the outside tool yui compressor
|
||||
'ieCompat', // whether to enforce IE compatibility (IE8 data-uri)
|
||||
'strictMath', // whether math has to be within parenthesis
|
||||
'strictUnits', // whether units need to evaluate correctly
|
||||
'cleancss', // whether to compress with clean-css
|
||||
'sourceMap', // whether to output a source map
|
||||
'importMultiple'// whether we are currently importing multiple copies
|
||||
];
|
||||
|
||||
tree.evalEnv = function(options, frames) {
|
||||
copyFromOriginal(options, this, evalCopyProperties);
|
||||
|
||||
this.frames = frames || [];
|
||||
};
|
||||
|
||||
tree.evalEnv.prototype.inParenthesis = function () {
|
||||
if (!this.parensStack) {
|
||||
this.parensStack = [];
|
||||
}
|
||||
this.parensStack.push(true);
|
||||
};
|
||||
|
||||
tree.evalEnv.prototype.outOfParenthesis = function () {
|
||||
this.parensStack.pop();
|
||||
};
|
||||
|
||||
tree.evalEnv.prototype.isMathOn = function () {
|
||||
return this.strictMath ? (this.parensStack && this.parensStack.length) : true;
|
||||
};
|
||||
|
||||
tree.evalEnv.prototype.isPathRelative = function (path) {
|
||||
return !/^(?:[a-z-]+:|\/)/.test(path);
|
||||
};
|
||||
|
||||
tree.evalEnv.prototype.normalizePath = function( path ) {
|
||||
var
|
||||
segments = path.split("/").reverse(),
|
||||
segment;
|
||||
|
||||
path = [];
|
||||
while (segments.length !== 0 ) {
|
||||
segment = segments.pop();
|
||||
switch( segment ) {
|
||||
case ".":
|
||||
break;
|
||||
case "..":
|
||||
if ((path.length === 0) || (path[path.length - 1] === "..")) {
|
||||
path.push( segment );
|
||||
} else {
|
||||
path.pop();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
path.push( segment );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return path.join("/");
|
||||
};
|
||||
|
||||
//todo - do the same for the toCSS env
|
||||
//tree.toCSSEnv = function (options) {
|
||||
//};
|
||||
|
||||
var copyFromOriginal = function(original, destination, propertiesToCopy) {
|
||||
if (!original) { return; }
|
||||
|
||||
for(var i = 0; i < propertiesToCopy.length; i++) {
|
||||
if (original.hasOwnProperty(propertiesToCopy[i])) {
|
||||
destination[propertiesToCopy[i]] = original[propertiesToCopy[i]];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
420
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/extend-visitor.js
generated
vendored
Normal file
420
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/extend-visitor.js
generated
vendored
Normal file
@@ -0,0 +1,420 @@
|
||||
(function (tree) {
|
||||
/*jshint loopfunc:true */
|
||||
|
||||
tree.extendFinderVisitor = function() {
|
||||
this._visitor = new tree.visitor(this);
|
||||
this.contexts = [];
|
||||
this.allExtendsStack = [[]];
|
||||
};
|
||||
|
||||
tree.extendFinderVisitor.prototype = {
|
||||
run: function (root) {
|
||||
root = this._visitor.visit(root);
|
||||
root.allExtends = this.allExtendsStack[0];
|
||||
return root;
|
||||
},
|
||||
visitRule: function (ruleNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
visitMixinDefinition: function (mixinDefinitionNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
visitRuleset: function (rulesetNode, visitArgs) {
|
||||
|
||||
if (rulesetNode.root) {
|
||||
return;
|
||||
}
|
||||
|
||||
var i, j, extend, allSelectorsExtendList = [], extendList;
|
||||
|
||||
// get &:extend(.a); rules which apply to all selectors in this ruleset
|
||||
for(i = 0; i < rulesetNode.rules.length; i++) {
|
||||
if (rulesetNode.rules[i] instanceof tree.Extend) {
|
||||
allSelectorsExtendList.push(rulesetNode.rules[i]);
|
||||
rulesetNode.extendOnEveryPath = true;
|
||||
}
|
||||
}
|
||||
|
||||
// now find every selector and apply the extends that apply to all extends
|
||||
// and the ones which apply to an individual extend
|
||||
for(i = 0; i < rulesetNode.paths.length; i++) {
|
||||
var selectorPath = rulesetNode.paths[i],
|
||||
selector = selectorPath[selectorPath.length-1];
|
||||
extendList = selector.extendList.slice(0).concat(allSelectorsExtendList).map(function(allSelectorsExtend) {
|
||||
return allSelectorsExtend.clone();
|
||||
});
|
||||
for(j = 0; j < extendList.length; j++) {
|
||||
this.foundExtends = true;
|
||||
extend = extendList[j];
|
||||
extend.findSelfSelectors(selectorPath);
|
||||
extend.ruleset = rulesetNode;
|
||||
if (j === 0) { extend.firstExtendOnThisSelectorPath = true; }
|
||||
this.allExtendsStack[this.allExtendsStack.length-1].push(extend);
|
||||
}
|
||||
}
|
||||
|
||||
this.contexts.push(rulesetNode.selectors);
|
||||
},
|
||||
visitRulesetOut: function (rulesetNode) {
|
||||
if (!rulesetNode.root) {
|
||||
this.contexts.length = this.contexts.length - 1;
|
||||
}
|
||||
},
|
||||
visitMedia: function (mediaNode, visitArgs) {
|
||||
mediaNode.allExtends = [];
|
||||
this.allExtendsStack.push(mediaNode.allExtends);
|
||||
},
|
||||
visitMediaOut: function (mediaNode) {
|
||||
this.allExtendsStack.length = this.allExtendsStack.length - 1;
|
||||
},
|
||||
visitDirective: function (directiveNode, visitArgs) {
|
||||
directiveNode.allExtends = [];
|
||||
this.allExtendsStack.push(directiveNode.allExtends);
|
||||
},
|
||||
visitDirectiveOut: function (directiveNode) {
|
||||
this.allExtendsStack.length = this.allExtendsStack.length - 1;
|
||||
}
|
||||
};
|
||||
|
||||
tree.processExtendsVisitor = function() {
|
||||
this._visitor = new tree.visitor(this);
|
||||
};
|
||||
|
||||
tree.processExtendsVisitor.prototype = {
|
||||
run: function(root) {
|
||||
var extendFinder = new tree.extendFinderVisitor();
|
||||
extendFinder.run(root);
|
||||
if (!extendFinder.foundExtends) { return root; }
|
||||
root.allExtends = root.allExtends.concat(this.doExtendChaining(root.allExtends, root.allExtends));
|
||||
this.allExtendsStack = [root.allExtends];
|
||||
return this._visitor.visit(root);
|
||||
},
|
||||
doExtendChaining: function (extendsList, extendsListTarget, iterationCount) {
|
||||
//
|
||||
// chaining is different from normal extension.. if we extend an extend then we are not just copying, altering and pasting
|
||||
// the selector we would do normally, but we are also adding an extend with the same target selector
|
||||
// this means this new extend can then go and alter other extends
|
||||
//
|
||||
// this method deals with all the chaining work - without it, extend is flat and doesn't work on other extend selectors
|
||||
// this is also the most expensive.. and a match on one selector can cause an extension of a selector we had already processed if
|
||||
// we look at each selector at a time, as is done in visitRuleset
|
||||
|
||||
var extendIndex, targetExtendIndex, matches, extendsToAdd = [], newSelector, extendVisitor = this, selectorPath, extend, targetExtend, newExtend;
|
||||
|
||||
iterationCount = iterationCount || 0;
|
||||
|
||||
//loop through comparing every extend with every target extend.
|
||||
// a target extend is the one on the ruleset we are looking at copy/edit/pasting in place
|
||||
// e.g. .a:extend(.b) {} and .b:extend(.c) {} then the first extend extends the second one
|
||||
// and the second is the target.
|
||||
// the seperation into two lists allows us to process a subset of chains with a bigger set, as is the
|
||||
// case when processing media queries
|
||||
for(extendIndex = 0; extendIndex < extendsList.length; extendIndex++){
|
||||
for(targetExtendIndex = 0; targetExtendIndex < extendsListTarget.length; targetExtendIndex++){
|
||||
|
||||
extend = extendsList[extendIndex];
|
||||
targetExtend = extendsListTarget[targetExtendIndex];
|
||||
|
||||
// look for circular references
|
||||
if (this.inInheritanceChain(targetExtend, extend)) { continue; }
|
||||
|
||||
// find a match in the target extends self selector (the bit before :extend)
|
||||
selectorPath = [targetExtend.selfSelectors[0]];
|
||||
matches = extendVisitor.findMatch(extend, selectorPath);
|
||||
|
||||
if (matches.length) {
|
||||
|
||||
// we found a match, so for each self selector..
|
||||
extend.selfSelectors.forEach(function(selfSelector) {
|
||||
|
||||
// process the extend as usual
|
||||
newSelector = extendVisitor.extendSelector(matches, selectorPath, selfSelector);
|
||||
|
||||
// but now we create a new extend from it
|
||||
newExtend = new(tree.Extend)(targetExtend.selector, targetExtend.option, 0);
|
||||
newExtend.selfSelectors = newSelector;
|
||||
|
||||
// add the extend onto the list of extends for that selector
|
||||
newSelector[newSelector.length-1].extendList = [newExtend];
|
||||
|
||||
// record that we need to add it.
|
||||
extendsToAdd.push(newExtend);
|
||||
newExtend.ruleset = targetExtend.ruleset;
|
||||
|
||||
//remember its parents for circular references
|
||||
newExtend.parents = [targetExtend, extend];
|
||||
|
||||
// only process the selector once.. if we have :extend(.a,.b) then multiple
|
||||
// extends will look at the same selector path, so when extending
|
||||
// we know that any others will be duplicates in terms of what is added to the css
|
||||
if (targetExtend.firstExtendOnThisSelectorPath) {
|
||||
newExtend.firstExtendOnThisSelectorPath = true;
|
||||
targetExtend.ruleset.paths.push(newSelector);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (extendsToAdd.length) {
|
||||
// try to detect circular references to stop a stack overflow.
|
||||
// may no longer be needed.
|
||||
this.extendChainCount++;
|
||||
if (iterationCount > 100) {
|
||||
var selectorOne = "{unable to calculate}";
|
||||
var selectorTwo = "{unable to calculate}";
|
||||
try
|
||||
{
|
||||
selectorOne = extendsToAdd[0].selfSelectors[0].toCSS();
|
||||
selectorTwo = extendsToAdd[0].selector.toCSS();
|
||||
}
|
||||
catch(e) {}
|
||||
throw {message: "extend circular reference detected. One of the circular extends is currently:"+selectorOne+":extend(" + selectorTwo+")"};
|
||||
}
|
||||
|
||||
// now process the new extends on the existing rules so that we can handle a extending b extending c ectending d extending e...
|
||||
return extendsToAdd.concat(extendVisitor.doExtendChaining(extendsToAdd, extendsListTarget, iterationCount+1));
|
||||
} else {
|
||||
return extendsToAdd;
|
||||
}
|
||||
},
|
||||
inInheritanceChain: function (possibleParent, possibleChild) {
|
||||
if (possibleParent === possibleChild) {
|
||||
return true;
|
||||
}
|
||||
if (possibleChild.parents) {
|
||||
if (this.inInheritanceChain(possibleParent, possibleChild.parents[0])) {
|
||||
return true;
|
||||
}
|
||||
if (this.inInheritanceChain(possibleParent, possibleChild.parents[1])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
visitRule: function (ruleNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
visitMixinDefinition: function (mixinDefinitionNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
visitSelector: function (selectorNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
visitRuleset: function (rulesetNode, visitArgs) {
|
||||
if (rulesetNode.root) {
|
||||
return;
|
||||
}
|
||||
var matches, pathIndex, extendIndex, allExtends = this.allExtendsStack[this.allExtendsStack.length-1], selectorsToAdd = [], extendVisitor = this, selectorPath;
|
||||
|
||||
// look at each selector path in the ruleset, find any extend matches and then copy, find and replace
|
||||
|
||||
for(extendIndex = 0; extendIndex < allExtends.length; extendIndex++) {
|
||||
for(pathIndex = 0; pathIndex < rulesetNode.paths.length; pathIndex++) {
|
||||
|
||||
selectorPath = rulesetNode.paths[pathIndex];
|
||||
|
||||
// extending extends happens initially, before the main pass
|
||||
if (rulesetNode.extendOnEveryPath || selectorPath[selectorPath.length-1].extendList.length) { continue; }
|
||||
|
||||
matches = this.findMatch(allExtends[extendIndex], selectorPath);
|
||||
|
||||
if (matches.length) {
|
||||
|
||||
allExtends[extendIndex].selfSelectors.forEach(function(selfSelector) {
|
||||
selectorsToAdd.push(extendVisitor.extendSelector(matches, selectorPath, selfSelector));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
rulesetNode.paths = rulesetNode.paths.concat(selectorsToAdd);
|
||||
},
|
||||
findMatch: function (extend, haystackSelectorPath) {
|
||||
//
|
||||
// look through the haystack selector path to try and find the needle - extend.selector
|
||||
// returns an array of selector matches that can then be replaced
|
||||
//
|
||||
var haystackSelectorIndex, hackstackSelector, hackstackElementIndex, haystackElement,
|
||||
targetCombinator, i,
|
||||
extendVisitor = this,
|
||||
needleElements = extend.selector.elements,
|
||||
potentialMatches = [], potentialMatch, matches = [];
|
||||
|
||||
// loop through the haystack elements
|
||||
for(haystackSelectorIndex = 0; haystackSelectorIndex < haystackSelectorPath.length; haystackSelectorIndex++) {
|
||||
hackstackSelector = haystackSelectorPath[haystackSelectorIndex];
|
||||
|
||||
for(hackstackElementIndex = 0; hackstackElementIndex < hackstackSelector.elements.length; hackstackElementIndex++) {
|
||||
|
||||
haystackElement = hackstackSelector.elements[hackstackElementIndex];
|
||||
|
||||
// if we allow elements before our match we can add a potential match every time. otherwise only at the first element.
|
||||
if (extend.allowBefore || (haystackSelectorIndex === 0 && hackstackElementIndex === 0)) {
|
||||
potentialMatches.push({pathIndex: haystackSelectorIndex, index: hackstackElementIndex, matched: 0, initialCombinator: haystackElement.combinator});
|
||||
}
|
||||
|
||||
for(i = 0; i < potentialMatches.length; i++) {
|
||||
potentialMatch = potentialMatches[i];
|
||||
|
||||
// selectors add " " onto the first element. When we use & it joins the selectors together, but if we don't
|
||||
// then each selector in haystackSelectorPath has a space before it added in the toCSS phase. so we need to work out
|
||||
// what the resulting combinator will be
|
||||
targetCombinator = haystackElement.combinator.value;
|
||||
if (targetCombinator === '' && hackstackElementIndex === 0) {
|
||||
targetCombinator = ' ';
|
||||
}
|
||||
|
||||
// if we don't match, null our match to indicate failure
|
||||
if (!extendVisitor.isElementValuesEqual(needleElements[potentialMatch.matched].value, haystackElement.value) ||
|
||||
(potentialMatch.matched > 0 && needleElements[potentialMatch.matched].combinator.value !== targetCombinator)) {
|
||||
potentialMatch = null;
|
||||
} else {
|
||||
potentialMatch.matched++;
|
||||
}
|
||||
|
||||
// if we are still valid and have finished, test whether we have elements after and whether these are allowed
|
||||
if (potentialMatch) {
|
||||
potentialMatch.finished = potentialMatch.matched === needleElements.length;
|
||||
if (potentialMatch.finished &&
|
||||
(!extend.allowAfter && (hackstackElementIndex+1 < hackstackSelector.elements.length || haystackSelectorIndex+1 < haystackSelectorPath.length))) {
|
||||
potentialMatch = null;
|
||||
}
|
||||
}
|
||||
// if null we remove, if not, we are still valid, so either push as a valid match or continue
|
||||
if (potentialMatch) {
|
||||
if (potentialMatch.finished) {
|
||||
potentialMatch.length = needleElements.length;
|
||||
potentialMatch.endPathIndex = haystackSelectorIndex;
|
||||
potentialMatch.endPathElementIndex = hackstackElementIndex + 1; // index after end of match
|
||||
potentialMatches.length = 0; // we don't allow matches to overlap, so start matching again
|
||||
matches.push(potentialMatch);
|
||||
}
|
||||
} else {
|
||||
potentialMatches.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return matches;
|
||||
},
|
||||
isElementValuesEqual: function(elementValue1, elementValue2) {
|
||||
if (typeof elementValue1 === "string" || typeof elementValue2 === "string") {
|
||||
return elementValue1 === elementValue2;
|
||||
}
|
||||
if (elementValue1 instanceof tree.Attribute) {
|
||||
if (elementValue1.op !== elementValue2.op || elementValue1.key !== elementValue2.key) {
|
||||
return false;
|
||||
}
|
||||
if (!elementValue1.value || !elementValue2.value) {
|
||||
if (elementValue1.value || elementValue2.value) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
elementValue1 = elementValue1.value.value || elementValue1.value;
|
||||
elementValue2 = elementValue2.value.value || elementValue2.value;
|
||||
return elementValue1 === elementValue2;
|
||||
}
|
||||
elementValue1 = elementValue1.value;
|
||||
elementValue2 = elementValue2.value;
|
||||
if (elementValue1 instanceof tree.Selector) {
|
||||
if (!(elementValue2 instanceof tree.Selector) || elementValue1.elements.length !== elementValue2.elements.length) {
|
||||
return false;
|
||||
}
|
||||
for(var i = 0; i <elementValue1.elements.length; i++) {
|
||||
if (elementValue1.elements[i].combinator.value !== elementValue2.elements[i].combinator.value) {
|
||||
if (i !== 0 || (elementValue1.elements[i].combinator.value || ' ') !== (elementValue2.elements[i].combinator.value || ' ')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!this.isElementValuesEqual(elementValue1.elements[i].value, elementValue2.elements[i].value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
extendSelector:function (matches, selectorPath, replacementSelector) {
|
||||
|
||||
//for a set of matches, replace each match with the replacement selector
|
||||
|
||||
var currentSelectorPathIndex = 0,
|
||||
currentSelectorPathElementIndex = 0,
|
||||
path = [],
|
||||
matchIndex,
|
||||
selector,
|
||||
firstElement,
|
||||
match,
|
||||
newElements;
|
||||
|
||||
for (matchIndex = 0; matchIndex < matches.length; matchIndex++) {
|
||||
match = matches[matchIndex];
|
||||
selector = selectorPath[match.pathIndex];
|
||||
firstElement = new tree.Element(
|
||||
match.initialCombinator,
|
||||
replacementSelector.elements[0].value,
|
||||
replacementSelector.elements[0].index,
|
||||
replacementSelector.elements[0].currentFileInfo
|
||||
);
|
||||
|
||||
if (match.pathIndex > currentSelectorPathIndex && currentSelectorPathElementIndex > 0) {
|
||||
path[path.length - 1].elements = path[path.length - 1].elements.concat(selectorPath[currentSelectorPathIndex].elements.slice(currentSelectorPathElementIndex));
|
||||
currentSelectorPathElementIndex = 0;
|
||||
currentSelectorPathIndex++;
|
||||
}
|
||||
|
||||
newElements = selector.elements
|
||||
.slice(currentSelectorPathElementIndex, match.index)
|
||||
.concat([firstElement])
|
||||
.concat(replacementSelector.elements.slice(1));
|
||||
|
||||
if (currentSelectorPathIndex === match.pathIndex && matchIndex > 0) {
|
||||
path[path.length - 1].elements =
|
||||
path[path.length - 1].elements.concat(newElements);
|
||||
} else {
|
||||
path = path.concat(selectorPath.slice(currentSelectorPathIndex, match.pathIndex));
|
||||
|
||||
path.push(new tree.Selector(
|
||||
newElements
|
||||
));
|
||||
}
|
||||
currentSelectorPathIndex = match.endPathIndex;
|
||||
currentSelectorPathElementIndex = match.endPathElementIndex;
|
||||
if (currentSelectorPathElementIndex >= selectorPath[currentSelectorPathIndex].elements.length) {
|
||||
currentSelectorPathElementIndex = 0;
|
||||
currentSelectorPathIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentSelectorPathIndex < selectorPath.length && currentSelectorPathElementIndex > 0) {
|
||||
path[path.length - 1].elements = path[path.length - 1].elements.concat(selectorPath[currentSelectorPathIndex].elements.slice(currentSelectorPathElementIndex));
|
||||
currentSelectorPathIndex++;
|
||||
}
|
||||
|
||||
path = path.concat(selectorPath.slice(currentSelectorPathIndex, selectorPath.length));
|
||||
|
||||
return path;
|
||||
},
|
||||
visitRulesetOut: function (rulesetNode) {
|
||||
},
|
||||
visitMedia: function (mediaNode, visitArgs) {
|
||||
var newAllExtends = mediaNode.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);
|
||||
newAllExtends = newAllExtends.concat(this.doExtendChaining(newAllExtends, mediaNode.allExtends));
|
||||
this.allExtendsStack.push(newAllExtends);
|
||||
},
|
||||
visitMediaOut: function (mediaNode) {
|
||||
this.allExtendsStack.length = this.allExtendsStack.length - 1;
|
||||
},
|
||||
visitDirective: function (directiveNode, visitArgs) {
|
||||
var newAllExtends = directiveNode.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);
|
||||
newAllExtends = newAllExtends.concat(this.doExtendChaining(newAllExtends, directiveNode.allExtends));
|
||||
this.allExtendsStack.push(newAllExtends);
|
||||
},
|
||||
visitDirectiveOut: function (directiveNode) {
|
||||
this.allExtendsStack.length = this.allExtendsStack.length - 1;
|
||||
}
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
676
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/functions.js
generated
vendored
Normal file
676
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/functions.js
generated
vendored
Normal file
@@ -0,0 +1,676 @@
|
||||
(function (tree) {
|
||||
|
||||
tree.functions = {
|
||||
rgb: function (r, g, b) {
|
||||
return this.rgba(r, g, b, 1.0);
|
||||
},
|
||||
rgba: function (r, g, b, a) {
|
||||
var rgb = [r, g, b].map(function (c) { return scaled(c, 256); });
|
||||
a = number(a);
|
||||
return new(tree.Color)(rgb, a);
|
||||
},
|
||||
hsl: function (h, s, l) {
|
||||
return this.hsla(h, s, l, 1.0);
|
||||
},
|
||||
hsla: function (h, s, l, a) {
|
||||
function hue(h) {
|
||||
h = h < 0 ? h + 1 : (h > 1 ? h - 1 : h);
|
||||
if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; }
|
||||
else if (h * 2 < 1) { return m2; }
|
||||
else if (h * 3 < 2) { return m1 + (m2 - m1) * (2/3 - h) * 6; }
|
||||
else { return m1; }
|
||||
}
|
||||
|
||||
h = (number(h) % 360) / 360;
|
||||
s = clamp(number(s)); l = clamp(number(l)); a = clamp(number(a));
|
||||
|
||||
var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
|
||||
var m1 = l * 2 - m2;
|
||||
|
||||
return this.rgba(hue(h + 1/3) * 255,
|
||||
hue(h) * 255,
|
||||
hue(h - 1/3) * 255,
|
||||
a);
|
||||
},
|
||||
|
||||
hsv: function(h, s, v) {
|
||||
return this.hsva(h, s, v, 1.0);
|
||||
},
|
||||
|
||||
hsva: function(h, s, v, a) {
|
||||
h = ((number(h) % 360) / 360) * 360;
|
||||
s = number(s); v = number(v); a = number(a);
|
||||
|
||||
var i, f;
|
||||
i = Math.floor((h / 60) % 6);
|
||||
f = (h / 60) - i;
|
||||
|
||||
var vs = [v,
|
||||
v * (1 - s),
|
||||
v * (1 - f * s),
|
||||
v * (1 - (1 - f) * s)];
|
||||
var perm = [[0, 3, 1],
|
||||
[2, 0, 1],
|
||||
[1, 0, 3],
|
||||
[1, 2, 0],
|
||||
[3, 1, 0],
|
||||
[0, 1, 2]];
|
||||
|
||||
return this.rgba(vs[perm[i][0]] * 255,
|
||||
vs[perm[i][1]] * 255,
|
||||
vs[perm[i][2]] * 255,
|
||||
a);
|
||||
},
|
||||
|
||||
hue: function (color) {
|
||||
return new(tree.Dimension)(Math.round(color.toHSL().h));
|
||||
},
|
||||
saturation: function (color) {
|
||||
return new(tree.Dimension)(Math.round(color.toHSL().s * 100), '%');
|
||||
},
|
||||
lightness: function (color) {
|
||||
return new(tree.Dimension)(Math.round(color.toHSL().l * 100), '%');
|
||||
},
|
||||
hsvhue: function(color) {
|
||||
return new(tree.Dimension)(Math.round(color.toHSV().h));
|
||||
},
|
||||
hsvsaturation: function (color) {
|
||||
return new(tree.Dimension)(Math.round(color.toHSV().s * 100), '%');
|
||||
},
|
||||
hsvvalue: function (color) {
|
||||
return new(tree.Dimension)(Math.round(color.toHSV().v * 100), '%');
|
||||
},
|
||||
red: function (color) {
|
||||
return new(tree.Dimension)(color.rgb[0]);
|
||||
},
|
||||
green: function (color) {
|
||||
return new(tree.Dimension)(color.rgb[1]);
|
||||
},
|
||||
blue: function (color) {
|
||||
return new(tree.Dimension)(color.rgb[2]);
|
||||
},
|
||||
alpha: function (color) {
|
||||
return new(tree.Dimension)(color.toHSL().a);
|
||||
},
|
||||
luma: function (color) {
|
||||
return new(tree.Dimension)(Math.round(color.luma() * color.alpha * 100), '%');
|
||||
},
|
||||
saturate: function (color, amount) {
|
||||
// filter: saturate(3.2);
|
||||
// should be kept as is, so check for color
|
||||
if (!color.rgb) {
|
||||
return null;
|
||||
}
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.s += amount.value / 100;
|
||||
hsl.s = clamp(hsl.s);
|
||||
return hsla(hsl);
|
||||
},
|
||||
desaturate: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.s -= amount.value / 100;
|
||||
hsl.s = clamp(hsl.s);
|
||||
return hsla(hsl);
|
||||
},
|
||||
lighten: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.l += amount.value / 100;
|
||||
hsl.l = clamp(hsl.l);
|
||||
return hsla(hsl);
|
||||
},
|
||||
darken: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.l -= amount.value / 100;
|
||||
hsl.l = clamp(hsl.l);
|
||||
return hsla(hsl);
|
||||
},
|
||||
fadein: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.a += amount.value / 100;
|
||||
hsl.a = clamp(hsl.a);
|
||||
return hsla(hsl);
|
||||
},
|
||||
fadeout: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.a -= amount.value / 100;
|
||||
hsl.a = clamp(hsl.a);
|
||||
return hsla(hsl);
|
||||
},
|
||||
fade: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.a = amount.value / 100;
|
||||
hsl.a = clamp(hsl.a);
|
||||
return hsla(hsl);
|
||||
},
|
||||
spin: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
var hue = (hsl.h + amount.value) % 360;
|
||||
|
||||
hsl.h = hue < 0 ? 360 + hue : hue;
|
||||
|
||||
return hsla(hsl);
|
||||
},
|
||||
//
|
||||
// Copyright (c) 2006-2009 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein
|
||||
// http://sass-lang.com
|
||||
//
|
||||
mix: function (color1, color2, weight) {
|
||||
if (!weight) {
|
||||
weight = new(tree.Dimension)(50);
|
||||
}
|
||||
var p = weight.value / 100.0;
|
||||
var w = p * 2 - 1;
|
||||
var a = color1.toHSL().a - color2.toHSL().a;
|
||||
|
||||
var w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
|
||||
var w2 = 1 - w1;
|
||||
|
||||
var rgb = [color1.rgb[0] * w1 + color2.rgb[0] * w2,
|
||||
color1.rgb[1] * w1 + color2.rgb[1] * w2,
|
||||
color1.rgb[2] * w1 + color2.rgb[2] * w2];
|
||||
|
||||
var alpha = color1.alpha * p + color2.alpha * (1 - p);
|
||||
|
||||
return new(tree.Color)(rgb, alpha);
|
||||
},
|
||||
greyscale: function (color) {
|
||||
return this.desaturate(color, new(tree.Dimension)(100));
|
||||
},
|
||||
contrast: function (color, dark, light, threshold) {
|
||||
// filter: contrast(3.2);
|
||||
// should be kept as is, so check for color
|
||||
if (!color.rgb) {
|
||||
return null;
|
||||
}
|
||||
if (typeof light === 'undefined') {
|
||||
light = this.rgba(255, 255, 255, 1.0);
|
||||
}
|
||||
if (typeof dark === 'undefined') {
|
||||
dark = this.rgba(0, 0, 0, 1.0);
|
||||
}
|
||||
//Figure out which is actually light and dark!
|
||||
if (dark.luma() > light.luma()) {
|
||||
var t = light;
|
||||
light = dark;
|
||||
dark = t;
|
||||
}
|
||||
if (typeof threshold === 'undefined') {
|
||||
threshold = 0.43;
|
||||
} else {
|
||||
threshold = number(threshold);
|
||||
}
|
||||
if ((color.luma() * color.alpha) < threshold) {
|
||||
return light;
|
||||
} else {
|
||||
return dark;
|
||||
}
|
||||
},
|
||||
e: function (str) {
|
||||
return new(tree.Anonymous)(str instanceof tree.JavaScript ? str.evaluated : str);
|
||||
},
|
||||
escape: function (str) {
|
||||
return new(tree.Anonymous)(encodeURI(str.value).replace(/=/g, "%3D").replace(/:/g, "%3A").replace(/#/g, "%23").replace(/;/g, "%3B").replace(/\(/g, "%28").replace(/\)/g, "%29"));
|
||||
},
|
||||
'%': function (quoted /* arg, arg, ...*/) {
|
||||
var args = Array.prototype.slice.call(arguments, 1),
|
||||
str = quoted.value;
|
||||
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
/*jshint loopfunc:true */
|
||||
str = str.replace(/%[sda]/i, function(token) {
|
||||
var value = token.match(/s/i) ? args[i].value : args[i].toCSS();
|
||||
return token.match(/[A-Z]$/) ? encodeURIComponent(value) : value;
|
||||
});
|
||||
}
|
||||
str = str.replace(/%%/g, '%');
|
||||
return new(tree.Quoted)('"' + str + '"', str);
|
||||
},
|
||||
unit: function (val, unit) {
|
||||
if(!(val instanceof tree.Dimension)) {
|
||||
throw { type: "Argument", message: "the first argument to unit must be a number" + (val instanceof tree.Operation ? ". Have you forgotten parenthesis?" : "") };
|
||||
}
|
||||
return new(tree.Dimension)(val.value, unit ? unit.toCSS() : "");
|
||||
},
|
||||
convert: function (val, unit) {
|
||||
return val.convertTo(unit.value);
|
||||
},
|
||||
round: function (n, f) {
|
||||
var fraction = typeof(f) === "undefined" ? 0 : f.value;
|
||||
return this._math(function(num) { return num.toFixed(fraction); }, null, n);
|
||||
},
|
||||
pi: function () {
|
||||
return new(tree.Dimension)(Math.PI);
|
||||
},
|
||||
mod: function(a, b) {
|
||||
return new(tree.Dimension)(a.value % b.value, a.unit);
|
||||
},
|
||||
pow: function(x, y) {
|
||||
if (typeof x === "number" && typeof y === "number") {
|
||||
x = new(tree.Dimension)(x);
|
||||
y = new(tree.Dimension)(y);
|
||||
} else if (!(x instanceof tree.Dimension) || !(y instanceof tree.Dimension)) {
|
||||
throw { type: "Argument", message: "arguments must be numbers" };
|
||||
}
|
||||
|
||||
return new(tree.Dimension)(Math.pow(x.value, y.value), x.unit);
|
||||
},
|
||||
_math: function (fn, unit, n) {
|
||||
if (n instanceof tree.Dimension) {
|
||||
/*jshint eqnull:true */
|
||||
return new(tree.Dimension)(fn(parseFloat(n.value)), unit == null ? n.unit : unit);
|
||||
} else if (typeof(n) === 'number') {
|
||||
return fn(n);
|
||||
} else {
|
||||
throw { type: "Argument", message: "argument must be a number" };
|
||||
}
|
||||
},
|
||||
_minmax: function (isMin, args) {
|
||||
args = Array.prototype.slice.call(args);
|
||||
switch(args.length) {
|
||||
case 0: throw { type: "Argument", message: "one or more arguments required" };
|
||||
case 1: return args[0];
|
||||
}
|
||||
var i, j, current, currentUnified, referenceUnified, unit,
|
||||
order = [], // elems only contains original argument values.
|
||||
values = {}; // key is the unit.toString() for unified tree.Dimension values,
|
||||
// value is the index into the order array.
|
||||
for (i = 0; i < args.length; i++) {
|
||||
current = args[i];
|
||||
if (!(current instanceof tree.Dimension)) {
|
||||
order.push(current);
|
||||
continue;
|
||||
}
|
||||
currentUnified = current.unify();
|
||||
unit = currentUnified.unit.toString();
|
||||
j = values[unit];
|
||||
if (j === undefined) {
|
||||
values[unit] = order.length;
|
||||
order.push(current);
|
||||
continue;
|
||||
}
|
||||
referenceUnified = order[j].unify();
|
||||
if ( isMin && currentUnified.value < referenceUnified.value ||
|
||||
!isMin && currentUnified.value > referenceUnified.value) {
|
||||
order[j] = current;
|
||||
}
|
||||
}
|
||||
if (order.length == 1) {
|
||||
return order[0];
|
||||
}
|
||||
args = order.map(function (a) { return a.toCSS(this.env); })
|
||||
.join(this.env.compress ? "," : ", ");
|
||||
return new(tree.Anonymous)((isMin ? "min" : "max") + "(" + args + ")");
|
||||
},
|
||||
min: function () {
|
||||
return this._minmax(true, arguments);
|
||||
},
|
||||
max: function () {
|
||||
return this._minmax(false, arguments);
|
||||
},
|
||||
argb: function (color) {
|
||||
return new(tree.Anonymous)(color.toARGB());
|
||||
|
||||
},
|
||||
percentage: function (n) {
|
||||
return new(tree.Dimension)(n.value * 100, '%');
|
||||
},
|
||||
color: function (n) {
|
||||
if (n instanceof tree.Quoted) {
|
||||
var colorCandidate = n.value,
|
||||
returnColor;
|
||||
returnColor = tree.Color.fromKeyword(colorCandidate);
|
||||
if (returnColor) {
|
||||
return returnColor;
|
||||
}
|
||||
if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/.test(colorCandidate)) {
|
||||
return new(tree.Color)(colorCandidate.slice(1));
|
||||
}
|
||||
throw { type: "Argument", message: "argument must be a color keyword or 3/6 digit hex e.g. #FFF" };
|
||||
} else {
|
||||
throw { type: "Argument", message: "argument must be a string" };
|
||||
}
|
||||
},
|
||||
iscolor: function (n) {
|
||||
return this._isa(n, tree.Color);
|
||||
},
|
||||
isnumber: function (n) {
|
||||
return this._isa(n, tree.Dimension);
|
||||
},
|
||||
isstring: function (n) {
|
||||
return this._isa(n, tree.Quoted);
|
||||
},
|
||||
iskeyword: function (n) {
|
||||
return this._isa(n, tree.Keyword);
|
||||
},
|
||||
isurl: function (n) {
|
||||
return this._isa(n, tree.URL);
|
||||
},
|
||||
ispixel: function (n) {
|
||||
return this.isunit(n, 'px');
|
||||
},
|
||||
ispercentage: function (n) {
|
||||
return this.isunit(n, '%');
|
||||
},
|
||||
isem: function (n) {
|
||||
return this.isunit(n, 'em');
|
||||
},
|
||||
isunit: function (n, unit) {
|
||||
return (n instanceof tree.Dimension) && n.unit.is(unit.value || unit) ? tree.True : tree.False;
|
||||
},
|
||||
_isa: function (n, Type) {
|
||||
return (n instanceof Type) ? tree.True : tree.False;
|
||||
},
|
||||
|
||||
/* Blending modes */
|
||||
|
||||
multiply: function(color1, color2) {
|
||||
var r = color1.rgb[0] * color2.rgb[0] / 255;
|
||||
var g = color1.rgb[1] * color2.rgb[1] / 255;
|
||||
var b = color1.rgb[2] * color2.rgb[2] / 255;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
screen: function(color1, color2) {
|
||||
var r = 255 - (255 - color1.rgb[0]) * (255 - color2.rgb[0]) / 255;
|
||||
var g = 255 - (255 - color1.rgb[1]) * (255 - color2.rgb[1]) / 255;
|
||||
var b = 255 - (255 - color1.rgb[2]) * (255 - color2.rgb[2]) / 255;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
overlay: function(color1, color2) {
|
||||
var r = color1.rgb[0] < 128 ? 2 * color1.rgb[0] * color2.rgb[0] / 255 : 255 - 2 * (255 - color1.rgb[0]) * (255 - color2.rgb[0]) / 255;
|
||||
var g = color1.rgb[1] < 128 ? 2 * color1.rgb[1] * color2.rgb[1] / 255 : 255 - 2 * (255 - color1.rgb[1]) * (255 - color2.rgb[1]) / 255;
|
||||
var b = color1.rgb[2] < 128 ? 2 * color1.rgb[2] * color2.rgb[2] / 255 : 255 - 2 * (255 - color1.rgb[2]) * (255 - color2.rgb[2]) / 255;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
softlight: function(color1, color2) {
|
||||
var t = color2.rgb[0] * color1.rgb[0] / 255;
|
||||
var r = t + color1.rgb[0] * (255 - (255 - color1.rgb[0]) * (255 - color2.rgb[0]) / 255 - t) / 255;
|
||||
t = color2.rgb[1] * color1.rgb[1] / 255;
|
||||
var g = t + color1.rgb[1] * (255 - (255 - color1.rgb[1]) * (255 - color2.rgb[1]) / 255 - t) / 255;
|
||||
t = color2.rgb[2] * color1.rgb[2] / 255;
|
||||
var b = t + color1.rgb[2] * (255 - (255 - color1.rgb[2]) * (255 - color2.rgb[2]) / 255 - t) / 255;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
hardlight: function(color1, color2) {
|
||||
var r = color2.rgb[0] < 128 ? 2 * color2.rgb[0] * color1.rgb[0] / 255 : 255 - 2 * (255 - color2.rgb[0]) * (255 - color1.rgb[0]) / 255;
|
||||
var g = color2.rgb[1] < 128 ? 2 * color2.rgb[1] * color1.rgb[1] / 255 : 255 - 2 * (255 - color2.rgb[1]) * (255 - color1.rgb[1]) / 255;
|
||||
var b = color2.rgb[2] < 128 ? 2 * color2.rgb[2] * color1.rgb[2] / 255 : 255 - 2 * (255 - color2.rgb[2]) * (255 - color1.rgb[2]) / 255;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
difference: function(color1, color2) {
|
||||
var r = Math.abs(color1.rgb[0] - color2.rgb[0]);
|
||||
var g = Math.abs(color1.rgb[1] - color2.rgb[1]);
|
||||
var b = Math.abs(color1.rgb[2] - color2.rgb[2]);
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
exclusion: function(color1, color2) {
|
||||
var r = color1.rgb[0] + color2.rgb[0] * (255 - color1.rgb[0] - color1.rgb[0]) / 255;
|
||||
var g = color1.rgb[1] + color2.rgb[1] * (255 - color1.rgb[1] - color1.rgb[1]) / 255;
|
||||
var b = color1.rgb[2] + color2.rgb[2] * (255 - color1.rgb[2] - color1.rgb[2]) / 255;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
average: function(color1, color2) {
|
||||
var r = (color1.rgb[0] + color2.rgb[0]) / 2;
|
||||
var g = (color1.rgb[1] + color2.rgb[1]) / 2;
|
||||
var b = (color1.rgb[2] + color2.rgb[2]) / 2;
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
negation: function(color1, color2) {
|
||||
var r = 255 - Math.abs(255 - color2.rgb[0] - color1.rgb[0]);
|
||||
var g = 255 - Math.abs(255 - color2.rgb[1] - color1.rgb[1]);
|
||||
var b = 255 - Math.abs(255 - color2.rgb[2] - color1.rgb[2]);
|
||||
return this.rgb(r, g, b);
|
||||
},
|
||||
tint: function(color, amount) {
|
||||
return this.mix(this.rgb(255,255,255), color, amount);
|
||||
},
|
||||
shade: function(color, amount) {
|
||||
return this.mix(this.rgb(0, 0, 0), color, amount);
|
||||
},
|
||||
extract: function(values, index) {
|
||||
index = index.value - 1; // (1-based index)
|
||||
// handle non-array values as an array of length 1
|
||||
// return 'undefined' if index is invalid
|
||||
return Array.isArray(values.value)
|
||||
? values.value[index] : Array(values)[index];
|
||||
},
|
||||
length: function(values) {
|
||||
var n = Array.isArray(values.value) ? values.value.length : 1;
|
||||
return new tree.Dimension(n);
|
||||
},
|
||||
|
||||
"data-uri": function(mimetypeNode, filePathNode) {
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
return new tree.URL(filePathNode || mimetypeNode, this.currentFileInfo).eval(this.env);
|
||||
}
|
||||
|
||||
var mimetype = mimetypeNode.value;
|
||||
var filePath = (filePathNode && filePathNode.value);
|
||||
|
||||
var fs = require("fs"),
|
||||
path = require("path"),
|
||||
useBase64 = false;
|
||||
|
||||
if (arguments.length < 2) {
|
||||
filePath = mimetype;
|
||||
}
|
||||
|
||||
if (this.env.isPathRelative(filePath)) {
|
||||
if (this.currentFileInfo.relativeUrls) {
|
||||
filePath = path.join(this.currentFileInfo.currentDirectory, filePath);
|
||||
} else {
|
||||
filePath = path.join(this.currentFileInfo.entryPath, filePath);
|
||||
}
|
||||
}
|
||||
|
||||
// detect the mimetype if not given
|
||||
if (arguments.length < 2) {
|
||||
var mime;
|
||||
try {
|
||||
mime = require('mime');
|
||||
} catch (ex) {
|
||||
mime = tree._mime;
|
||||
}
|
||||
|
||||
mimetype = mime.lookup(filePath);
|
||||
|
||||
// use base 64 unless it's an ASCII or UTF-8 format
|
||||
var charset = mime.charsets.lookup(mimetype);
|
||||
useBase64 = ['US-ASCII', 'UTF-8'].indexOf(charset) < 0;
|
||||
if (useBase64) { mimetype += ';base64'; }
|
||||
}
|
||||
else {
|
||||
useBase64 = /;base64$/.test(mimetype);
|
||||
}
|
||||
|
||||
var buf = fs.readFileSync(filePath);
|
||||
|
||||
// IE8 cannot handle a data-uri larger than 32KB. If this is exceeded
|
||||
// and the --ieCompat flag is enabled, return a normal url() instead.
|
||||
var DATA_URI_MAX_KB = 32,
|
||||
fileSizeInKB = parseInt((buf.length / 1024), 10);
|
||||
if (fileSizeInKB >= DATA_URI_MAX_KB) {
|
||||
|
||||
if (this.env.ieCompat !== false) {
|
||||
if (!this.env.silent) {
|
||||
console.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!", filePath, fileSizeInKB, DATA_URI_MAX_KB);
|
||||
}
|
||||
|
||||
return new tree.URL(filePathNode || mimetypeNode, this.currentFileInfo).eval(this.env);
|
||||
}
|
||||
}
|
||||
|
||||
buf = useBase64 ? buf.toString('base64')
|
||||
: encodeURIComponent(buf);
|
||||
|
||||
var uri = "'data:" + mimetype + ',' + buf + "'";
|
||||
return new(tree.URL)(new(tree.Anonymous)(uri));
|
||||
},
|
||||
|
||||
"svg-gradient": function(direction) {
|
||||
|
||||
function throwArgumentDescriptor() {
|
||||
throw { type: "Argument", message: "svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position]" };
|
||||
}
|
||||
|
||||
if (arguments.length < 3) {
|
||||
throwArgumentDescriptor();
|
||||
}
|
||||
var stops = Array.prototype.slice.call(arguments, 1),
|
||||
gradientDirectionSvg,
|
||||
gradientType = "linear",
|
||||
rectangleDimension = 'x="0" y="0" width="1" height="1"',
|
||||
useBase64 = true,
|
||||
renderEnv = {compress: false},
|
||||
returner,
|
||||
directionValue = direction.toCSS(renderEnv),
|
||||
i, color, position, positionValue, alpha;
|
||||
|
||||
switch (directionValue) {
|
||||
case "to bottom":
|
||||
gradientDirectionSvg = 'x1="0%" y1="0%" x2="0%" y2="100%"';
|
||||
break;
|
||||
case "to right":
|
||||
gradientDirectionSvg = 'x1="0%" y1="0%" x2="100%" y2="0%"';
|
||||
break;
|
||||
case "to bottom right":
|
||||
gradientDirectionSvg = 'x1="0%" y1="0%" x2="100%" y2="100%"';
|
||||
break;
|
||||
case "to top right":
|
||||
gradientDirectionSvg = 'x1="0%" y1="100%" x2="100%" y2="0%"';
|
||||
break;
|
||||
case "ellipse":
|
||||
case "ellipse at center":
|
||||
gradientType = "radial";
|
||||
gradientDirectionSvg = 'cx="50%" cy="50%" r="75%"';
|
||||
rectangleDimension = 'x="-50" y="-50" width="101" height="101"';
|
||||
break;
|
||||
default:
|
||||
throw { type: "Argument", message: "svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'" };
|
||||
}
|
||||
returner = '<?xml version="1.0" ?>' +
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">' +
|
||||
'<' + gradientType + 'Gradient id="gradient" gradientUnits="userSpaceOnUse" ' + gradientDirectionSvg + '>';
|
||||
|
||||
for (i = 0; i < stops.length; i+= 1) {
|
||||
if (stops[i].value) {
|
||||
color = stops[i].value[0];
|
||||
position = stops[i].value[1];
|
||||
} else {
|
||||
color = stops[i];
|
||||
position = undefined;
|
||||
}
|
||||
|
||||
if (!(color instanceof tree.Color) || (!((i === 0 || i+1 === stops.length) && position === undefined) && !(position instanceof tree.Dimension))) {
|
||||
throwArgumentDescriptor();
|
||||
}
|
||||
positionValue = position ? position.toCSS(renderEnv) : i === 0 ? "0%" : "100%";
|
||||
alpha = color.alpha;
|
||||
returner += '<stop offset="' + positionValue + '" stop-color="' + color.toRGB() + '"' + (alpha < 1 ? ' stop-opacity="' + alpha + '"' : '') + '/>';
|
||||
}
|
||||
returner += '</' + gradientType + 'Gradient>' +
|
||||
'<rect ' + rectangleDimension + ' fill="url(#gradient)" /></svg>';
|
||||
|
||||
if (useBase64) {
|
||||
// only works in node, needs interface to what is supported in environment
|
||||
try {
|
||||
returner = new Buffer(returner).toString('base64');
|
||||
} catch(e) {
|
||||
useBase64 = false;
|
||||
}
|
||||
}
|
||||
|
||||
returner = "'data:image/svg+xml" + (useBase64 ? ";base64" : "") + "," + returner + "'";
|
||||
return new(tree.URL)(new(tree.Anonymous)(returner));
|
||||
}
|
||||
};
|
||||
|
||||
// these static methods are used as a fallback when the optional 'mime' dependency is missing
|
||||
tree._mime = {
|
||||
// this map is intentionally incomplete
|
||||
// if you want more, install 'mime' dep
|
||||
_types: {
|
||||
'.htm' : 'text/html',
|
||||
'.html': 'text/html',
|
||||
'.gif' : 'image/gif',
|
||||
'.jpg' : 'image/jpeg',
|
||||
'.jpeg': 'image/jpeg',
|
||||
'.png' : 'image/png'
|
||||
},
|
||||
lookup: function (filepath) {
|
||||
var ext = require('path').extname(filepath),
|
||||
type = tree._mime._types[ext];
|
||||
if (type === undefined) {
|
||||
throw new Error('Optional dependency "mime" is required for ' + ext);
|
||||
}
|
||||
return type;
|
||||
},
|
||||
charsets: {
|
||||
lookup: function (type) {
|
||||
// assumes all text types are UTF-8
|
||||
return type && (/^text\//).test(type) ? 'UTF-8' : '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var mathFunctions = [{name:"ceil"}, {name:"floor"}, {name: "sqrt"}, {name:"abs"},
|
||||
{name:"tan", unit: ""}, {name:"sin", unit: ""}, {name:"cos", unit: ""},
|
||||
{name:"atan", unit: "rad"}, {name:"asin", unit: "rad"}, {name:"acos", unit: "rad"}],
|
||||
createMathFunction = function(name, unit) {
|
||||
return function(n) {
|
||||
/*jshint eqnull:true */
|
||||
if (unit != null) {
|
||||
n = n.unify();
|
||||
}
|
||||
return this._math(Math[name], unit, n);
|
||||
};
|
||||
};
|
||||
|
||||
for(var i = 0; i < mathFunctions.length; i++) {
|
||||
tree.functions[mathFunctions[i].name] = createMathFunction(mathFunctions[i].name, mathFunctions[i].unit);
|
||||
}
|
||||
|
||||
function hsla(color) {
|
||||
return tree.functions.hsla(color.h, color.s, color.l, color.a);
|
||||
}
|
||||
|
||||
function scaled(n, size) {
|
||||
if (n instanceof tree.Dimension && n.unit.is('%')) {
|
||||
return parseFloat(n.value * size / 100);
|
||||
} else {
|
||||
return number(n);
|
||||
}
|
||||
}
|
||||
|
||||
function number(n) {
|
||||
if (n instanceof tree.Dimension) {
|
||||
return parseFloat(n.unit.is('%') ? n.value / 100 : n.value);
|
||||
} else if (typeof(n) === 'number') {
|
||||
return n;
|
||||
} else {
|
||||
throw {
|
||||
error: "RuntimeError",
|
||||
message: "color functions take numbers as parameters"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function clamp(val) {
|
||||
return Math.min(1, Math.max(0, val));
|
||||
}
|
||||
|
||||
tree.functionCall = function(env, currentFileInfo) {
|
||||
this.env = env;
|
||||
this.currentFileInfo = currentFileInfo;
|
||||
};
|
||||
|
||||
tree.functionCall.prototype = tree.functions;
|
||||
|
||||
})(require('./tree'));
|
||||
118
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/import-visitor.js
generated
vendored
Normal file
118
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/import-visitor.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
(function (tree) {
|
||||
tree.importVisitor = function(importer, finish, evalEnv) {
|
||||
this._visitor = new tree.visitor(this);
|
||||
this._importer = importer;
|
||||
this._finish = finish;
|
||||
this.env = evalEnv || new tree.evalEnv();
|
||||
this.importCount = 0;
|
||||
};
|
||||
|
||||
tree.importVisitor.prototype = {
|
||||
isReplacing: true,
|
||||
run: function (root) {
|
||||
var error;
|
||||
try {
|
||||
// process the contents
|
||||
this._visitor.visit(root);
|
||||
}
|
||||
catch(e) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
this.isFinished = true;
|
||||
|
||||
if (this.importCount === 0) {
|
||||
this._finish(error);
|
||||
}
|
||||
},
|
||||
visitImport: function (importNode, visitArgs) {
|
||||
var importVisitor = this,
|
||||
evaldImportNode,
|
||||
inlineCSS = importNode.options.inline;
|
||||
|
||||
if (!importNode.css || inlineCSS) {
|
||||
|
||||
try {
|
||||
evaldImportNode = importNode.evalForImport(this.env);
|
||||
} catch(e){
|
||||
if (!e.filename) { e.index = importNode.index; e.filename = importNode.currentFileInfo.filename; }
|
||||
// attempt to eval properly and treat as css
|
||||
importNode.css = true;
|
||||
// if that fails, this error will be thrown
|
||||
importNode.error = e;
|
||||
}
|
||||
|
||||
if (evaldImportNode && (!evaldImportNode.css || inlineCSS)) {
|
||||
importNode = evaldImportNode;
|
||||
this.importCount++;
|
||||
var env = new tree.evalEnv(this.env, this.env.frames.slice(0));
|
||||
|
||||
if (importNode.options.multiple) {
|
||||
env.importMultiple = true;
|
||||
}
|
||||
|
||||
this._importer.push(importNode.getPath(), importNode.currentFileInfo, importNode.options, function (e, root, imported, fullPath) {
|
||||
if (e && !e.filename) { e.index = importNode.index; e.filename = importNode.currentFileInfo.filename; }
|
||||
|
||||
if (imported && !env.importMultiple) { importNode.skip = imported; }
|
||||
|
||||
var subFinish = function(e) {
|
||||
importVisitor.importCount--;
|
||||
|
||||
if (importVisitor.importCount === 0 && importVisitor.isFinished) {
|
||||
importVisitor._finish(e);
|
||||
}
|
||||
};
|
||||
|
||||
if (root) {
|
||||
importNode.root = root;
|
||||
importNode.importedFilename = fullPath;
|
||||
if (!inlineCSS && !importNode.skip) {
|
||||
new(tree.importVisitor)(importVisitor._importer, subFinish, env)
|
||||
.run(root);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
subFinish();
|
||||
});
|
||||
}
|
||||
}
|
||||
visitArgs.visitDeeper = false;
|
||||
return importNode;
|
||||
},
|
||||
visitRule: function (ruleNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
return ruleNode;
|
||||
},
|
||||
visitDirective: function (directiveNode, visitArgs) {
|
||||
this.env.frames.unshift(directiveNode);
|
||||
return directiveNode;
|
||||
},
|
||||
visitDirectiveOut: function (directiveNode) {
|
||||
this.env.frames.shift();
|
||||
},
|
||||
visitMixinDefinition: function (mixinDefinitionNode, visitArgs) {
|
||||
this.env.frames.unshift(mixinDefinitionNode);
|
||||
return mixinDefinitionNode;
|
||||
},
|
||||
visitMixinDefinitionOut: function (mixinDefinitionNode) {
|
||||
this.env.frames.shift();
|
||||
},
|
||||
visitRuleset: function (rulesetNode, visitArgs) {
|
||||
this.env.frames.unshift(rulesetNode);
|
||||
return rulesetNode;
|
||||
},
|
||||
visitRulesetOut: function (rulesetNode) {
|
||||
this.env.frames.shift();
|
||||
},
|
||||
visitMedia: function (mediaNode, visitArgs) {
|
||||
this.env.frames.unshift(mediaNode.ruleset);
|
||||
return mediaNode;
|
||||
},
|
||||
visitMediaOut: function (mediaNode) {
|
||||
this.env.frames.shift();
|
||||
}
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
224
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/index.js
generated
vendored
Normal file
224
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/index.js
generated
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
var path = require('path'),
|
||||
url = require('url'),
|
||||
request,
|
||||
fs = require('fs');
|
||||
|
||||
var less = {
|
||||
version: [1, 5, 1],
|
||||
Parser: require('./parser').Parser,
|
||||
tree: require('./tree'),
|
||||
render: function (input, options, callback) {
|
||||
options = options || {};
|
||||
|
||||
if (typeof(options) === 'function') {
|
||||
callback = options, options = {};
|
||||
}
|
||||
|
||||
var parser = new(less.Parser)(options),
|
||||
ee;
|
||||
|
||||
if (callback) {
|
||||
parser.parse(input, function (e, root) {
|
||||
try { callback(e, root && root.toCSS && root.toCSS(options)); }
|
||||
catch (err) { callback(err); }
|
||||
});
|
||||
} else {
|
||||
ee = new (require('events').EventEmitter)();
|
||||
|
||||
process.nextTick(function () {
|
||||
parser.parse(input, function (e, root) {
|
||||
if (e) { return ee.emit('error', e); }
|
||||
try { ee.emit('success', root.toCSS(options)); }
|
||||
catch (err) { ee.emit('error', err); }
|
||||
});
|
||||
});
|
||||
return ee;
|
||||
}
|
||||
},
|
||||
formatError: function(ctx, options) {
|
||||
options = options || {};
|
||||
|
||||
var message = "";
|
||||
var extract = ctx.extract;
|
||||
var error = [];
|
||||
var stylize = options.color ? require('./lessc_helper').stylize : function (str) { return str; };
|
||||
|
||||
// only output a stack if it isn't a less error
|
||||
if (ctx.stack && !ctx.type) { return stylize(ctx.stack, 'red'); }
|
||||
|
||||
if (!ctx.hasOwnProperty('index') || !extract) {
|
||||
return ctx.stack || ctx.message;
|
||||
}
|
||||
|
||||
if (typeof(extract[0]) === 'string') {
|
||||
error.push(stylize((ctx.line - 1) + ' ' + extract[0], 'grey'));
|
||||
}
|
||||
|
||||
if (typeof(extract[1]) === 'string') {
|
||||
var errorTxt = ctx.line + ' ';
|
||||
if (extract[1]) {
|
||||
errorTxt += extract[1].slice(0, ctx.column) +
|
||||
stylize(stylize(stylize(extract[1][ctx.column], 'bold') +
|
||||
extract[1].slice(ctx.column + 1), 'red'), 'inverse');
|
||||
}
|
||||
error.push(errorTxt);
|
||||
}
|
||||
|
||||
if (typeof(extract[2]) === 'string') {
|
||||
error.push(stylize((ctx.line + 1) + ' ' + extract[2], 'grey'));
|
||||
}
|
||||
error = error.join('\n') + stylize('', 'reset') + '\n';
|
||||
|
||||
message += stylize(ctx.type + 'Error: ' + ctx.message, 'red');
|
||||
ctx.filename && (message += stylize(' in ', 'red') + ctx.filename +
|
||||
stylize(' on line ' + ctx.line + ', column ' + (ctx.column + 1) + ':', 'grey'));
|
||||
|
||||
message += '\n' + error;
|
||||
|
||||
if (ctx.callLine) {
|
||||
message += stylize('from ', 'red') + (ctx.filename || '') + '/n';
|
||||
message += stylize(ctx.callLine, 'grey') + ' ' + ctx.callExtract + '/n';
|
||||
}
|
||||
|
||||
return message;
|
||||
},
|
||||
writeError: function (ctx, options) {
|
||||
options = options || {};
|
||||
if (options.silent) { return; }
|
||||
console.error(less.formatError(ctx, options));
|
||||
}
|
||||
};
|
||||
|
||||
['color', 'directive', 'operation', 'dimension',
|
||||
'keyword', 'variable', 'ruleset', 'element',
|
||||
'selector', 'quoted', 'expression', 'rule',
|
||||
'call', 'url', 'alpha', 'import',
|
||||
'mixin', 'comment', 'anonymous', 'value',
|
||||
'javascript', 'assignment', 'condition', 'paren',
|
||||
'media', 'unicode-descriptor', 'negative', 'extend'
|
||||
].forEach(function (n) {
|
||||
require('./tree/' + n);
|
||||
});
|
||||
|
||||
|
||||
var isUrlRe = /^(?:https?:)?\/\//i;
|
||||
|
||||
less.Parser.fileLoader = function (file, currentFileInfo, callback, env) {
|
||||
var pathname, dirname, data,
|
||||
newFileInfo = {
|
||||
relativeUrls: env.relativeUrls,
|
||||
entryPath: currentFileInfo.entryPath,
|
||||
rootpath: currentFileInfo.rootpath,
|
||||
rootFilename: currentFileInfo.rootFilename
|
||||
};
|
||||
|
||||
function handleDataAndCallCallback(data) {
|
||||
var j = file.lastIndexOf('/');
|
||||
|
||||
// Pass on an updated rootpath if path of imported file is relative and file
|
||||
// is in a (sub|sup) directory
|
||||
//
|
||||
// Examples:
|
||||
// - If path of imported file is 'module/nav/nav.less' and rootpath is 'less/',
|
||||
// then rootpath should become 'less/module/nav/'
|
||||
// - If path of imported file is '../mixins.less' and rootpath is 'less/',
|
||||
// then rootpath should become 'less/../'
|
||||
if(newFileInfo.relativeUrls && !/^(?:[a-z-]+:|\/)/.test(file) && j != -1) {
|
||||
var relativeSubDirectory = file.slice(0, j+1);
|
||||
newFileInfo.rootpath = newFileInfo.rootpath + relativeSubDirectory; // append (sub|sup) directory path of imported file
|
||||
}
|
||||
newFileInfo.currentDirectory = pathname.replace(/[^\\\/]*$/, "");
|
||||
newFileInfo.filename = pathname;
|
||||
|
||||
callback(null, data, pathname, newFileInfo);
|
||||
}
|
||||
|
||||
var isUrl = isUrlRe.test( file );
|
||||
if (isUrl || isUrlRe.test(currentFileInfo.currentDirectory)) {
|
||||
if (request === undefined) {
|
||||
try { request = require('request'); }
|
||||
catch(e) { request = null; }
|
||||
}
|
||||
if (!request) {
|
||||
callback({ type: 'File', message: "optional dependency 'request' required to import over http(s)\n" });
|
||||
return;
|
||||
}
|
||||
|
||||
var urlStr = isUrl ? file : url.resolve(currentFileInfo.currentDirectory, file),
|
||||
urlObj = url.parse(urlStr);
|
||||
|
||||
request.get({uri: urlStr, strictSSL: !env.insecure }, function (error, res, body) {
|
||||
if (res.statusCode === 404) {
|
||||
callback({ type: 'File', message: "resource '" + urlStr + "' was not found\n" });
|
||||
return;
|
||||
}
|
||||
if (!body) {
|
||||
console.error( 'Warning: Empty body (HTTP '+ res.statusCode + ') returned by "' + urlStr +'"' );
|
||||
}
|
||||
if (error) {
|
||||
callback({ type: 'File', message: "resource '" + urlStr + "' gave this Error:\n "+ error +"\n" });
|
||||
}
|
||||
pathname = urlStr;
|
||||
dirname = urlObj.protocol +'//'+ urlObj.host + urlObj.pathname.replace(/[^\/]*$/, '');
|
||||
handleDataAndCallCallback(body);
|
||||
});
|
||||
} else {
|
||||
|
||||
var paths = [currentFileInfo.currentDirectory].concat(env.paths);
|
||||
paths.push('.');
|
||||
|
||||
if (env.syncImport) {
|
||||
for (var i = 0; i < paths.length; i++) {
|
||||
try {
|
||||
pathname = path.join(paths[i], file);
|
||||
fs.statSync(pathname);
|
||||
break;
|
||||
} catch (e) {
|
||||
pathname = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pathname) {
|
||||
callback({ type: 'File', message: "'" + file + "' wasn't found" });
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
data = fs.readFileSync(pathname, 'utf-8');
|
||||
handleDataAndCallCallback(data);
|
||||
} catch (e) {
|
||||
callback(e);
|
||||
}
|
||||
} else {
|
||||
(function tryPathIndex(i) {
|
||||
if (i < paths.length) {
|
||||
pathname = path.join(paths[i], file);
|
||||
fs.stat(pathname, function (err) {
|
||||
if (err) {
|
||||
tryPathIndex(i + 1);
|
||||
} else {
|
||||
fs.readFile(pathname, 'utf-8', function(e, data) {
|
||||
if (e) { callback(e); }
|
||||
handleDataAndCallCallback(data);
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback({ type: 'File', message: "'" + file + "' wasn't found" });
|
||||
}
|
||||
}(0));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
require('./env');
|
||||
require('./functions');
|
||||
require('./colors');
|
||||
require('./visitor.js');
|
||||
require('./import-visitor.js');
|
||||
require('./extend-visitor.js');
|
||||
require('./join-selector-visitor.js');
|
||||
require('./to-css-visitor.js');
|
||||
require('./source-map-output.js');
|
||||
|
||||
for (var k in less) { exports[k] = less[k]; }
|
||||
41
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/join-selector-visitor.js
generated
vendored
Normal file
41
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/join-selector-visitor.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
(function (tree) {
|
||||
tree.joinSelectorVisitor = function() {
|
||||
this.contexts = [[]];
|
||||
this._visitor = new tree.visitor(this);
|
||||
};
|
||||
|
||||
tree.joinSelectorVisitor.prototype = {
|
||||
run: function (root) {
|
||||
return this._visitor.visit(root);
|
||||
},
|
||||
visitRule: function (ruleNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
visitMixinDefinition: function (mixinDefinitionNode, visitArgs) {
|
||||
visitArgs.visitDeeper = false;
|
||||
},
|
||||
|
||||
visitRuleset: function (rulesetNode, visitArgs) {
|
||||
var context = this.contexts[this.contexts.length - 1];
|
||||
var paths = [];
|
||||
this.contexts.push(paths);
|
||||
|
||||
if (! rulesetNode.root) {
|
||||
rulesetNode.selectors = rulesetNode.selectors.filter(function(selector) { return selector.getIsOutput(); });
|
||||
if (rulesetNode.selectors.length === 0) {
|
||||
rulesetNode.rules.length = 0;
|
||||
}
|
||||
rulesetNode.joinSelectors(paths, context, rulesetNode.selectors);
|
||||
rulesetNode.paths = paths;
|
||||
}
|
||||
},
|
||||
visitRulesetOut: function (rulesetNode) {
|
||||
this.contexts.length = this.contexts.length - 1;
|
||||
},
|
||||
visitMedia: function (mediaNode, visitArgs) {
|
||||
var context = this.contexts[this.contexts.length - 1];
|
||||
mediaNode.rules[0].root = (context.length === 0 || context[0].multiMedia);
|
||||
}
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
78
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/lessc_helper.js
generated
vendored
Normal file
78
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/lessc_helper.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
// lessc_helper.js
|
||||
//
|
||||
// helper functions for lessc
|
||||
var lessc_helper = {
|
||||
|
||||
//Stylize a string
|
||||
stylize : function(str, style) {
|
||||
var styles = {
|
||||
'reset' : [0, 0],
|
||||
'bold' : [1, 22],
|
||||
'inverse' : [7, 27],
|
||||
'underline' : [4, 24],
|
||||
'yellow' : [33, 39],
|
||||
'green' : [32, 39],
|
||||
'red' : [31, 39],
|
||||
'grey' : [90, 39]
|
||||
};
|
||||
return '\033[' + styles[style][0] + 'm' + str +
|
||||
'\033[' + styles[style][1] + 'm';
|
||||
},
|
||||
|
||||
//Print command line options
|
||||
printUsage: function() {
|
||||
console.log("usage: lessc [option option=parameter ...] <source> [destination]");
|
||||
console.log("");
|
||||
console.log("If source is set to `-' (dash or hyphen-minus), input is read from stdin.");
|
||||
console.log("");
|
||||
console.log("options:");
|
||||
console.log(" -h, --help Print help (this message) and exit.");
|
||||
console.log(" --include-path=PATHS Set include paths. Separated by `:'. Use `;' on Windows.");
|
||||
console.log(" -M, --depends Output a makefile import dependency list to stdout");
|
||||
console.log(" --no-color Disable colorized output.");
|
||||
console.log(" --no-ie-compat Disable IE compatibility checks.");
|
||||
console.log(" --no-js Disable JavaScript in less files");
|
||||
console.log(" -l, --lint Syntax check only (lint).");
|
||||
console.log(" -s, --silent Suppress output of error messages.");
|
||||
console.log(" --strict-imports Force evaluation of imports.");
|
||||
console.log(" --insecure Allow imports from insecure https hosts.");
|
||||
console.log(" -v, --version Print version number and exit.");
|
||||
console.log(" -x, --compress Compress output by removing some whitespaces.");
|
||||
console.log(" --clean-css Compress output using clean-css");
|
||||
console.log(" --source-map[=FILENAME] Outputs a v3 sourcemap to the filename (or output filename.map)");
|
||||
console.log(" --source-map-rootpath=X adds this path onto the sourcemap filename and less file paths");
|
||||
console.log(" --source-map-basepath=X Sets sourcemap base path, defaults to current working directory.");
|
||||
console.log(" --source-map-less-inline puts the less files into the map instead of referencing them");
|
||||
console.log(" --source-map-map-inline puts the map (and any less files) into the output css file");
|
||||
console.log(" --source-map-url=URL the complete url and filename put in the less file");
|
||||
console.log(" -rp, --rootpath=URL Set rootpath for url rewriting in relative imports and urls.");
|
||||
console.log(" Works with or without the relative-urls option.");
|
||||
console.log(" -ru, --relative-urls re-write relative urls to the base less file.");
|
||||
console.log(" -sm=on|off Turn on or off strict math, where in strict mode, math");
|
||||
console.log(" --strict-math=on|off requires brackets. This option may default to on and then");
|
||||
console.log(" be removed in the future.");
|
||||
console.log(" -su=on|off Allow mixed units, e.g. 1px+1em or 1px*1px which have units");
|
||||
console.log(" --strict-units=on|off that cannot be represented.");
|
||||
console.log(" --global-var='VAR=VALUE' Defines a variable that can be referenced by the file.");
|
||||
console.log(" --modify-var='VAR=VALUE' Modifies a variable already declared in the file.");
|
||||
console.log("");
|
||||
console.log("-------------------------- Deprecated ----------------");
|
||||
console.log(" -O0, -O1, -O2 Set the parser's optimization level. The lower");
|
||||
console.log(" the number, the less nodes it will create in the");
|
||||
console.log(" tree. This could matter for debugging, or if you");
|
||||
console.log(" want to access the individual nodes in the tree.");
|
||||
console.log(" --line-numbers=TYPE Outputs filename and line numbers.");
|
||||
console.log(" TYPE can be either 'comments', which will output");
|
||||
console.log(" the debug info within comments, 'mediaquery'");
|
||||
console.log(" that will output the information within a fake");
|
||||
console.log(" media query which is compatible with the SASS");
|
||||
console.log(" format, and 'all' which will do both.");
|
||||
console.log(" --verbose Be verbose.");
|
||||
console.log("");
|
||||
console.log("Report bugs to: http://github.com/less/less.js/issues");
|
||||
console.log("Home page: <http://lesscss.org/>");
|
||||
}
|
||||
};
|
||||
|
||||
// Exports helper functions
|
||||
for (var h in lessc_helper) { exports[h] = lessc_helper[h]; }
|
||||
1709
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/parser.js
generated
vendored
Normal file
1709
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/parser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
128
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/rhino.js
generated
vendored
Normal file
128
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/rhino.js
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
/*jshint rhino:true, unused: false */
|
||||
/*global name:true, less, loadStyleSheet */
|
||||
var name;
|
||||
|
||||
function error(e, filename) {
|
||||
|
||||
var content = "Error : " + filename + "\n";
|
||||
|
||||
filename = e.filename || filename;
|
||||
|
||||
if (e.message) {
|
||||
content += e.message + "\n";
|
||||
}
|
||||
|
||||
var errorline = function (e, i, classname) {
|
||||
if (e.extract[i]) {
|
||||
content +=
|
||||
String(parseInt(e.line, 10) + (i - 1)) +
|
||||
":" + e.extract[i] + "\n";
|
||||
}
|
||||
};
|
||||
|
||||
if (e.stack) {
|
||||
content += e.stack;
|
||||
} else if (e.extract) {
|
||||
content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':\n';
|
||||
errorline(e, 0);
|
||||
errorline(e, 1);
|
||||
errorline(e, 2);
|
||||
}
|
||||
print(content);
|
||||
}
|
||||
|
||||
function loadStyleSheet(sheet, callback, reload, remaining) {
|
||||
var endOfPath = Math.max(name.lastIndexOf('/'), name.lastIndexOf('\\')),
|
||||
sheetName = name.slice(0, endOfPath + 1) + sheet.href,
|
||||
contents = sheet.contents || {},
|
||||
input = readFile(sheetName);
|
||||
|
||||
input = input.replace(/^\xEF\xBB\xBF/, '');
|
||||
|
||||
contents[sheetName] = input;
|
||||
|
||||
var parser = new less.Parser({
|
||||
paths: [sheet.href.replace(/[\w\.-]+$/, '')],
|
||||
contents: contents
|
||||
});
|
||||
parser.parse(input, function (e, root) {
|
||||
if (e) {
|
||||
return error(e, sheetName);
|
||||
}
|
||||
try {
|
||||
callback(e, root, input, sheet, { local: false, lastModified: 0, remaining: remaining }, sheetName);
|
||||
} catch(e) {
|
||||
error(e, sheetName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function writeFile(filename, content) {
|
||||
var fstream = new java.io.FileWriter(filename);
|
||||
var out = new java.io.BufferedWriter(fstream);
|
||||
out.write(content);
|
||||
out.close();
|
||||
}
|
||||
|
||||
// Command line integration via Rhino
|
||||
(function (args) {
|
||||
var output,
|
||||
compress = false,
|
||||
i,
|
||||
path;
|
||||
|
||||
for(i = 0; i < args.length; i++) {
|
||||
switch(args[i]) {
|
||||
case "-x":
|
||||
compress = true;
|
||||
break;
|
||||
default:
|
||||
if (!name) {
|
||||
name = args[i];
|
||||
} else if (!output) {
|
||||
output = args[i];
|
||||
} else {
|
||||
print("unrecognised parameters");
|
||||
print("input_file [output_file] [-x]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
print('No files present in the fileset; Check your pattern match in build.xml');
|
||||
quit(1);
|
||||
}
|
||||
path = name.split("/");path.pop();path=path.join("/");
|
||||
|
||||
var input = readFile(name);
|
||||
|
||||
if (!input) {
|
||||
print('lesscss: couldn\'t open file ' + name);
|
||||
quit(1);
|
||||
}
|
||||
|
||||
var result;
|
||||
try {
|
||||
var parser = new less.Parser();
|
||||
parser.parse(input, function (e, root) {
|
||||
if (e) {
|
||||
error(e, name);
|
||||
quit(1);
|
||||
} else {
|
||||
result = root.toCSS({compress: compress || false});
|
||||
if (output) {
|
||||
writeFile(output, result);
|
||||
print("Written to " + output);
|
||||
} else {
|
||||
print(result);
|
||||
}
|
||||
quit(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e) {
|
||||
error(e, name);
|
||||
quit(1);
|
||||
}
|
||||
print("done");
|
||||
}(arguments));
|
||||
119
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/source-map-output.js
generated
vendored
Normal file
119
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/source-map-output.js
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
(function (tree) {
|
||||
|
||||
tree.sourceMapOutput = function (options) {
|
||||
this._css = [];
|
||||
this._rootNode = options.rootNode;
|
||||
this._writeSourceMap = options.writeSourceMap;
|
||||
this._contentsMap = options.contentsMap;
|
||||
this._sourceMapFilename = options.sourceMapFilename;
|
||||
this._outputFilename = options.outputFilename;
|
||||
this._sourceMapURL = options.sourceMapURL;
|
||||
this._sourceMapBasepath = options.sourceMapBasepath;
|
||||
this._sourceMapRootpath = options.sourceMapRootpath;
|
||||
this._outputSourceFiles = options.outputSourceFiles;
|
||||
this._sourceMapGeneratorConstructor = options.sourceMapGenerator || require("source-map").SourceMapGenerator;
|
||||
|
||||
if (this._sourceMapRootpath && this._sourceMapRootpath.charAt(this._sourceMapRootpath.length-1) !== '/') {
|
||||
this._sourceMapRootpath += '/';
|
||||
}
|
||||
|
||||
this._lineNumber = 0;
|
||||
this._column = 0;
|
||||
};
|
||||
|
||||
tree.sourceMapOutput.prototype.normalizeFilename = function(filename) {
|
||||
if (this._sourceMapBasepath && filename.indexOf(this._sourceMapBasepath) === 0) {
|
||||
filename = filename.substring(this._sourceMapBasepath.length);
|
||||
if (filename.charAt(0) === '\\' || filename.charAt(0) === '/') {
|
||||
filename = filename.substring(1);
|
||||
}
|
||||
}
|
||||
return (this._sourceMapRootpath || "") + filename.replace(/\\/g, '/');
|
||||
};
|
||||
|
||||
tree.sourceMapOutput.prototype.add = function(chunk, fileInfo, index, mapLines) {
|
||||
|
||||
//ignore adding empty strings
|
||||
if (!chunk) {
|
||||
return;
|
||||
}
|
||||
|
||||
var lines,
|
||||
sourceLines,
|
||||
columns,
|
||||
sourceColumns,
|
||||
i;
|
||||
|
||||
if (fileInfo) {
|
||||
var inputSource = this._contentsMap[fileInfo.filename].substring(0, index);
|
||||
sourceLines = inputSource.split("\n");
|
||||
sourceColumns = sourceLines[sourceLines.length-1];
|
||||
}
|
||||
|
||||
lines = chunk.split("\n");
|
||||
columns = lines[lines.length-1];
|
||||
|
||||
if (fileInfo) {
|
||||
if (!mapLines) {
|
||||
this._sourceMapGenerator.addMapping({ generated: { line: this._lineNumber + 1, column: this._column},
|
||||
original: { line: sourceLines.length, column: sourceColumns.length},
|
||||
source: this.normalizeFilename(fileInfo.filename)});
|
||||
} else {
|
||||
for(i = 0; i < lines.length; i++) {
|
||||
this._sourceMapGenerator.addMapping({ generated: { line: this._lineNumber + i + 1, column: i === 0 ? this._column : 0},
|
||||
original: { line: sourceLines.length + i, column: i === 0 ? sourceColumns.length : 0},
|
||||
source: this.normalizeFilename(fileInfo.filename)});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lines.length === 1) {
|
||||
this._column += columns.length;
|
||||
} else {
|
||||
this._lineNumber += lines.length - 1;
|
||||
this._column = columns.length;
|
||||
}
|
||||
|
||||
this._css.push(chunk);
|
||||
};
|
||||
|
||||
tree.sourceMapOutput.prototype.isEmpty = function() {
|
||||
return this._css.length === 0;
|
||||
};
|
||||
|
||||
tree.sourceMapOutput.prototype.toCSS = function(env) {
|
||||
this._sourceMapGenerator = new this._sourceMapGeneratorConstructor({ file: this._outputFilename, sourceRoot: null });
|
||||
|
||||
if (this._outputSourceFiles) {
|
||||
for(var filename in this._contentsMap) {
|
||||
this._sourceMapGenerator.setSourceContent(this.normalizeFilename(filename), this._contentsMap[filename]);
|
||||
}
|
||||
}
|
||||
|
||||
this._rootNode.genCSS(env, this);
|
||||
|
||||
if (this._css.length > 0) {
|
||||
var sourceMapURL,
|
||||
sourceMapContent = JSON.stringify(this._sourceMapGenerator.toJSON());
|
||||
|
||||
if (this._sourceMapURL) {
|
||||
sourceMapURL = this._sourceMapURL;
|
||||
} else if (this._sourceMapFilename) {
|
||||
sourceMapURL = this.normalizeFilename(this._sourceMapFilename);
|
||||
}
|
||||
|
||||
if (this._writeSourceMap) {
|
||||
this._writeSourceMap(sourceMapContent);
|
||||
} else {
|
||||
sourceMapURL = "data:application/json," + encodeURIComponent(sourceMapContent);
|
||||
}
|
||||
|
||||
if (sourceMapURL) {
|
||||
this._css.push("/*# sourceMappingURL=" + sourceMapURL + " */");
|
||||
}
|
||||
}
|
||||
|
||||
return this._css.join('');
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
199
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/to-css-visitor.js
generated
vendored
Normal file
199
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/to-css-visitor.js
generated
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
(function (tree) {
|
||||
tree.toCSSVisitor = function(env) {
|
||||
this._visitor = new tree.visitor(this);
|
||||
this._env = env;
|
||||
};
|
||||
|
||||
tree.toCSSVisitor.prototype = {
|
||||
isReplacing: true,
|
||||
run: function (root) {
|
||||
return this._visitor.visit(root);
|
||||
},
|
||||
|
||||
visitRule: function (ruleNode, visitArgs) {
|
||||
if (ruleNode.variable) {
|
||||
return [];
|
||||
}
|
||||
return ruleNode;
|
||||
},
|
||||
|
||||
visitMixinDefinition: function (mixinNode, visitArgs) {
|
||||
return [];
|
||||
},
|
||||
|
||||
visitExtend: function (extendNode, visitArgs) {
|
||||
return [];
|
||||
},
|
||||
|
||||
visitComment: function (commentNode, visitArgs) {
|
||||
if (commentNode.isSilent(this._env)) {
|
||||
return [];
|
||||
}
|
||||
return commentNode;
|
||||
},
|
||||
|
||||
visitMedia: function(mediaNode, visitArgs) {
|
||||
mediaNode.accept(this._visitor);
|
||||
visitArgs.visitDeeper = false;
|
||||
|
||||
if (!mediaNode.rules.length) {
|
||||
return [];
|
||||
}
|
||||
return mediaNode;
|
||||
},
|
||||
|
||||
visitDirective: function(directiveNode, visitArgs) {
|
||||
if (directiveNode.currentFileInfo.reference && !directiveNode.isReferenced) {
|
||||
return [];
|
||||
}
|
||||
if (directiveNode.name === "@charset") {
|
||||
// Only output the debug info together with subsequent @charset definitions
|
||||
// a comment (or @media statement) before the actual @charset directive would
|
||||
// be considered illegal css as it has to be on the first line
|
||||
if (this.charset) {
|
||||
if (directiveNode.debugInfo) {
|
||||
var comment = new tree.Comment("/* " + directiveNode.toCSS(this._env).replace(/\n/g, "")+" */\n");
|
||||
comment.debugInfo = directiveNode.debugInfo;
|
||||
return this._visitor.visit(comment);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
this.charset = true;
|
||||
}
|
||||
return directiveNode;
|
||||
},
|
||||
|
||||
checkPropertiesInRoot: function(rules) {
|
||||
var ruleNode;
|
||||
for(var i = 0; i < rules.length; i++) {
|
||||
ruleNode = rules[i];
|
||||
if (ruleNode instanceof tree.Rule && !ruleNode.variable) {
|
||||
throw { message: "properties must be inside selector blocks, they cannot be in the root.",
|
||||
index: ruleNode.index, filename: ruleNode.currentFileInfo ? ruleNode.currentFileInfo.filename : null};
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
visitRuleset: function (rulesetNode, visitArgs) {
|
||||
var rule, rulesets = [];
|
||||
if (rulesetNode.firstRoot) {
|
||||
this.checkPropertiesInRoot(rulesetNode.rules);
|
||||
}
|
||||
if (! rulesetNode.root) {
|
||||
|
||||
rulesetNode.paths = rulesetNode.paths
|
||||
.filter(function(p) {
|
||||
var i;
|
||||
if (p[0].elements[0].combinator.value === ' ') {
|
||||
p[0].elements[0].combinator = new(tree.Combinator)('');
|
||||
}
|
||||
for(i = 0; i < p.length; i++) {
|
||||
if (p[i].getIsReferenced() && p[i].getIsOutput()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Compile rules and rulesets
|
||||
for (var i = 0; i < rulesetNode.rules.length; i++) {
|
||||
rule = rulesetNode.rules[i];
|
||||
|
||||
if (rule.rules) {
|
||||
// visit because we are moving them out from being a child
|
||||
rulesets.push(this._visitor.visit(rule));
|
||||
rulesetNode.rules.splice(i, 1);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// accept the visitor to remove rules and refactor itself
|
||||
// then we can decide now whether we want it or not
|
||||
if (rulesetNode.rules.length > 0) {
|
||||
rulesetNode.accept(this._visitor);
|
||||
}
|
||||
visitArgs.visitDeeper = false;
|
||||
|
||||
this._mergeRules(rulesetNode.rules);
|
||||
this._removeDuplicateRules(rulesetNode.rules);
|
||||
|
||||
// now decide whether we keep the ruleset
|
||||
if (rulesetNode.rules.length > 0 && rulesetNode.paths.length > 0) {
|
||||
rulesets.splice(0, 0, rulesetNode);
|
||||
}
|
||||
} else {
|
||||
rulesetNode.accept(this._visitor);
|
||||
visitArgs.visitDeeper = false;
|
||||
if (rulesetNode.firstRoot || rulesetNode.rules.length > 0) {
|
||||
rulesets.splice(0, 0, rulesetNode);
|
||||
}
|
||||
}
|
||||
if (rulesets.length === 1) {
|
||||
return rulesets[0];
|
||||
}
|
||||
return rulesets;
|
||||
},
|
||||
|
||||
_removeDuplicateRules: function(rules) {
|
||||
// remove duplicates
|
||||
var ruleCache = {},
|
||||
ruleList, rule, i;
|
||||
for(i = rules.length - 1; i >= 0 ; i--) {
|
||||
rule = rules[i];
|
||||
if (rule instanceof tree.Rule) {
|
||||
if (!ruleCache[rule.name]) {
|
||||
ruleCache[rule.name] = rule;
|
||||
} else {
|
||||
ruleList = ruleCache[rule.name];
|
||||
if (ruleList instanceof tree.Rule) {
|
||||
ruleList = ruleCache[rule.name] = [ruleCache[rule.name].toCSS(this._env)];
|
||||
}
|
||||
var ruleCSS = rule.toCSS(this._env);
|
||||
if (ruleList.indexOf(ruleCSS) !== -1) {
|
||||
rules.splice(i, 1);
|
||||
} else {
|
||||
ruleList.push(ruleCSS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_mergeRules: function (rules) {
|
||||
var groups = {},
|
||||
parts,
|
||||
rule,
|
||||
key;
|
||||
|
||||
for (var i = 0; i < rules.length; i++) {
|
||||
rule = rules[i];
|
||||
|
||||
if ((rule instanceof tree.Rule) && rule.merge) {
|
||||
key = [rule.name,
|
||||
rule.important ? "!" : ""].join(",");
|
||||
|
||||
if (!groups[key]) {
|
||||
parts = groups[key] = [];
|
||||
} else {
|
||||
rules.splice(i--, 1);
|
||||
}
|
||||
|
||||
parts.push(rule);
|
||||
}
|
||||
}
|
||||
|
||||
Object.keys(groups).map(function (k) {
|
||||
parts = groups[k];
|
||||
|
||||
if (parts.length > 1) {
|
||||
rule = parts[0];
|
||||
|
||||
rule.value = new (tree.Value)(parts.map(function (p) {
|
||||
return p.value;
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
78
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/tree.js
generated
vendored
Normal file
78
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/tree.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
(function (tree) {
|
||||
|
||||
tree.debugInfo = function(env, ctx, lineSeperator) {
|
||||
var result="";
|
||||
if (env.dumpLineNumbers && !env.compress) {
|
||||
switch(env.dumpLineNumbers) {
|
||||
case 'comments':
|
||||
result = tree.debugInfo.asComment(ctx);
|
||||
break;
|
||||
case 'mediaquery':
|
||||
result = tree.debugInfo.asMediaQuery(ctx);
|
||||
break;
|
||||
case 'all':
|
||||
result = tree.debugInfo.asComment(ctx) + (lineSeperator || "") + tree.debugInfo.asMediaQuery(ctx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
tree.debugInfo.asComment = function(ctx) {
|
||||
return '/* line ' + ctx.debugInfo.lineNumber + ', ' + ctx.debugInfo.fileName + ' */\n';
|
||||
};
|
||||
|
||||
tree.debugInfo.asMediaQuery = function(ctx) {
|
||||
return '@media -sass-debug-info{filename{font-family:' +
|
||||
('file://' + ctx.debugInfo.fileName).replace(/([.:/\\])/g, function (a) {
|
||||
if (a == '\\') {
|
||||
a = '\/';
|
||||
}
|
||||
return '\\' + a;
|
||||
}) +
|
||||
'}line{font-family:\\00003' + ctx.debugInfo.lineNumber + '}}\n';
|
||||
};
|
||||
|
||||
tree.find = function (obj, fun) {
|
||||
for (var i = 0, r; i < obj.length; i++) {
|
||||
if (r = fun.call(obj, obj[i])) { return r; }
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
tree.jsify = function (obj) {
|
||||
if (Array.isArray(obj.value) && (obj.value.length > 1)) {
|
||||
return '[' + obj.value.map(function (v) { return v.toCSS(false); }).join(', ') + ']';
|
||||
} else {
|
||||
return obj.toCSS(false);
|
||||
}
|
||||
};
|
||||
|
||||
tree.toCSS = function (env) {
|
||||
var strs = [];
|
||||
this.genCSS(env, {
|
||||
add: function(chunk, fileInfo, index) {
|
||||
strs.push(chunk);
|
||||
},
|
||||
isEmpty: function () {
|
||||
return strs.length === 0;
|
||||
}
|
||||
});
|
||||
return strs.join('');
|
||||
};
|
||||
|
||||
tree.outputRuleset = function (env, output, rules) {
|
||||
output.add((env.compress ? '{' : ' {\n'));
|
||||
env.tabLevel = (env.tabLevel || 0) + 1;
|
||||
var tabRuleStr = env.compress ? '' : Array(env.tabLevel + 1).join(" "),
|
||||
tabSetStr = env.compress ? '' : Array(env.tabLevel).join(" ");
|
||||
for(var i = 0; i < rules.length; i++) {
|
||||
output.add(tabRuleStr);
|
||||
rules[i].genCSS(env, output);
|
||||
output.add(env.compress ? '' : '\n');
|
||||
}
|
||||
env.tabLevel--;
|
||||
output.add(tabSetStr + "}");
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
29
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/tree/alpha.js
generated
vendored
Normal file
29
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/tree/alpha.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
(function (tree) {
|
||||
|
||||
tree.Alpha = function (val) {
|
||||
this.value = val;
|
||||
};
|
||||
tree.Alpha.prototype = {
|
||||
type: "Alpha",
|
||||
accept: function (visitor) {
|
||||
this.value = visitor.visit(this.value);
|
||||
},
|
||||
eval: function (env) {
|
||||
if (this.value.eval) { return new tree.Alpha(this.value.eval(env)); }
|
||||
return this;
|
||||
},
|
||||
genCSS: function (env, output) {
|
||||
output.add("alpha(opacity=");
|
||||
|
||||
if (this.value.genCSS) {
|
||||
this.value.genCSS(env, output);
|
||||
} else {
|
||||
output.add(this.value);
|
||||
}
|
||||
|
||||
output.add(")");
|
||||
},
|
||||
toCSS: tree.toCSS
|
||||
};
|
||||
|
||||
})(require('../tree'));
|
||||
32
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/tree/anonymous.js
generated
vendored
Normal file
32
mongoui/mongoui-master/node_modules/derby/node_modules/less/lib/less/tree/anonymous.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
(function (tree) {
|
||||
|
||||
tree.Anonymous = function (string, index, currentFileInfo, mapLines) {
|
||||
this.value = string.value || string;
|
||||
this.index = index;
|
||||
this.mapLines = mapLines;
|
||||
this.currentFileInfo = currentFileInfo;
|
||||
};
|
||||
tree.Anonymous.prototype = {
|
||||
type: "Anonymous",
|
||||
eval: function () { return this; },
|
||||
compare: function (x) {
|
||||
if (!x.toCSS) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
var left = this.toCSS(),
|
||||
right = x.toCSS();
|
||||
|
||||
if (left === right) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return left < right ? -1 : 1;
|
||||
},
|
||||
genCSS: function (env, output) {
|
||||
output.add(this.value, this.currentFileInfo, this.index, this.mapLines);
|
||||
},
|
||||
toCSS: tree.toCSS
|
||||
};
|
||||
|
||||
})(require('../tree'));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user