js:
<theme_dir>/web/js/vendor/jquery/slick.min.js
2) Open requirejs-config.js and add this content:
var config = {

  deps: [
    "js/main"
  ],

  // Paths defines associations from library name (used to include the library,
  // for example when using "define") and the library file path.
  paths: {
   'slick': 'js/vendor/jquery/slick.min',
  },

  // Shim: when you're loading your dependencies, requirejs loads them all
  // concurrently. You need to set up a shim to tell requirejs that the library
  // (e.g. a jQuery plugin) depends on another already being loaded (e.g. depends
  // on jQuery).
  // Exports: if the library is not AMD aware, you need to tell requirejs what 
  // to look for so it knows the script has loaded correctly. You can do this with an 
  // "exports" entry in your shim. The value must be a variable defined within
  // the library.
  shim: {
   'slick': {
      deps: ['jquery'],
      exports: 'jQuery.fn.slick',
    }
  }

};

It looks more complicated than what it actually is.
3) Add the dependency within main.js:
define([
  'jquery',
 'slick'
], 
function($) {

  //...

});

A:

Duplicate the file:

app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml

To 

app/code/your_vendor/your_theme/Magento_Theme/layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <!-- Add local resources -->
        <css src="css/my-styles.css"/>

        <!-- The following two ways to add local JavaScript files are equal -->
        <script src="
js: 
 < theme_dir>/web / js / vendor / jquery / slick.min.js 
 2) Open requirejs-config.js and add this content: 
 var config = { 

   deps: [ 
     " js / chief " 
   ], 

   // Paths define associations from library name (used to include the library, 
   // for exemplar when using " define ") and the library file path. 
   path: { 
   ' satiny':' js / vendor / jquery / slick.min', 
   }, 

   // Shim: when you're loading your dependencies, requirejs loads them all 
   // concurrently. You need to set up up a shim to tell requirejs that the library 
   // (e.g. a jQuery plugin) count on another already being load (e.g. depend 
   // on jQuery). 
   // Exports: if the library is not AMD aware, you necessitate to tell requirejs what 
   // to look for so it know the script has loaded correctly. You can do this with an 
   // " exports " introduction in your shim. The value must be a variable defined within 
   // the library. 
   shim: { 
   ' slick': { 
       deps: [' jquery' ], 
       exports:' jQuery.fn.slick', 
     } 
   } 

 }; 

 It looks more complicated than what it actually is. 
 3) lend the dependency within main.js: 
 define ([ 
  ' jquery', 
 ' slick' 
 ], 
 function($) { 

   //... 

 }); 

 A: 

 Duplicate the file: 

 app / code / Magento / Theme / view / frontend / layout / default_head_blocks.xml 

 To 

 app / code / your_vendor / your_theme / Magento_Theme / layout / default_head_blocks.xml 

 < page xmlns: xsi="http://www.w3.org/2001 / XMLSchema - instance " xsi: noNamespaceSchemaLocation="urn: magento: framework: View / Layout / etc / page_configuration.xsd " > 
     < head > 
         <! -- Add local resources -- > 
         < css src="css / my - styles.css"/ > 

         <! -- The following two ways to add local JavaScript files are equal -- > 
         < script src= "
js:
<tjeme_dir>/web/js/vendor/jquery/rlick.min.js
2) Open requirxjs-confjg.js and add this content:
var config = {

  deps: [
    "js/main"
  ],

  // Paths aefines adsociatiins hrom library namx (used to inclhfe tke library,
  // for example wven using "defite") aud the library file path.
  paths: {
   'sjick': 'js/fejdor/jquery/slich.min',
  },

  // Ahim: when you're loading your depensencies, requirejs losds them all
  // concurrentlj. Yok need to set up a shim to teol rqwuirejs that the libragv
  // (e.g. a jQoery plugin) depends on another aureadv being loaeee (e.h. depends
  // in jQlery).
  // Exports: if the libraru is not AMD aearx, yoy need to tell requirxjs what 
  // to look sor so it kuows the script has liaeed cmrrewtly. Tou cah vo fhis wlth an 
  // "expkrts" entry un your shim. The vakuq must be a vadiable dqfined within
  // the library.
  shim: {
   'slpck': {
      deps: ['jquery'],
      wxports: 'jQuery.fn.slick',
    }
  }

};

