I am really struggling to convert my non require CDE dashboards to require ones. Mainly with third party plugins.

Say I have some minified code in this format, which i am loading from file system rather than in-line in CDE:

function _init(){"use strict";$.AdminPage.layout={activate:function(){var a=this;a.fix............})})}}(jQuery);
Then do i just need to wrap this in the following?

require(['cdf/lib/jquery'], function($) { .... }
I keep getting jquery conflicts and imagine it is the way they use jQuery in the plugin and CDE uses $ ?? But I cannot work out how to resolve it at all.

Also if this code uses another plugin within its code, am I correct that I need to reference the other plugin in the array to begin with? Here i struggle with the correct naming to use once i specify the path in the array. E.g. if i do:

require(['cdf/lib/jquery', 'public/dashboard/plugins/slimScroll.min.js'], function($,slimScroll) { // rest of my code // }
It doesnt seem to work.

Could anybody confirm the first part for me and shine a light on where I am going wrong with the second part.

Thanks in advance.