mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 15:26:39 +00:00
0d53898af9
* Move to webpack build * Use webpack for building openmct. Move SCSS to one folder and load all core css up front. Remove bower, begin removing gulp in favor of npm run. * Uses eslint instead of jshint and jscs. Merge style checking rules into .eshintrc.js, carrying over core parts of crockford style and our adaptations. Current code base fails to pass the linter, want to separate linter changes from fixes to linting rules. * Support for Vue SFC with example * Remove outdated examples * Use HTML loader for html (supports relative imports of resources e.g. images) and raw-loader for when javascript must be loaded as text.
108 lines
4.7 KiB
JavaScript
108 lines
4.7 KiB
JavaScript
define([
|
|
"./src/ExampleStyleGuideModelProvider",
|
|
"./src/MCTExample",
|
|
"./res/templates/intro.html",
|
|
"./res/templates/standards.html",
|
|
"./res/templates/colors.html",
|
|
"./res/templates/status.html",
|
|
"./res/templates/glyphs.html",
|
|
"./res/templates/controls.html",
|
|
"./res/templates/input.html",
|
|
"./res/templates/menus.html",
|
|
'legacyRegistry'
|
|
], function (
|
|
ExampleStyleGuideModelProvider,
|
|
MCTExample,
|
|
introTemplate,
|
|
standardsTemplate,
|
|
colorsTemplate,
|
|
statusTemplate,
|
|
glyphsTemplate,
|
|
controlsTemplate,
|
|
inputTemplate,
|
|
menusTemplate,
|
|
legacyRegistry
|
|
) {
|
|
legacyRegistry.register("example/styleguide", {
|
|
"name": "Open MCT Style Guide",
|
|
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
|
"extensions":
|
|
{
|
|
"types": [
|
|
{ "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" },
|
|
{ "key": "styleguide.standards", "name": "Standards", "cssClass": "icon-page", "description": "" },
|
|
{ "key": "styleguide.colors", "name": "Colors", "cssClass": "icon-page", "description": "" },
|
|
{ "key": "styleguide.status", "name": "status", "cssClass": "icon-page", "description": "Limits, telemetry paused, etc." },
|
|
{ "key": "styleguide.glyphs", "name": "Glyphs", "cssClass": "icon-page", "description": "Glyphs overview" },
|
|
{ "key": "styleguide.controls", "name": "Controls", "cssClass": "icon-page", "description": "Buttons, selects, HTML controls" },
|
|
{ "key": "styleguide.input", "name": "Text Inputs", "cssClass": "icon-page", "description": "Various text inputs" },
|
|
{ "key": "styleguide.menus", "name": "Menus", "cssClass": "icon-page", "description": "Context menus, dropdowns" }
|
|
],
|
|
"views": [
|
|
{ "key": "styleguide.intro", "type": "styleguide.intro", "template": introTemplate, "editable": false },
|
|
{ "key": "styleguide.standards", "type": "styleguide.standards", "template": standardsTemplate, "editable": false },
|
|
{ "key": "styleguide.colors", "type": "styleguide.colors", "template": colorsTemplate, "editable": false },
|
|
{ "key": "styleguide.status", "type": "styleguide.status", "template": statusTemplate, "editable": false },
|
|
{ "key": "styleguide.glyphs", "type": "styleguide.glyphs", "template": glyphsTemplate, "editable": false },
|
|
{ "key": "styleguide.controls", "type": "styleguide.controls", "template": controlsTemplate, "editable": false },
|
|
{ "key": "styleguide.input", "type": "styleguide.input", "template": inputTemplate, "editable": false },
|
|
{ "key": "styleguide.menus", "type": "styleguide.menus", "template": menusTemplate, "editable": false }
|
|
],
|
|
"roots": [
|
|
{
|
|
"id": "styleguide:home"
|
|
}
|
|
],
|
|
"models": [
|
|
{
|
|
"id": "styleguide:home",
|
|
"priority" : "preferred",
|
|
"model": {
|
|
"type": "folder",
|
|
"name": "Style Guide Home",
|
|
"location": "ROOT",
|
|
"composition": [
|
|
"intro",
|
|
"standards",
|
|
"colors",
|
|
"status",
|
|
"glyphs",
|
|
"styleguide:ui-elements"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "styleguide:ui-elements",
|
|
"priority" : "preferred",
|
|
"model": {
|
|
"type": "folder",
|
|
"name": "UI Elements",
|
|
"location": "styleguide:home",
|
|
"composition": [
|
|
"controls",
|
|
"input",
|
|
"menus"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": [
|
|
{
|
|
"key": "mctExample",
|
|
"implementation": MCTExample
|
|
}
|
|
],
|
|
"components": [
|
|
{
|
|
"provides": "modelService",
|
|
"type": "provider",
|
|
"implementation": ExampleStyleGuideModelProvider,
|
|
"depends": [
|
|
"$q"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
});
|
|
});
|