Simple extension

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tzn1
    Junior Member
    • Dec 2018
    • 11

    Simple extension

    I would like to create a simple extension where I can put some simple javascript code that will run on page load.

    How to create the folder structure for it?

    I currently put my file here:
    files/client/modules/mymodulename/lib/mylib.js

    And configured here to load it up:
    files/application/Espo/Modules/mymodulename/Resources/metadata/app/jsLibs.json

    mylib.js contains only this just to test it out:

    (function () {
    alert("hello");
    })();

    And the jsLibs.json contains this:
    {
    "mymodulename": {
    "path": "client/modules/mymodulename/lib/mylib.js",
    "exportsTo": "$",
    "exportsAs": "mymodulename"
    }
    }

    It is not working. is there any way to make this work so the page will alert upon load?

    TN
Working...