How to specify what happens when button is pressed

Re: How to specify what happens when button is pressed

by Lloyd D -
Number of replies: 0

Hi Mark. Ok got it, thanks for that. Would you mind in just explaining what I should do after installing and running Grunt.. The guide in 'Javascript Modules' says this:

javascript module

I'm quite confused by this..So I'd create the directory myplugin/amd/src? Then store my javascript file, myplugin.js in there? Would I also have to manually create the directory myplugin/amd/build? I don't understand when it says "After running grunt = the minified javascript files are stored...." Is this process done automatically? I'm not sure what grunt actually does.. I've read up about it and it still doesn't make sense to me sad Am I right in saying that after creating the files myplugin.js and myplugin.min.js I can then call the function in my plugin php script with what you described, $PAGE->requires->js_call_amd()?