mirror of
https://github.com/nasa/openmct.git
synced 2025-01-02 19:36:41 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
07c907b315
23
app.js
23
app.js
@ -14,8 +14,7 @@
|
||||
options = require('minimist')(process.argv.slice(2)),
|
||||
express = require('express'),
|
||||
app = express(),
|
||||
fs = require('fs'),
|
||||
bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
|
||||
fs = require('fs');
|
||||
|
||||
// Defaults
|
||||
options.port = options.port || options.p || 8080;
|
||||
@ -40,17 +39,19 @@
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Handle command line inclusions/exclusions
|
||||
bundles = bundles.concat(options.include);
|
||||
bundles = bundles.filter(function (bundle) {
|
||||
return options.exclude.indexOf(bundle) === -1;
|
||||
});
|
||||
bundles = bundles.filter(function (bundle, index) { // Uniquify
|
||||
return bundles.indexOf(bundle) === index;
|
||||
});
|
||||
|
||||
// Override bundles.json for HTTP requests
|
||||
app.use('/' + BUNDLE_FILE, function (req, res) {
|
||||
var bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
|
||||
|
||||
// Handle command line inclusions/exclusions
|
||||
bundles = bundles.concat(options.include);
|
||||
bundles = bundles.filter(function (bundle) {
|
||||
return options.exclude.indexOf(bundle) === -1;
|
||||
});
|
||||
bundles = bundles.filter(function (bundle, index) { // Uniquify
|
||||
return bundles.indexOf(bundle) === index;
|
||||
});
|
||||
|
||||
res.send(JSON.stringify(bundles));
|
||||
});
|
||||
|
||||
|
@ -64,7 +64,7 @@ define(
|
||||
|
||||
if (!url) {
|
||||
loaded = myCounter;
|
||||
element.css('background-image', undefined);
|
||||
element.css('background-image', 'none');
|
||||
} else {
|
||||
image = $document[0].createElement('img');
|
||||
image.src = url;
|
||||
|
@ -92,7 +92,7 @@ define(
|
||||
|
||||
expect(mockElement.css.mostRecentCall.args).toEqual([
|
||||
"background-image",
|
||||
undefined
|
||||
"none"
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user