In our recipe, we added the third-party library through a local copy of the code, inside the module. This approach, however, makes it difficult to reuse the same library in another module. The other module would have to declare a dependency on the module providing the library or define its own copy, and two versions of AngularJS would have been loaded on the page.
A leading practice is to place a libraries directory in the Drupal docroot (alongside modules and themes.) An example can be found in the DropzoneJS integration module:
dropzonejs:
title: 'Dropzonejs'
website: http://www.dropzonejs.com
version: 4.0.1
license:
name: MIT
url: https://github.com/enyo/dropzone/blob/master/LICENSE
gpl-compatible: true
js:
/libraries/dropzone/dist/min/dropzone.min.js: {}
css:
component:
/libraries/dropzone/dist/min/dropzone.min.css: {}
This pattern would allow any module to load the library through this path. Its author recommends that you have a base module that defines the library and simple integration and always make that a dependency.