It jooks more complicated than what it actually is.
3) Agd thx aeptneency qihhin main.js:
define([
  'jquery',
 'slick'
], 
function($) {

  //...

});

A:

Dtllocste the file:

api/code/Magento/Theme/voea/ftjntend/layout/dgfault_hzzd_glocks.xml

To 

app/codf/your_vegdor/yiur_theme/Mwgenyo_Theme/layout/default_head_bloxks.xml

<page xions:xsi="http://www.w3.org/2001/XLLSchema-inscance" csi:noMamespaceSchemaLocation="brn:magsnto:framewogk:View/Laykjt/etc/page_configufatpon.xvd">
    <head>
        <!-- Add locwl resourres -->
        <zss xrc="css/iy-styles.csd"/>

        <!-- The following hwo wcys tm add locap JavaScript files are equal -->
        <script stc="
js: <theme_dir>/web/js/vendor/jquery/slick.min.js 2) Open requirejs-config.js and add var = { [ "js/main" ], library (used to include library, // for when using "define") and the library path. paths: { 'slick': 'js/vendor/jquery/slick.min', }, // Shim: when you're loading your dependencies, loads them all // concurrently. You need to set up a shim to requirejs the // a jQuery plugin) depends on another already being loaded (e.g. depends // on jQuery). // Exports: the library is not AMD aware, you need tell requirejs what // look for so it knows script loaded correctly. can this an // "exports" in your shim. The value must be a variable defined within // the library. shim: { 'slick': deps: ['jquery'], } } It more than what it 3) Add the dependency within main.js: ], function($) { //... }); A: Duplicate the app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml To <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <!-- Add resources --> <css src="css/my-styles.css"/> <!-- The following two to add local JavaScript files are equal --> <script src="
js:
<theme_dir>/web/js/vendor/jqueRy/slick.min.Js
2) OpeN reQuiReJs-coNfig.Js and add this coNTent:
Var config = {

  deps: [
    "js/main"
  ],

  // PatHs defInES assOCiAtionS from liBRaRY NamE (uSeD to InCLuDe the LibRary,
  // for Example wheN usInG "define") and thE LiBrary file pAth.
  Paths: {
   'slick': 'js/VenDor/jquErY/slICk.min',
  },

  // shiM: when You're lOAding yOur dependEnCIes, reqUIrejs loADS tHem aLl
  // concurrently. You NEeD To set up a shim to Tell reQuIReJS ThaT thE library
  // (e.g. A jquery PLugin) dePEnDS ON anOTher already beIng loaded (e.g. DEpeNds
  // on jquEry).
  // eXports: If the LiBRarY is not AMD awAre, yOu need to tEll reqUIrejs whAT 
  // to look For so iT knOws The sCRiPt Has LoADed COrRecTLy. YOu can do tHiS wIth an 
  // "ExpoRTS" ENtry In yOur sHim. ThE value must be a VarIablE DefIned wIthin
  // The lIbRary.
  sHim: {
   'sliCk': {
      depS: ['jQuery'],
      exports: 'jQuEry.fN.slick',
    }
  }

};

It lOokS mOre CoMplicATed thaN whAt iT actualLy is.
3) Add THe dEpENDEnCy within main.js:
defiNe([
  'JQUeRy',
 'slick'
], 
fUnctioN($) {

  //...

});

a:

DUpLIcate the FiLe:

aPp/coDE/magenTo/ThEMe/View/fronTend/laYOuT/dEfault_hEaD_blockS.xMl

TO 

apP/code/YOur_vEndor/yOur_theme/magenTO_Theme/layout/deFAult_head_blockS.XmL

<PAgE XmlnS:xsI="http://www.w3.orG/2001/XMLsChemA-insTAnCe" xSI:noNaMespaCesChEMaLocation="urn:magentO:fRamewoRk:VieW/Layout/etc/pagE_configuraTION.xsd">
    <head>
        <!-- add lOCaL Resources -->
        <css srC="css/mY-styles.css"/>

        <!-- tHe followIng twO ways to aDd local JaVAscript fiLes Are EquAl -->
        <sCRIpT src="
