0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

support setting different storage paths for different packages

fixes #35
This commit is contained in:
Alex Kocharin 2014-01-13 22:56:36 +04:00
parent dadbf3a18b
commit 6c258758c8
2 changed files with 4 additions and 2 deletions

View file

@ -23,11 +23,13 @@ uplinks:
#maxage: 120
packages:
# uncomment this for packages with "local-" prefix to be available
# uncomment this for packages with "local-" prefix to be available
# for admin only, it's a recommended way of handling private packages
#'local-*':
# allow_access: admin
# allow_publish: admin
# # you can override storage directory for a group of packages this way:
# storage: 'local_storage'
'*':
# allow all users to read packages ('all' is a keyword)

View file

@ -502,7 +502,7 @@ Storage.prototype.storage = function(package) {
Path.join(
Path.resolve(
Path.dirname(this.config.self_path),
this.config.storage
this.config.get_package_setting(package, 'storage') || this.config.storage
),
package
)