Modules actually work with Vanilla Javascript

Found out on Nov14th, 2020 testing MQTT using javascript
  • ../js-mqtt/testmqtt.html Testing mqtt using javascript
  • ../js-mqtt/js-mtt-websockets-demo/index.html Another Testing mqtt using javascript
  • ../js-mqtt/testAnyMQTT.html.html Any MQTT . . Main Mozilla Github about Modules in Javascript at https://github.com/mdn/js-examples

  • basic-modules Simple example that demonstrates module basics, including default exports Code here
  • classes Provides an example of importing a class from a module Code here
  • dynamic-module-imports Demonstrates dynamic module loading using import().then() Code here
  • module-aggregationShows how sub module features can be aggregated into a parent module using export { x } from 'y.js' syntax Code here
  • module-objects Shows how to import an entire module as an object using import * as x from 'y.js' syntax Code here
  • renamingShows how exports can be renamed to avoid conflicts, using x as y syntax Code here

    My Examples that I could actually use

  • myTest I like putting my Javascript into a single file for students. That way they just need to download one file and everything is with in that file. Huge help Code here
  • myScriptTag I also use script tags a lot, this tests one index.html file that then loads script tags and potentailly renames the modules if needed Code here

    The trick for much of this is the script tag
      
         <script type="module">
             import { create as canvasCreate, createReportList } from 'https://hpssjellis.github.io/js-examples/modules/basic-modules/modules/canvas.js';
    
        </script>
      
    
    
    # Github.js research
  • ../github-js/index.html So this is just testing trying to use javascript to access Github