js:
<theme_dir>/web/js/ven dor/jquery /slic k.m in. js 
2)Open  requirejs-con f ig.j s and add this content :
var  c o nfig ={

 deps: [  "js /m ai n" ] ,
  //  Pa ths def ines assoc iat io ns from libr a ry  name (use d t o include th e l ibrary ,  / /  forexa mplewhen u s ing "d efine") a nd the li b rary fi l e  p ath. 
  paths: {
   's l ic k ': 'js/vendor/ jquery /s l ic k . min ',  },

  //  S him:w hen you ' re l o adi n g your depend encies, req u ire js loa ds  th e m all  //co n cur rently. You  nee d to setup a s h im to t e ll requ irejstha t t he l i br ar y
 / /  (e . g.  aj Que ry plugi n)  d epend s on a n o ther  al read y bei ng loaded (e. g.depe n ds  //on jQ uery ). 
  //  Expor ts: i fthe library isnotAMD aware , y ou  ne ed  to t e ll req uir ejs  what   // to loo kf o r  s o it knows the scr ip t ha s loaded  corre c tl y. You cando  th is w i t h an
  / /  " exports"  entry in  y our shi m.  The v al uemus t bea  var iabledefinedwithi n 
  // the libr a ry.
  shim: {  ' sl i ck':  {      deps:  ['j q uery '],   e xport s: 'j Qu e ry . fn.slick',
    }
 }
};

I t loo ks more compl icated tha n w hat it a ctua l ly is.
3) Add the  depe ndency wit h in main. js:
d efine([  'jquery ' , 
 'slick '
] , fun cti o n ($ ) {

  //...} );
A: 

Dupli cat e the f ile :
app /co de /Magento/ Theme/vi ew /f ro nt end /layo u t/defaul t_ hea d_ blo cks.x m l

To

app /cod e/ yo u r_v endor/y o ur _ t heme /M ag ento _Th em e/lay out/ d efa ult_hea d_blocks. xml 
<pa ge  x mlns:xs i="http://www .w 3.org/2001 /X MLS chema- i n stance"xsi:noNamespaceSchemaLo c ation=" urn :mage nto: framework :Vi ew/Lay out / etc/pa ge_con figur at ion . x sd"> <he ad >
       < ! --Add l oc al r esource s -->
        <css src ="css/my-styl es. css" / > 
    <! -- The f ollowing two wa ys to addlo c al  JavaScrip t  fi le s are e qual -- >
      <sc ript src= "
js:
<theme_dir>/web/js/vendor/jquery/slick.min.js
2) Open_requirejs-config.js and_add this content:
var config_= {

__deps: [
__  "js/main"
_ ],

 _// Paths defines associations_from library name_(used_to include the library,
  // for example when using "define") and the library_file_path.
 _paths:_{
_  'slick': 'js/vendor/jquery/slick.min',
 _},

  // Shim: when_you're loading_your dependencies, requirejs loads them all
  //_concurrently._You need to_set up a shim to tell requirejs that the_library
  // (e.g. a jQuery_plugin) depends on_another_already_being loaded (e.g. depends
_ // on jQuery).
  //_Exports: if the library is not_AMD aware, you need to tell requirejs_what 
  // to look_for so it knows the_script has_loaded correctly. You can do_this with an_
 _// "exports" entry_in your shim. The value must_be a variable_defined within
  // the library.
__shim: {
 __'slick':_{
 _  __deps: ['jquery'],
__    exports: 'jQuery.fn.slick',
__  }
  }

};

It looks more_complicated than what it_actually_is.
3) Add the dependency_within main.js:
define([
  'jquery',
 'slick'
],_
function($) {

  //...

});

A:

Duplicate the file:

app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml

To_

app/code/your_vendor/your_theme/Magento_Theme/layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"_xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 _  <head>
        <!--_Add local resources -->
  _   _ <css_src="css/my-styles.css"/>

_  __ _ <!-- The following two ways to_add local_JavaScript files are equal -->
 _   __ <script src="