diff --git a/lib/importmap/commands.rb b/lib/importmap/commands.rb index 350cc42..d5a6833 100644 --- a/lib/importmap/commands.rb +++ b/lib/importmap/commands.rb @@ -46,6 +46,13 @@ def unpin(*packages) end end + desc "redownload", "Force download every package, even if the required versions are already downloaded" + def redownload + packages = npm.packages_with_versions.map { |package| package.join("@") } + + pin packages + end + desc "json", "Show the full importmap in json" def json require Rails.root.join("config/environment")