[Build] Modify version info injection to fix sourcemaps (#1708)

* [Build] Preserve comments instead of adding header

...to avoid disrupting sourcemaps. Fixes #1707

[Build] Remove extraneous horizontal rule from header

[Build] Remove obsolete header-handling

...as this is handled by the replace task after fix for #1707

[Build] Move version headers into start.frag

...so that UMD boilerplate does not wrap it.

[Build] Handle version info entirely in start.frag

[Build] Replace build variables in start.frag explicitly

[Build] Inject build info dynamically

[Build] Test MCT.specifyBuildInfo

[Build] Mark BUILD_CONSTANTS as global for jshint

[Build] Give names to version line items

[Build] Fix specifyBuildInfo test case

* [Build] Update fix to sourcemaps for code review feedback

https://github.com/nasa/openmct/pull/1708

[Build] Move build info registration to plugin

https://github.com/nasa/openmct/pull/1708#discussion_r138999027

[Build] Use build info plugin

...instead of specifyBuildInfo

[Build] Revert changes to MCT, per code review
This commit is contained in:
Victor Woeltjen
2017-09-20 11:50:17 -07:00
committed by Pete Richards
parent e66f818996
commit a3a55d3b48
8 changed files with 131 additions and 51 deletions

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global requirejs*/
/*global requirejs,BUILD_CONSTANTS*/
requirejs.config({
"paths": {
@ -91,12 +91,17 @@ requirejs.config({
define([
'./platform/framework/src/Main',
'./src/defaultRegistry',
'./src/MCT'
], function (Main, defaultRegistry, MCT) {
'./src/MCT',
'./src/plugins/buildInfo/plugin'
], function (Main, defaultRegistry, MCT, buildInfo) {
var openmct = new MCT();
openmct.legacyRegistry = defaultRegistry;
if (typeof BUILD_CONSTANTS !== 'undefined') {
openmct.install(buildInfo(BUILD_CONSTANTS));
}
openmct.on('start', function () {
return new Main().run(defaultRegistry);
});