prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  NPM_FILE_PATTERNS - collectstatic failing on Windows
  MyTardis currently uses `django-npm` to collect static content which has been npm installed into the `node_modules/` folder.
  
  Because we don't necessarily want to copy everything from `node_modules/` when running `collectstatic`, MyTardis uses django-npm's `NPM_FILE_PATTERNS` setting in `tardis/default_settings/static_files.py`
  
  See: https://github.com/kevin1024/django-npm#configuration
  
  It can be used like this:
  
  ```
  NPM_FILE_PATTERNS = {
      'jquery': ['*'],
      'jquery-migrate': ['*'],
  }
  ```
  
  to copy everything within `node_modules/jquery/` and everything within `node_modules/jquery-migrate/` into the static folder written to by `collectstatic`.
  
  If you only want `collectstatic` to copy a subset of the files in the node_modules folder, `django-npm` provides the ability to use glob patterns like this:
  
  ```
  NPM_FILE_PATTERNS = {
      'bootstrap': ['dist/*'],
      'font-awesome': ['css/*', 'fonts/*'],
  }
  ```
  
  However, these glob patterns don't seem to work on Windows, i.e. nothing is copied from the `node_modules` folders which have glob patterns more complex than `['*']`, see: https://github.com/kevin1024/django-npm/issues/15
  
  A workaround (when running MyTardis's `collectstatic` on Windows) is to redefine `NPM_FILE_PATTERNS` in your `tardis/settings.py`, and just use the `['*']` pattern for every node module you want to be copied by `collectstatic`.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `tardis/default_settings/static_files.py`
  Content:
  ```
  1 from os import path
  2 from .storage import DEFAULT_STORAGE_BASE_DIR
  3 
  4 # Absolute path to the directory that holds media.
  5 # Example: "/home/media/media.lawrence.com/"
  6 MEDIA_ROOT = DEFAULT_STORAGE_BASE_DIR
  7 
  8 # Used by "django collectstatic"
  9 STATIC_ROOT = path.abspath(path.join(path.dirname(__file__), '../..', 'static'))
  10 
  11 # Use cachable copies of static files
  12 STATICFILES_STORAGE = \
  13     'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
  14 
  15 STATICFILES_FINDERS = (
  16     'django.contrib.staticfiles.finders.FileSystemFinder',
  17     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  18     'npm.finders.NpmFinder',
  19 )
  20 
  21 # django-npm settings:
  22 NPM_ROOT_PATH = path.abspath(path.join(path.dirname(__file__), '../..'))
  23 
  24 # If you have run "npm install", rather than "npm install --production",
  25 # you will get a lot of devDependencies installed in node_modules/ which
  26 # are only needed for development/testing (e.g. "npm test") and don't
  27 # need to be copied when running collectstatic.  NPM_FILE_PATTERNS
  28 # specifies the folders within node_modules/ which do need to be copied:
  29 NPM_FILE_PATTERNS = {
  30     'angular': ['*'],
  31     'angular-resource': ['*'],
  32     'backbone': ['*'],
  33     'backbone-forms': ['*'],
  34     'blueimp-file-upload': ['*'],
  35     'bootstrap': ['dist/*'],
  36     'bootstrap-3-typeahead': ['*'],
  37     'clipboard': ['*'],
  38     'font-awesome': ['css/*', 'fonts/*'],
  39     'jquery': ['*'],
  40     'jquery-migrate': ['*'],
  41     'jquery-ui-dist': ['jquery-ui.min.js'],
  42     'mustache': ['mustache.min.js'],
  43     'ng-dialog': ['*'],
  44     'sprintf-js': ['dist/*'],
  45     'underscore': ['*'],
  46     'underscore.string': ['dist/*']
  47 }
  48
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/tardis/default_settings/static_files.py b/tardis/default_settings/static_files.py
  --- a/tardis/default_settings/static_files.py
  +++ b/tardis/default_settings/static_files.py
  @@ -32,16 +32,16 @@
       'backbone': ['*'],
       'backbone-forms': ['*'],
       'blueimp-file-upload': ['*'],
  -    'bootstrap': ['dist/*'],
  +    'bootstrap': ['*'],
       'bootstrap-3-typeahead': ['*'],
       'clipboard': ['*'],
  -    'font-awesome': ['css/*', 'fonts/*'],
  +    'font-awesome': ['*'],
       'jquery': ['*'],
       'jquery-migrate': ['*'],
       'jquery-ui-dist': ['jquery-ui.min.js'],
       'mustache': ['mustache.min.js'],
       'ng-dialog': ['*'],
  -    'sprintf-js': ['dist/*'],
  +    'sprintf-js': ['*'],
       'underscore': ['*'],
  -    'underscore.string': ['dist/*']
  +    'underscore.string': ['*']
   }
  
verification_info: {"golden_diff": "diff --git a/tardis/default_settings/static_files.py b/tardis/default_settings/static_files.py\n--- a/tardis/default_settings/static_files.py\n+++ b/tardis/default_settings/static_files.py\n@@ -32,16 +32,16 @@\n     'backbone': ['*'],\n     'backbone-forms': ['*'],\n     'blueimp-file-upload': ['*'],\n-    'bootstrap': ['dist/*'],\n+    'bootstrap': ['*'],\n     'bootstrap-3-typeahead': ['*'],\n     'clipboard': ['*'],\n-    'font-awesome': ['css/*', 'fonts/*'],\n+    'font-awesome': ['*'],\n     'jquery': ['*'],\n     'jquery-migrate': ['*'],\n     'jquery-ui-dist': ['jquery-ui.min.js'],\n     'mustache': ['mustache.min.js'],\n     'ng-dialog': ['*'],\n-    'sprintf-js': ['dist/*'],\n+    'sprintf-js': ['*'],\n     'underscore': ['*'],\n-    'underscore.string': ['dist/*']\n+    'underscore.string': ['*']\n }\n", "issue": "NPM_FILE_PATTERNS - collectstatic failing on Windows\nMyTardis currently uses `django-npm` to collect static content which has been npm installed into the `node_modules/` folder.\r\n\r\nBecause we don't necessarily want to copy everything from `node_modules/` when running `collectstatic`, MyTardis uses django-npm's `NPM_FILE_PATTERNS` setting in `tardis/default_settings/static_files.py`\r\n\r\nSee: https://github.com/kevin1024/django-npm#configuration\r\n\r\nIt can be used like this:\r\n\r\n```\r\nNPM_FILE_PATTERNS = {\r\n    'jquery': ['*'],\r\n    'jquery-migrate': ['*'],\r\n}\r\n```\r\n\r\nto copy everything within `node_modules/jquery/` and everything within `node_modules/jquery-migrate/` into the static folder written to by `collectstatic`.\r\n\r\nIf you only want `collectstatic` to copy a subset of the files in the node_modules folder, `django-npm` provides the ability to use glob patterns like this:\r\n\r\n```\r\nNPM_FILE_PATTERNS = {\r\n    'bootstrap': ['dist/*'],\r\n    'font-awesome': ['css/*', 'fonts/*'],\r\n}\r\n```\r\n\r\nHowever, these glob patterns don't seem to work on Windows, i.e. nothing is copied from the `node_modules` folders which have glob patterns more complex than `['*']`, see: https://github.com/kevin1024/django-npm/issues/15\r\n\r\nA workaround (when running MyTardis's `collectstatic` on Windows) is to redefine `NPM_FILE_PATTERNS` in your `tardis/settings.py`, and just use the `['*']` pattern for every node module you want to be copied by `collectstatic`.\n", "before_files": [{"content": "from os import path\nfrom .storage import DEFAULT_STORAGE_BASE_DIR\n\n# Absolute path to the directory that holds media.\n# Example: \"/home/media/media.lawrence.com/\"\nMEDIA_ROOT = DEFAULT_STORAGE_BASE_DIR\n\n# Used by \"django collectstatic\"\nSTATIC_ROOT = path.abspath(path.join(path.dirname(__file__), '../..', 'static'))\n\n# Use cachable copies of static files\nSTATICFILES_STORAGE = \\\n    'django.contrib.staticfiles.storage.CachedStaticFilesStorage'\n\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    'npm.finders.NpmFinder',\n)\n\n# django-npm settings:\nNPM_ROOT_PATH = path.abspath(path.join(path.dirname(__file__), '../..'))\n\n# If you have run \"npm install\", rather than \"npm install --production\",\n# you will get a lot of devDependencies installed in node_modules/ which\n# are only needed for development/testing (e.g. \"npm test\") and don't\n# need to be copied when running collectstatic.  NPM_FILE_PATTERNS\n# specifies the folders within node_modules/ which do need to be copied:\nNPM_FILE_PATTERNS = {\n    'angular': ['*'],\n    'angular-resource': ['*'],\n    'backbone': ['*'],\n    'backbone-forms': ['*'],\n    'blueimp-file-upload': ['*'],\n    'bootstrap': ['dist/*'],\n    'bootstrap-3-typeahead': ['*'],\n    'clipboard': ['*'],\n    'font-awesome': ['css/*', 'fonts/*'],\n    'jquery': ['*'],\n    'jquery-migrate': ['*'],\n    'jquery-ui-dist': ['jquery-ui.min.js'],\n    'mustache': ['mustache.min.js'],\n    'ng-dialog': ['*'],\n    'sprintf-js': ['dist/*'],\n    'underscore': ['*'],\n    'underscore.string': ['dist/*']\n}\n", "path": "tardis/default_settings/static_files.py"}], "after_files": [{"content": "from os import path\nfrom .storage import DEFAULT_STORAGE_BASE_DIR\n\n# Absolute path to the directory that holds media.\n# Example: \"/home/media/media.lawrence.com/\"\nMEDIA_ROOT = DEFAULT_STORAGE_BASE_DIR\n\n# Used by \"django collectstatic\"\nSTATIC_ROOT = path.abspath(path.join(path.dirname(__file__), '../..', 'static'))\n\n# Use cachable copies of static files\nSTATICFILES_STORAGE = \\\n    'django.contrib.staticfiles.storage.CachedStaticFilesStorage'\n\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    'npm.finders.NpmFinder',\n)\n\n# django-npm settings:\nNPM_ROOT_PATH = path.abspath(path.join(path.dirname(__file__), '../..'))\n\n# If you have run \"npm install\", rather than \"npm install --production\",\n# you will get a lot of devDependencies installed in node_modules/ which\n# are only needed for development/testing (e.g. \"npm test\") and don't\n# need to be copied when running collectstatic.  NPM_FILE_PATTERNS\n# specifies the folders within node_modules/ which do need to be copied:\nNPM_FILE_PATTERNS = {\n    'angular': ['*'],\n    'angular-resource': ['*'],\n    'backbone': ['*'],\n    'backbone-forms': ['*'],\n    'blueimp-file-upload': ['*'],\n    'bootstrap': ['*'],\n    'bootstrap-3-typeahead': ['*'],\n    'clipboard': ['*'],\n    'font-awesome': ['*'],\n    'jquery': ['*'],\n    'jquery-migrate': ['*'],\n    'jquery-ui-dist': ['jquery-ui.min.js'],\n    'mustache': ['mustache.min.js'],\n    'ng-dialog': ['*'],\n    'sprintf-js': ['*'],\n    'underscore': ['*'],\n    'underscore.string': ['*']\n}\n", "path": "tardis/default_settings/static_files.py"}]}