View Single Post
  #5   Spotlight this post!  
Unread 14-09-2016, 09:43
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 312
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Full release of FRC Dashboard

Welcome to software design! Where you try to make sure to retain features while nailing things down into a concrete framework.

You can create an add-ons folder, and within that a folder for each add-on you want to load. In each add-on folder you put an html file with the add-on snippet, a css file, and a js file with the code.
Each js file could look like this
Code:
module.exports = {
   name: "MyAddon",
   tag: "my-addon",
   init: function(htmlNode, etc) {
        // js code here
   }
}
Then you could have some custom tags that people can add in their html
Code:
<!-- other dash stuff -->
<my-addon></my-addon>
and you can scan for these custom tags and if one matches an addon's tag, replace it with the addon (inject the html and css, then require() and call init)

Just an idea
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote