webpack_rails 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpack_rails/ErrorMessagePlugin.js +37 -0
- data/lib/webpack_rails/engine.rb +6 -5
- data/lib/webpack_rails/node_modules/cors/CONTRIBUTING.md +35 -0
- data/lib/webpack_rails/node_modules/cors/LICENSE +9 -0
- data/lib/webpack_rails/node_modules/cors/README.md +192 -0
- data/lib/webpack_rails/node_modules/cors/lib/index.js +242 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/HISTORY.md +29 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/README.md +91 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/index.js +124 -0
- data/lib/webpack_rails/node_modules/cors/node_modules/vary/package.json +72 -0
- data/lib/webpack_rails/node_modules/cors/package.json +79 -0
- data/lib/webpack_rails/node_modules/cors/test/basic-auth.js +40 -0
- data/lib/webpack_rails/node_modules/cors/test/body-events.js +81 -0
- data/lib/webpack_rails/node_modules/cors/test/cors.js +652 -0
- data/lib/webpack_rails/node_modules/cors/test/error-response.js +77 -0
- data/lib/webpack_rails/node_modules/cors/test/example-app.js +98 -0
- data/lib/webpack_rails/node_modules/cors/test/issue-2.js +56 -0
- data/lib/webpack_rails/node_modules/cors/test/issue-31.js +58 -0
- data/lib/webpack_rails/node_modules/cors/test/mocha.opts +3 -0
- data/lib/webpack_rails/node_modules/express/History.md +3025 -0
- data/lib/webpack_rails/node_modules/express/LICENSE +24 -0
- data/lib/webpack_rails/node_modules/express/Readme.md +138 -0
- data/lib/webpack_rails/node_modules/express/index.js +11 -0
- data/lib/webpack_rails/node_modules/express/lib/application.js +643 -0
- data/lib/webpack_rails/node_modules/express/lib/express.js +103 -0
- data/lib/webpack_rails/node_modules/express/lib/middleware/init.js +36 -0
- data/lib/webpack_rails/node_modules/express/lib/middleware/query.js +51 -0
- data/lib/webpack_rails/node_modules/express/lib/request.js +489 -0
- data/lib/webpack_rails/node_modules/express/lib/response.js +1053 -0
- data/lib/webpack_rails/node_modules/express/lib/router/index.js +645 -0
- data/lib/webpack_rails/node_modules/express/lib/router/layer.js +176 -0
- data/lib/webpack_rails/node_modules/express/lib/router/route.js +210 -0
- data/lib/webpack_rails/node_modules/express/lib/utils.js +300 -0
- data/lib/webpack_rails/node_modules/express/lib/view.js +173 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/HISTORY.md +170 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/README.md +135 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/index.js +231 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md +171 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md +103 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js +188 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md +274 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json +6474 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json +84 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md +76 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE +24 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md +203 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js +62 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js +102 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js +118 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js +112 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js +179 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json +86 -0
- data/lib/webpack_rails/node_modules/express/node_modules/accepts/package.json +98 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/LICENSE +21 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/README.md +43 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/array-flatten.js +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/package.json +62 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/HISTORY.md +40 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/README.md +141 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/index.js +443 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/package.json +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/HISTORY.md +9 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/README.md +92 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/index.js +214 -0
- data/lib/webpack_rails/node_modules/express/node_modules/content-type/package.json +65 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/README.md +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/index.js +116 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie/package.json +68 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/History.md +38 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/Readme.md +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/index.js +51 -0
- data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/package.json +59 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/History.md +195 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/Makefile +36 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/Readme.md +188 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/bower.json +28 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/browser.js +168 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/component.json +19 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/debug.js +197 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node.js +209 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/History.md +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/LICENSE +20 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/README.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/index.js +125 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/package.json +47 -0
- data/lib/webpack_rails/node_modules/express/node_modules/debug/package.json +73 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/History.md +75 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/Readme.md +274 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/index.js +529 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js +33 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js +101 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/index.js +69 -0
- data/lib/webpack_rails/node_modules/express/node_modules/depd/package.json +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/Readme.md +15 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/index.js +29 -0
- data/lib/webpack_rails/node_modules/express/node_modules/escape-html/package.json +51 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/HISTORY.md +71 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/README.md +165 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/index.js +132 -0
- data/lib/webpack_rails/node_modules/express/node_modules/etag/package.json +73 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/HISTORY.md +90 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/README.md +133 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/index.js +151 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md +4 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md +43 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js +69 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json +59 -0
- data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/package.json +81 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/HISTORY.md +38 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/README.md +58 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/index.js +57 -0
- data/lib/webpack_rails/node_modules/express/node_modules/fresh/package.json +87 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/README.md +34 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/index.js +57 -0
- data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/package.json +125 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/HISTORY.md +24 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/README.md +41 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/index.js +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/methods/package.json +88 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/HISTORY.md +88 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/README.md +154 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/index.js +196 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md +80 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js +95 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/on-finished/package.json +71 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/HISTORY.md +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/LICENSE +24 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/README.md +107 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/index.js +136 -0
- data/lib/webpack_rails/node_modules/express/node_modules/parseurl/package.json +80 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/History.md +36 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/LICENSE +21 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/Readme.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/index.js +129 -0
- data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/package.json +184 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/HISTORY.md +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/README.md +137 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/index.js +345 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md +4 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md +53 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json +65 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile +18 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE +19 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md +161 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js +439 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json +60 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee +374 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee +262 -0
- data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/package.json +90 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/CHANGELOG.md +88 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/CONTRIBUTING.md +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/LICENSE +28 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/README.md +317 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/bower.json +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/index.js +15 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/parse.js +186 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/stringify.js +121 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/utils.js +190 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/package.json +56 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/test/parse.js +478 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/test/stringify.js +259 -0
- data/lib/webpack_rails/node_modules/express/node_modules/qs/test/utils.js +28 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/HISTORY.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/README.md +48 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/index.js +49 -0
- data/lib/webpack_rails/node_modules/express/node_modules/range-parser/package.json +76 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/HISTORY.md +295 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/README.md +195 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/index.js +820 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/README.md +38 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/index.js +36 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/package.json +67 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md +76 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/README.md +63 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/index.js +120 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE +16 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md +42 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json +50 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/test.js +25 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/package.json +85 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/LICENSE +19 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/README.md +90 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/build/build.js +11 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/build/test.js +57 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/cli.js +8 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/mime.js +108 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/package.json +73 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/types.json +1 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/History.md +66 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/LICENSE +20 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/README.md +35 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/index.js +125 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/package.json +47 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/README.md +114 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/codes.json +64 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/index.js +60 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/package.json +84 -0
- data/lib/webpack_rails/node_modules/express/node_modules/send/package.json +89 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/HISTORY.md +284 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/LICENSE +25 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/README.md +235 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/index.js +187 -0
- data/lib/webpack_rails/node_modules/express/node_modules/serve-static/package.json +83 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/HISTORY.md +180 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/README.md +132 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/index.js +262 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md +81 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js +270 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json +58 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md +171 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md +103 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js +188 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md +274 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json +6474 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json +84 -0
- data/lib/webpack_rails/node_modules/express/node_modules/type-is/package.json +93 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/LICENSE +20 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/README.md +34 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/index.js +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/package.json +58 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/HISTORY.md +23 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/README.md +91 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/index.js +117 -0
- data/lib/webpack_rails/node_modules/express/node_modules/vary/package.json +72 -0
- data/lib/webpack_rails/node_modules/express/package.json +167 -0
- data/lib/webpack_rails/node_modules/is-array/History.md +11 -0
- data/lib/webpack_rails/node_modules/is-array/Makefile +11 -0
- data/lib/webpack_rails/node_modules/is-array/Readme.md +27 -0
- data/lib/webpack_rails/node_modules/is-array/component.json +13 -0
- data/lib/webpack_rails/node_modules/is-array/index.js +33 -0
- data/lib/webpack_rails/node_modules/is-array/package.json +41 -0
- data/lib/webpack_rails/node_modules/is-array/test/test.html +46 -0
- data/lib/webpack_rails/node_modules/is-object/LICENSE +19 -0
- data/lib/webpack_rails/node_modules/is-object/README.md +55 -0
- data/lib/webpack_rails/node_modules/is-object/index.js +5 -0
- data/lib/webpack_rails/node_modules/is-object/package.json +91 -0
- data/lib/webpack_rails/node_modules/is-object/test/index.js +23 -0
- data/lib/webpack_rails/node_modules/is-string/CHANGELOG.md +19 -0
- data/lib/webpack_rails/node_modules/is-string/LICENSE +22 -0
- data/lib/webpack_rails/node_modules/is-string/Makefile +61 -0
- data/lib/webpack_rails/node_modules/is-string/README.md +57 -0
- data/lib/webpack_rails/node_modules/is-string/index.js +20 -0
- data/lib/webpack_rails/node_modules/is-string/package.json +93 -0
- data/lib/webpack_rails/node_modules/is-string/test.js +36 -0
- data/lib/webpack_rails/node_modules/js-string-escape/CHANGELOG.md +9 -0
- data/lib/webpack_rails/node_modules/js-string-escape/LICENSE +21 -0
- data/lib/webpack_rails/node_modules/js-string-escape/README.md +44 -0
- data/lib/webpack_rails/node_modules/js-string-escape/index.js +22 -0
- data/lib/webpack_rails/node_modules/js-string-escape/package.json +63 -0
- data/lib/webpack_rails/node_modules/js-string-escape/test/test.js +43 -0
- data/lib/webpack_rails/node_modules/strip-ansi/index.js +6 -0
- data/lib/webpack_rails/node_modules/strip-ansi/license +21 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
- data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +31 -0
- data/lib/webpack_rails/node_modules/strip-ansi/package.json +85 -0
- data/lib/webpack_rails/node_modules/strip-ansi/readme.md +33 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/README.md +109 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/client-overlay.js +35 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/client.js +131 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/README.md +15 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/client.js +30 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/index.html +18 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/package.json +14 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/server.js +41 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/webpack.config.js +22 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/helpers.js +8 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/middleware.js +83 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/History.md +20 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/License.md +19 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/Readme.md +15 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/decode.js +80 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/encode.js +64 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/index.js +4 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/package.json +96 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/common-index.js +3 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/index.js +210 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/tap-index.js +3 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/cli.js +47 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/index.js +6 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +33 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/package.json +89 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/readme.md +43 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/package.json +58 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/process-update.js +105 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/client-test.js +81 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/helpers-test.js +22 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/middleware-test.js +188 -0
- data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/mocha.opts +1 -0
- data/lib/webpack_rails/node_modules/xtend/LICENCE +19 -0
- data/lib/webpack_rails/node_modules/xtend/Makefile +4 -0
- data/lib/webpack_rails/node_modules/xtend/README.md +32 -0
- data/lib/webpack_rails/node_modules/xtend/immutable.js +17 -0
- data/lib/webpack_rails/node_modules/xtend/mutable.js +15 -0
- data/lib/webpack_rails/node_modules/xtend/package.json +88 -0
- data/lib/webpack_rails/node_modules/xtend/test.js +63 -0
- data/lib/webpack_rails/package.json +22 -0
- data/lib/webpack_rails/processor.rb +28 -9
- data/lib/webpack_rails/require_directive_processor.rb +51 -0
- data/lib/webpack_rails/sprockets_environment.rb +45 -0
- data/lib/webpack_rails/task.rb +51 -22
- data/lib/webpack_rails/webpack-task-dev-server.js +122 -0
- data/lib/webpack_rails/{webpack-task.js → webpack-task-watch.js} +0 -0
- data/lib/webpack_rails/webpack.rake +5 -5
- data/lib/webpack_rails.rb +1 -3
- metadata +346 -5
- data/lib/webpack_rails/sprockets_base_webpack.rb +0 -14
- data/lib/webpack_rails/sprockets_index_webpack.rb +0 -15
@@ -0,0 +1,284 @@
|
|
1
|
+
1.10.0 / 2015-06-17
|
2
|
+
===================
|
3
|
+
|
4
|
+
* Add `fallthrough` option
|
5
|
+
- Allows declaring this middleware is the final destination
|
6
|
+
- Provides better integration with Express patterns
|
7
|
+
* Fix reading options from options prototype
|
8
|
+
* Improve the default redirect response headers
|
9
|
+
* deps: escape-html@1.0.2
|
10
|
+
* deps: send@0.13.0
|
11
|
+
- Allow Node.js HTTP server to set `Date` response header
|
12
|
+
- Fix incorrectly removing `Content-Location` on 304 response
|
13
|
+
- Improve the default redirect response headers
|
14
|
+
- Send appropriate headers on default error response
|
15
|
+
- Use `http-errors` for standard emitted errors
|
16
|
+
- Use `statuses` instead of `http` module for status messages
|
17
|
+
- deps: escape-html@1.0.2
|
18
|
+
- deps: etag@~1.7.0
|
19
|
+
- deps: fresh@0.3.0
|
20
|
+
- deps: on-finished@~2.3.0
|
21
|
+
- perf: enable strict mode
|
22
|
+
- perf: remove unnecessary array allocations
|
23
|
+
* perf: enable strict mode
|
24
|
+
* perf: remove argument reassignment
|
25
|
+
|
26
|
+
1.9.3 / 2015-05-14
|
27
|
+
==================
|
28
|
+
|
29
|
+
* deps: send@0.12.3
|
30
|
+
- deps: debug@~2.2.0
|
31
|
+
- deps: depd@~1.0.1
|
32
|
+
- deps: etag@~1.6.0
|
33
|
+
- deps: ms@0.7.1
|
34
|
+
- deps: on-finished@~2.2.1
|
35
|
+
|
36
|
+
1.9.2 / 2015-03-14
|
37
|
+
==================
|
38
|
+
|
39
|
+
* deps: send@0.12.2
|
40
|
+
- Throw errors early for invalid `extensions` or `index` options
|
41
|
+
- deps: debug@~2.1.3
|
42
|
+
|
43
|
+
1.9.1 / 2015-02-17
|
44
|
+
==================
|
45
|
+
|
46
|
+
* deps: send@0.12.1
|
47
|
+
- Fix regression sending zero-length files
|
48
|
+
|
49
|
+
1.9.0 / 2015-02-16
|
50
|
+
==================
|
51
|
+
|
52
|
+
* deps: send@0.12.0
|
53
|
+
- Always read the stat size from the file
|
54
|
+
- Fix mutating passed-in `options`
|
55
|
+
- deps: mime@1.3.4
|
56
|
+
|
57
|
+
1.8.1 / 2015-01-20
|
58
|
+
==================
|
59
|
+
|
60
|
+
* Fix redirect loop in Node.js 0.11.14
|
61
|
+
* deps: send@0.11.1
|
62
|
+
- Fix root path disclosure
|
63
|
+
|
64
|
+
1.8.0 / 2015-01-05
|
65
|
+
==================
|
66
|
+
|
67
|
+
* deps: send@0.11.0
|
68
|
+
- deps: debug@~2.1.1
|
69
|
+
- deps: etag@~1.5.1
|
70
|
+
- deps: ms@0.7.0
|
71
|
+
- deps: on-finished@~2.2.0
|
72
|
+
|
73
|
+
1.7.2 / 2015-01-02
|
74
|
+
==================
|
75
|
+
|
76
|
+
* Fix potential open redirect when mounted at root
|
77
|
+
|
78
|
+
1.7.1 / 2014-10-22
|
79
|
+
==================
|
80
|
+
|
81
|
+
* deps: send@0.10.1
|
82
|
+
- deps: on-finished@~2.1.1
|
83
|
+
|
84
|
+
1.7.0 / 2014-10-15
|
85
|
+
==================
|
86
|
+
|
87
|
+
* deps: send@0.10.0
|
88
|
+
- deps: debug@~2.1.0
|
89
|
+
- deps: depd@~1.0.0
|
90
|
+
- deps: etag@~1.5.0
|
91
|
+
|
92
|
+
1.6.5 / 2015-02-04
|
93
|
+
==================
|
94
|
+
|
95
|
+
* Fix potential open redirect when mounted at root
|
96
|
+
- Back-ported from v1.7.2
|
97
|
+
|
98
|
+
1.6.4 / 2014-10-08
|
99
|
+
==================
|
100
|
+
|
101
|
+
* Fix redirect loop when index file serving disabled
|
102
|
+
|
103
|
+
1.6.3 / 2014-09-24
|
104
|
+
==================
|
105
|
+
|
106
|
+
* deps: send@0.9.3
|
107
|
+
- deps: etag@~1.4.0
|
108
|
+
|
109
|
+
1.6.2 / 2014-09-15
|
110
|
+
==================
|
111
|
+
|
112
|
+
* deps: send@0.9.2
|
113
|
+
- deps: depd@0.4.5
|
114
|
+
- deps: etag@~1.3.1
|
115
|
+
- deps: range-parser@~1.0.2
|
116
|
+
|
117
|
+
1.6.1 / 2014-09-07
|
118
|
+
==================
|
119
|
+
|
120
|
+
* deps: send@0.9.1
|
121
|
+
- deps: fresh@0.2.4
|
122
|
+
|
123
|
+
1.6.0 / 2014-09-07
|
124
|
+
==================
|
125
|
+
|
126
|
+
* deps: send@0.9.0
|
127
|
+
- Add `lastModified` option
|
128
|
+
- Use `etag` to generate `ETag` header
|
129
|
+
- deps: debug@~2.0.0
|
130
|
+
|
131
|
+
1.5.4 / 2014-09-04
|
132
|
+
==================
|
133
|
+
|
134
|
+
* deps: send@0.8.5
|
135
|
+
- Fix a path traversal issue when using `root`
|
136
|
+
- Fix malicious path detection for empty string path
|
137
|
+
|
138
|
+
1.5.3 / 2014-08-17
|
139
|
+
==================
|
140
|
+
|
141
|
+
* deps: send@0.8.3
|
142
|
+
|
143
|
+
1.5.2 / 2014-08-14
|
144
|
+
==================
|
145
|
+
|
146
|
+
* deps: send@0.8.2
|
147
|
+
- Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
|
148
|
+
|
149
|
+
1.5.1 / 2014-08-09
|
150
|
+
==================
|
151
|
+
|
152
|
+
* Fix parsing of weird `req.originalUrl` values
|
153
|
+
* deps: parseurl@~1.3.0
|
154
|
+
* deps: utils-merge@1.0.0
|
155
|
+
|
156
|
+
1.5.0 / 2014-08-05
|
157
|
+
==================
|
158
|
+
|
159
|
+
* deps: send@0.8.1
|
160
|
+
- Add `extensions` option
|
161
|
+
|
162
|
+
1.4.4 / 2014-08-04
|
163
|
+
==================
|
164
|
+
|
165
|
+
* deps: send@0.7.4
|
166
|
+
- Fix serving index files without root dir
|
167
|
+
|
168
|
+
1.4.3 / 2014-07-29
|
169
|
+
==================
|
170
|
+
|
171
|
+
* deps: send@0.7.3
|
172
|
+
- Fix incorrect 403 on Windows and Node.js 0.11
|
173
|
+
|
174
|
+
1.4.2 / 2014-07-27
|
175
|
+
==================
|
176
|
+
|
177
|
+
* deps: send@0.7.2
|
178
|
+
- deps: depd@0.4.4
|
179
|
+
|
180
|
+
1.4.1 / 2014-07-26
|
181
|
+
==================
|
182
|
+
|
183
|
+
* deps: send@0.7.1
|
184
|
+
- deps: depd@0.4.3
|
185
|
+
|
186
|
+
1.4.0 / 2014-07-21
|
187
|
+
==================
|
188
|
+
|
189
|
+
* deps: parseurl@~1.2.0
|
190
|
+
- Cache URLs based on original value
|
191
|
+
- Remove no-longer-needed URL mis-parse work-around
|
192
|
+
- Simplify the "fast-path" `RegExp`
|
193
|
+
* deps: send@0.7.0
|
194
|
+
- Add `dotfiles` option
|
195
|
+
- deps: debug@1.0.4
|
196
|
+
- deps: depd@0.4.2
|
197
|
+
|
198
|
+
1.3.2 / 2014-07-11
|
199
|
+
==================
|
200
|
+
|
201
|
+
* deps: send@0.6.0
|
202
|
+
- Cap `maxAge` value to 1 year
|
203
|
+
- deps: debug@1.0.3
|
204
|
+
|
205
|
+
1.3.1 / 2014-07-09
|
206
|
+
==================
|
207
|
+
|
208
|
+
* deps: parseurl@~1.1.3
|
209
|
+
- faster parsing of href-only URLs
|
210
|
+
|
211
|
+
1.3.0 / 2014-06-28
|
212
|
+
==================
|
213
|
+
|
214
|
+
* Add `setHeaders` option
|
215
|
+
* Include HTML link in redirect response
|
216
|
+
* deps: send@0.5.0
|
217
|
+
- Accept string for `maxAge` (converted by `ms`)
|
218
|
+
|
219
|
+
1.2.3 / 2014-06-11
|
220
|
+
==================
|
221
|
+
|
222
|
+
* deps: send@0.4.3
|
223
|
+
- Do not throw un-catchable error on file open race condition
|
224
|
+
- Use `escape-html` for HTML escaping
|
225
|
+
- deps: debug@1.0.2
|
226
|
+
- deps: finished@1.2.2
|
227
|
+
- deps: fresh@0.2.2
|
228
|
+
|
229
|
+
1.2.2 / 2014-06-09
|
230
|
+
==================
|
231
|
+
|
232
|
+
* deps: send@0.4.2
|
233
|
+
- fix "event emitter leak" warnings
|
234
|
+
- deps: debug@1.0.1
|
235
|
+
- deps: finished@1.2.1
|
236
|
+
|
237
|
+
1.2.1 / 2014-06-02
|
238
|
+
==================
|
239
|
+
|
240
|
+
* use `escape-html` for escaping
|
241
|
+
* deps: send@0.4.1
|
242
|
+
- Send `max-age` in `Cache-Control` in correct format
|
243
|
+
|
244
|
+
1.2.0 / 2014-05-29
|
245
|
+
==================
|
246
|
+
|
247
|
+
* deps: send@0.4.0
|
248
|
+
- Calculate ETag with md5 for reduced collisions
|
249
|
+
- Fix wrong behavior when index file matches directory
|
250
|
+
- Ignore stream errors after request ends
|
251
|
+
- Skip directories in index file search
|
252
|
+
- deps: debug@0.8.1
|
253
|
+
|
254
|
+
1.1.0 / 2014-04-24
|
255
|
+
==================
|
256
|
+
|
257
|
+
* Accept options directly to `send` module
|
258
|
+
* deps: send@0.3.0
|
259
|
+
|
260
|
+
1.0.4 / 2014-04-07
|
261
|
+
==================
|
262
|
+
|
263
|
+
* Resolve relative paths at middleware setup
|
264
|
+
* Use parseurl to parse the URL from request
|
265
|
+
|
266
|
+
1.0.3 / 2014-03-20
|
267
|
+
==================
|
268
|
+
|
269
|
+
* Do not rely on connect-like environments
|
270
|
+
|
271
|
+
1.0.2 / 2014-03-06
|
272
|
+
==================
|
273
|
+
|
274
|
+
* deps: send@0.2.0
|
275
|
+
|
276
|
+
1.0.1 / 2014-03-05
|
277
|
+
==================
|
278
|
+
|
279
|
+
* Add mime export for back-compat
|
280
|
+
|
281
|
+
1.0.0 / 2014-03-05
|
282
|
+
==================
|
283
|
+
|
284
|
+
* Genesis from `connect`
|
@@ -0,0 +1,25 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2010 Sencha Inc.
|
4
|
+
Copyright (c) 2011 LearnBoost
|
5
|
+
Copyright (c) 2011 TJ Holowaychuk
|
6
|
+
Copyright (c) 2014-2015 Douglas Christopher Wilson
|
7
|
+
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
9
|
+
a copy of this software and associated documentation files (the
|
10
|
+
'Software'), to deal in the Software without restriction, including
|
11
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
12
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
13
|
+
permit persons to whom the Software is furnished to do so, subject to
|
14
|
+
the following conditions:
|
15
|
+
|
16
|
+
The above copyright notice and this permission notice shall be
|
17
|
+
included in all copies or substantial portions of the Software.
|
18
|
+
|
19
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
20
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
22
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
23
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
24
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
25
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,235 @@
|
|
1
|
+
# serve-static
|
2
|
+
|
3
|
+
[![NPM Version][npm-image]][npm-url]
|
4
|
+
[![NPM Downloads][downloads-image]][downloads-url]
|
5
|
+
[![Linux Build][travis-image]][travis-url]
|
6
|
+
[![Windows Build][appveyor-image]][appveyor-url]
|
7
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
8
|
+
[![Gratipay][gratipay-image]][gratipay-url]
|
9
|
+
|
10
|
+
## Install
|
11
|
+
|
12
|
+
```sh
|
13
|
+
$ npm install serve-static
|
14
|
+
```
|
15
|
+
|
16
|
+
## API
|
17
|
+
|
18
|
+
```js
|
19
|
+
var serveStatic = require('serve-static')
|
20
|
+
```
|
21
|
+
|
22
|
+
### serveStatic(root, options)
|
23
|
+
|
24
|
+
Create a new middleware function to serve files from within a given root
|
25
|
+
directory. The file to serve will be determined by combining `req.url`
|
26
|
+
with the provided root directory. When a file is not found, instead of
|
27
|
+
sending a 404 response, this module will instead call `next()` to move on
|
28
|
+
to the next middleware, allowing for stacking and fall-backs.
|
29
|
+
|
30
|
+
#### Options
|
31
|
+
|
32
|
+
##### dotfiles
|
33
|
+
|
34
|
+
Set how "dotfiles" are treated when encountered. A dotfile is a file
|
35
|
+
or directory that begins with a dot ("."). Note this check is done on
|
36
|
+
the path itself without checking if the path actually exists on the
|
37
|
+
disk. If `root` is specified, only the dotfiles above the root are
|
38
|
+
checked (i.e. the root itself can be within a dotfile when set
|
39
|
+
to "deny").
|
40
|
+
|
41
|
+
The default value is `'ignore'`.
|
42
|
+
|
43
|
+
- `'allow'` No special treatment for dotfiles.
|
44
|
+
- `'deny'` Deny a request for a dotfile and 403/`next()`.
|
45
|
+
- `'ignore'` Pretend like the dotfile does not exist and 404/`next()`.
|
46
|
+
|
47
|
+
##### etag
|
48
|
+
|
49
|
+
Enable or disable etag generation, defaults to true.
|
50
|
+
|
51
|
+
##### extensions
|
52
|
+
|
53
|
+
Set file extension fallbacks. When set, if a file is not found, the given
|
54
|
+
extensions will be added to the file name and search for. The first that
|
55
|
+
exists will be served. Example: `['html', 'htm']`.
|
56
|
+
|
57
|
+
The default value is `false`.
|
58
|
+
|
59
|
+
##### fallthrough
|
60
|
+
|
61
|
+
Set the middleware to have client errors fall-through as just unhandled
|
62
|
+
requests, otherwise forward a client error. The difference is that client
|
63
|
+
errors like a bad request or a request to a non-existent file will cause
|
64
|
+
this middleware to simply `next()` to your next middleware when this value
|
65
|
+
is `true`. When this value is `false`, these errors (even 404s), will invoke
|
66
|
+
`next(err)`.
|
67
|
+
|
68
|
+
Typically `true` is desired such that multiple physical directories can be
|
69
|
+
mapped to the same web address or for routes to fill in non-existent files.
|
70
|
+
|
71
|
+
The value `false` can be used if this middleware is mounted at a path that
|
72
|
+
is designed to be strictly a single file system directory, which allows for
|
73
|
+
short-circuiting 404s for less overhead. This middleware will also reply to
|
74
|
+
all methods.
|
75
|
+
|
76
|
+
The default value is `true`.
|
77
|
+
|
78
|
+
##### index
|
79
|
+
|
80
|
+
By default this module will send "index.html" files in response to a request
|
81
|
+
on a directory. To disable this set `false` or to supply a new index pass a
|
82
|
+
string or an array in preferred order.
|
83
|
+
|
84
|
+
##### lastModified
|
85
|
+
|
86
|
+
Enable or disable `Last-Modified` header, defaults to true. Uses the file
|
87
|
+
system's last modified value.
|
88
|
+
|
89
|
+
##### maxAge
|
90
|
+
|
91
|
+
Provide a max-age in milliseconds for http caching, defaults to 0. This
|
92
|
+
can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)
|
93
|
+
module.
|
94
|
+
|
95
|
+
##### redirect
|
96
|
+
|
97
|
+
Redirect to trailing "/" when the pathname is a dir. Defaults to `true`.
|
98
|
+
|
99
|
+
##### setHeaders
|
100
|
+
|
101
|
+
Function to set custom headers on response. Alterations to the headers need to
|
102
|
+
occur synchronously. The function is called as `fn(res, path, stat)`, where
|
103
|
+
the arguments are:
|
104
|
+
|
105
|
+
- `res` the response object
|
106
|
+
- `path` the file path that is being sent
|
107
|
+
- `stat` the stat object of the file that is being sent
|
108
|
+
|
109
|
+
## Examples
|
110
|
+
|
111
|
+
### Serve files with vanilla node.js http server
|
112
|
+
|
113
|
+
```js
|
114
|
+
var finalhandler = require('finalhandler')
|
115
|
+
var http = require('http')
|
116
|
+
var serveStatic = require('serve-static')
|
117
|
+
|
118
|
+
// Serve up public/ftp folder
|
119
|
+
var serve = serveStatic('public/ftp', {'index': ['index.html', 'index.htm']})
|
120
|
+
|
121
|
+
// Create server
|
122
|
+
var server = http.createServer(function(req, res){
|
123
|
+
var done = finalhandler(req, res)
|
124
|
+
serve(req, res, done)
|
125
|
+
})
|
126
|
+
|
127
|
+
// Listen
|
128
|
+
server.listen(3000)
|
129
|
+
```
|
130
|
+
|
131
|
+
### Serve all files as downloads
|
132
|
+
|
133
|
+
```js
|
134
|
+
var contentDisposition = require('content-disposition')
|
135
|
+
var finalhandler = require('finalhandler')
|
136
|
+
var http = require('http')
|
137
|
+
var serveStatic = require('serve-static')
|
138
|
+
|
139
|
+
// Serve up public/ftp folder
|
140
|
+
var serve = serveStatic('public/ftp', {
|
141
|
+
'index': false,
|
142
|
+
'setHeaders': setHeaders
|
143
|
+
})
|
144
|
+
|
145
|
+
// Set header to force download
|
146
|
+
function setHeaders(res, path) {
|
147
|
+
res.setHeader('Content-Disposition', contentDisposition(path))
|
148
|
+
}
|
149
|
+
|
150
|
+
// Create server
|
151
|
+
var server = http.createServer(function(req, res){
|
152
|
+
var done = finalhandler(req, res)
|
153
|
+
serve(req, res, done)
|
154
|
+
})
|
155
|
+
|
156
|
+
// Listen
|
157
|
+
server.listen(3000)
|
158
|
+
```
|
159
|
+
|
160
|
+
### Serving using express
|
161
|
+
|
162
|
+
#### Simple
|
163
|
+
|
164
|
+
This is a simple example of using Express.
|
165
|
+
|
166
|
+
```js
|
167
|
+
var express = require('express')
|
168
|
+
var serveStatic = require('serve-static')
|
169
|
+
|
170
|
+
var app = express()
|
171
|
+
|
172
|
+
app.use(serveStatic('public/ftp', {'index': ['default.html', 'default.htm']}))
|
173
|
+
app.listen(3000)
|
174
|
+
```
|
175
|
+
|
176
|
+
#### Multiple roots
|
177
|
+
|
178
|
+
This example shows a simple way to search through multiple directories.
|
179
|
+
Files are look for in `public-optimized/` first, then `public/` second as
|
180
|
+
a fallback.
|
181
|
+
|
182
|
+
```js
|
183
|
+
var express = require('express')
|
184
|
+
var serveStatic = require('serve-static')
|
185
|
+
|
186
|
+
var app = express()
|
187
|
+
|
188
|
+
app.use(serveStatic(__dirname + '/public-optimized'))
|
189
|
+
app.use(serveStatic(__dirname + '/public'))
|
190
|
+
app.listen(3000)
|
191
|
+
```
|
192
|
+
|
193
|
+
#### Different settings for paths
|
194
|
+
|
195
|
+
This example shows how to set a different max age depending on the served
|
196
|
+
file type. In this example, HTML files are not cached, while everything else
|
197
|
+
is for 1 day.
|
198
|
+
|
199
|
+
```js
|
200
|
+
var express = require('express')
|
201
|
+
var serveStatic = require('serve-static')
|
202
|
+
|
203
|
+
var app = express()
|
204
|
+
|
205
|
+
app.use(serveStatic(__dirname + '/public', {
|
206
|
+
maxAge: '1d',
|
207
|
+
setHeaders: setCustomCacheControl
|
208
|
+
}))
|
209
|
+
|
210
|
+
app.listen(3000)
|
211
|
+
|
212
|
+
function setCustomCacheControl(res, path) {
|
213
|
+
if (serveStatic.mime.lookup(path) === 'text/html') {
|
214
|
+
// Custom Cache-Control for HTML files
|
215
|
+
res.setHeader('Cache-Control', 'public, max-age=0')
|
216
|
+
}
|
217
|
+
}
|
218
|
+
```
|
219
|
+
|
220
|
+
## License
|
221
|
+
|
222
|
+
[MIT](LICENSE)
|
223
|
+
|
224
|
+
[npm-image]: https://img.shields.io/npm/v/serve-static.svg
|
225
|
+
[npm-url]: https://npmjs.org/package/serve-static
|
226
|
+
[travis-image]: https://img.shields.io/travis/expressjs/serve-static/master.svg?label=linux
|
227
|
+
[travis-url]: https://travis-ci.org/expressjs/serve-static
|
228
|
+
[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-static/master.svg?label=windows
|
229
|
+
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-static
|
230
|
+
[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-static/master.svg
|
231
|
+
[coveralls-url]: https://coveralls.io/r/expressjs/serve-static
|
232
|
+
[downloads-image]: https://img.shields.io/npm/dm/serve-static.svg
|
233
|
+
[downloads-url]: https://npmjs.org/package/serve-static
|
234
|
+
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
|
235
|
+
[gratipay-url]: https://gratipay.com/dougwilson/
|