v1.0.1: rename as per npm policy
This commit is contained in:
		
							parent
							
								
									e52a074e66
								
							
						
					
					
						commit
						33c89f136e
					
				| @ -1,15 +1,15 @@ | ||||
| serve-tpl-download | ||||
| serve-tpl-attachment | ||||
| ================== | ||||
| 
 | ||||
| A fork of the original `serve-index` template that, in combination with `serve-static`, | ||||
| provides support for direct file downloads. | ||||
| provides support for direct file downloads (using the Content-Disposition attachment header). | ||||
| 
 | ||||
| ```js | ||||
| var express = require('express'); | ||||
| var app = express(); | ||||
| 
 | ||||
| var serveIndex = require('serve-index'); | ||||
| var serveTpl = require('serve-tpl-download'); | ||||
| var serveTpl = require('serve-tpl-attachment'); | ||||
| var serveDirs = serveIndex({ template: serveTpl() }); | ||||
| 
 | ||||
| app.use('/', function (req, res, next) { | ||||
| @ -37,7 +37,7 @@ For example, this would prevent files in a `~/.ssh` from being read even when `d | ||||
| `{ privatefiles: 'ignore' }` | ||||
| 
 | ||||
| ```js | ||||
| var serveTpl = require('serve-tpl-download'); | ||||
| var serveTpl = require('serve-tpl-attachment'); | ||||
| 
 | ||||
| var serveTemplate = serveTpl({ privatefiles: 'ignore' }) | ||||
| ``` | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "serve-tpl-download", | ||||
|   "version": "1.0.0", | ||||
|   "name": "serve-tpl-attachment", | ||||
|   "version": "1.0.1", | ||||
|   "description": "A template for serve-static with a direct download option (requires serve-index)", | ||||
|   "homepage": "https://git.coolaj86.com/coolaj86/serve-tpl-download.js", | ||||
|   "main": "index.js", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user