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,85 @@
|
|
1
|
+
{
|
2
|
+
"name": "strip-ansi",
|
3
|
+
"version": "3.0.0",
|
4
|
+
"description": "Strip ANSI escape codes",
|
5
|
+
"license": "MIT",
|
6
|
+
"repository": {
|
7
|
+
"type": "git",
|
8
|
+
"url": "git+https://github.com/sindresorhus/strip-ansi.git"
|
9
|
+
},
|
10
|
+
"author": {
|
11
|
+
"name": "Sindre Sorhus",
|
12
|
+
"email": "sindresorhus@gmail.com",
|
13
|
+
"url": "sindresorhus.com"
|
14
|
+
},
|
15
|
+
"maintainers": [
|
16
|
+
{
|
17
|
+
"name": "sindresorhus",
|
18
|
+
"email": "sindresorhus@gmail.com"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "jbnicolai",
|
22
|
+
"email": "jappelman@xebia.com"
|
23
|
+
}
|
24
|
+
],
|
25
|
+
"engines": {
|
26
|
+
"node": ">=0.10.0"
|
27
|
+
},
|
28
|
+
"scripts": {
|
29
|
+
"test": "node test.js"
|
30
|
+
},
|
31
|
+
"files": [
|
32
|
+
"index.js"
|
33
|
+
],
|
34
|
+
"keywords": [
|
35
|
+
"strip",
|
36
|
+
"trim",
|
37
|
+
"remove",
|
38
|
+
"ansi",
|
39
|
+
"styles",
|
40
|
+
"color",
|
41
|
+
"colour",
|
42
|
+
"colors",
|
43
|
+
"terminal",
|
44
|
+
"console",
|
45
|
+
"string",
|
46
|
+
"tty",
|
47
|
+
"escape",
|
48
|
+
"formatting",
|
49
|
+
"rgb",
|
50
|
+
"256",
|
51
|
+
"shell",
|
52
|
+
"xterm",
|
53
|
+
"log",
|
54
|
+
"logging",
|
55
|
+
"command-line",
|
56
|
+
"text"
|
57
|
+
],
|
58
|
+
"dependencies": {
|
59
|
+
"ansi-regex": "^2.0.0"
|
60
|
+
},
|
61
|
+
"devDependencies": {
|
62
|
+
"ava": "0.0.4"
|
63
|
+
},
|
64
|
+
"gitHead": "3f05b9810e1438f946e2eb84ee854cc00b972e9e",
|
65
|
+
"bugs": {
|
66
|
+
"url": "https://github.com/sindresorhus/strip-ansi/issues"
|
67
|
+
},
|
68
|
+
"homepage": "https://github.com/sindresorhus/strip-ansi",
|
69
|
+
"_id": "strip-ansi@3.0.0",
|
70
|
+
"_shasum": "7510b665567ca914ccb5d7e072763ac968be3724",
|
71
|
+
"_from": "strip-ansi@>=3.0.0 <4.0.0",
|
72
|
+
"_npmVersion": "2.11.2",
|
73
|
+
"_nodeVersion": "0.12.5",
|
74
|
+
"_npmUser": {
|
75
|
+
"name": "sindresorhus",
|
76
|
+
"email": "sindresorhus@gmail.com"
|
77
|
+
},
|
78
|
+
"dist": {
|
79
|
+
"shasum": "7510b665567ca914ccb5d7e072763ac968be3724",
|
80
|
+
"tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz"
|
81
|
+
},
|
82
|
+
"directories": {},
|
83
|
+
"_resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz",
|
84
|
+
"readme": "ERROR: No README data found!"
|
85
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi)
|
2
|
+
|
3
|
+
> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
4
|
+
|
5
|
+
|
6
|
+
## Install
|
7
|
+
|
8
|
+
```
|
9
|
+
$ npm install --save strip-ansi
|
10
|
+
```
|
11
|
+
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```js
|
16
|
+
var stripAnsi = require('strip-ansi');
|
17
|
+
|
18
|
+
stripAnsi('\u001b[4mcake\u001b[0m');
|
19
|
+
//=> 'cake'
|
20
|
+
```
|
21
|
+
|
22
|
+
|
23
|
+
## Related
|
24
|
+
|
25
|
+
- [strip-ansi-cli](https://github.com/sindresorhus/strip-ansi-cli) - CLI for this module
|
26
|
+
- [has-ansi](https://github.com/sindresorhus/has-ansi) - Check if a string has ANSI escape codes
|
27
|
+
- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes
|
28
|
+
- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right
|
29
|
+
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Webpack Hot Middleware
|
2
|
+
|
3
|
+
Webpack hot reloading using only [webpack-dev-middleware](http://webpack.github.io/docs/webpack-dev-middleware.html). This allows you to add hot reloading into an existing server without [webpack-dev-server](http://webpack.github.io/docs/webpack-dev-server.html).
|
4
|
+
|
5
|
+
[![npm version](https://img.shields.io/npm/v/webpack-hot-middleware.svg)](https://www.npmjs.com/package/webpack-hot-middleware) [![Build Status](https://img.shields.io/travis/glenjamin/webpack-hot-middleware/master.svg)](https://travis-ci.org/glenjamin/webpack-hot-middleware) [![Coverage Status](https://coveralls.io/repos/glenjamin/webpack-hot-middleware/badge.svg?branch=master)](https://coveralls.io/r/glenjamin/webpack-hot-middleware?branch=master) ![MIT Licensed](https://img.shields.io/npm/l/webpack-hot-middleware.svg)
|
6
|
+
|
7
|
+
## Installation & Usage
|
8
|
+
|
9
|
+
See [example/](./example/) for an example of usage.
|
10
|
+
|
11
|
+
First, install the npm module.
|
12
|
+
|
13
|
+
```sh
|
14
|
+
npm install --save-dev webpack-hot-middleware
|
15
|
+
```
|
16
|
+
|
17
|
+
Next, enable hot reloading in your webpack config:
|
18
|
+
|
19
|
+
1. Add the following three plugins to the `plugins` array:
|
20
|
+
```js
|
21
|
+
plugins: [
|
22
|
+
new webpack.optimize.OccurenceOrderPlugin(),
|
23
|
+
new webpack.HotModuleReplacementPlugin(),
|
24
|
+
new webpack.NoErrorsPlugin()
|
25
|
+
]
|
26
|
+
```
|
27
|
+
Occurence ensures consistent build hashes, hot module replacement is
|
28
|
+
somewhat self-explanatory, no errors is used to handle errors more cleanly.
|
29
|
+
|
30
|
+
3. Add `'webpack-hot-middleware/client'` into the `entry` array.
|
31
|
+
This connects to the server to receive notifications when the bundle
|
32
|
+
rebuilds and then updates your client bundle accordingly.
|
33
|
+
|
34
|
+
Now add the middleware into your server:
|
35
|
+
|
36
|
+
1. Add `webpack-dev-middleware` the usual way
|
37
|
+
```js
|
38
|
+
var webpack = require('webpack');
|
39
|
+
var webpackConfig = require('./webpack.config');
|
40
|
+
var compiler = webpack(webpackConfig);
|
41
|
+
|
42
|
+
app.use(require("webpack-dev-middleware")(compiler, {
|
43
|
+
noInfo: true, publicPath: webpackConfig.output.publicPath
|
44
|
+
}));
|
45
|
+
```
|
46
|
+
|
47
|
+
2. Add `webpack-hot-middleware` attached to the same compiler instance
|
48
|
+
```js
|
49
|
+
app.use(require("webpack-hot-middleware")(compiler));
|
50
|
+
```
|
51
|
+
|
52
|
+
And you're all set!
|
53
|
+
|
54
|
+
## Changelog
|
55
|
+
|
56
|
+
### 2.0.0
|
57
|
+
|
58
|
+
**Breaking Change**
|
59
|
+
|
60
|
+
As of version 2.0.0, all client functionality has been rolled into this module. This means that you should remove any reference to `webpack/hot/dev-server` or `webpack/hot/only-dev-server` from your webpack config. Instead, use the `reload` config option to control this behaviour.
|
61
|
+
|
62
|
+
This was done to allow full control over the client receiving updates, which is now able to output full module names in the console when applying changes.
|
63
|
+
|
64
|
+
## Documentation
|
65
|
+
|
66
|
+
More to come soon, you'll have to mostly rely on the example for now.
|
67
|
+
|
68
|
+
### Config
|
69
|
+
|
70
|
+
Configuration options can be passed to the client by adding querystring parameters to the path in the webpack config.
|
71
|
+
|
72
|
+
```js
|
73
|
+
'webpack-hot-middleware/client?path=/__what&timeout=2000&overlay=false'
|
74
|
+
```
|
75
|
+
|
76
|
+
* **path** - The path which the middleware is serving the event stream on
|
77
|
+
* **timeout** - The time to wait after a disconnection before attempting to reconnect
|
78
|
+
* **overlay** - Set to `false` to disable the DOM-based client-side overlay.
|
79
|
+
* **reload** - Set to `true` to auto-reload the page when webpack gets stuck.
|
80
|
+
* **noInfo** - Set to `true` to disable informational console logging.
|
81
|
+
* **reload** - Set to `true` to disable all console logging.
|
82
|
+
|
83
|
+
## How it Works
|
84
|
+
|
85
|
+
The middleware installs itself as a webpack plugin, and listens for compiler events.
|
86
|
+
|
87
|
+
Each connected client gets a [Server Sent Events](http://www.html5rocks.com/en/tutorials/eventsource/basics/) connection, the server will publish notifications to connected clients on compiler events.
|
88
|
+
|
89
|
+
When the client receives a message, it will check to see if the local code is up to date. If it isn't up to date, it will trigger webpack hot module reloading.
|
90
|
+
|
91
|
+
## Troubleshooting
|
92
|
+
|
93
|
+
### Use on browsers without EventSource
|
94
|
+
|
95
|
+
If you want to use this module with browsers that don't support eventsource, you'll need to use a [polyfill](https://libraries.io/search?platforms=NPM&q=eventsource+polyfill). See [issue #11](https://github.com/glenjamin/webpack-hot-middleware/issues/11)
|
96
|
+
|
97
|
+
### Not receiving updates in client when using Gzip
|
98
|
+
|
99
|
+
This is because gzip generally buffers the response, but the Server Sent Events event-stream expects to be able to send data to the client immediately. You should make sure gzipping isn't being applied to the event-stream. See [issue #10](https://github.com/glenjamin/webpack-hot-middleware/issues/10).
|
100
|
+
|
101
|
+
### Use with auto-restarting servers
|
102
|
+
|
103
|
+
This module expects to remain running while you make changes to your webpack bundle, if you use a process manager like nodemon then you will likely see very slow changes on the client side. If you want to reload the server component, either use a separate process, or find a way to reload your server routes without restarting the whole process. See https://github.com/glenjamin/ultimate-hot-reloading-example for an example of one way to do this.
|
104
|
+
|
105
|
+
## License
|
106
|
+
|
107
|
+
Copyright 2015 Glen Mailer.
|
108
|
+
|
109
|
+
MIT Licened.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*eslint-env browser*/
|
2
|
+
|
3
|
+
var clientOverlay = document.createElement('div');
|
4
|
+
clientOverlay.style.display = 'none';
|
5
|
+
clientOverlay.style.background = '#fdd';
|
6
|
+
clientOverlay.style.color = '#000';
|
7
|
+
clientOverlay.style.position = 'fixed';
|
8
|
+
clientOverlay.style.zIndex = 9999;
|
9
|
+
clientOverlay.style.left = 0;
|
10
|
+
clientOverlay.style.right = 0;
|
11
|
+
clientOverlay.style.top = 0;
|
12
|
+
clientOverlay.style.bottom = 0;
|
13
|
+
clientOverlay.style.overflow = 'auto';
|
14
|
+
|
15
|
+
if (document.body) {
|
16
|
+
document.body.appendChild(clientOverlay);
|
17
|
+
}
|
18
|
+
|
19
|
+
exports.showProblems =
|
20
|
+
function showProblems(lines) {
|
21
|
+
clientOverlay.innerHTML = '';
|
22
|
+
clientOverlay.style.display = 'block';
|
23
|
+
lines.forEach(function(msg) {
|
24
|
+
var pre = document.createElement('pre');
|
25
|
+
pre.textContent = msg;
|
26
|
+
clientOverlay.appendChild(pre);
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
exports.clear =
|
31
|
+
function clear() {
|
32
|
+
clientOverlay.innerHTML = '';
|
33
|
+
clientOverlay.style.display = 'none';
|
34
|
+
};
|
35
|
+
|
@@ -0,0 +1,131 @@
|
|
1
|
+
/*eslint-env browser*/
|
2
|
+
/*global __resourceQuery*/
|
3
|
+
|
4
|
+
var options = {
|
5
|
+
path: "/__webpack_hmr",
|
6
|
+
timeout: 20 * 1000,
|
7
|
+
overlay: true,
|
8
|
+
reload: false,
|
9
|
+
log: true,
|
10
|
+
warn: true
|
11
|
+
};
|
12
|
+
if (__resourceQuery) {
|
13
|
+
var querystring = require('querystring');
|
14
|
+
var overrides = querystring.parse(__resourceQuery.slice(1));
|
15
|
+
if (overrides.path) options.path = overrides.path;
|
16
|
+
if (overrides.timeout) options.timeout = overrides.timeout;
|
17
|
+
if (overrides.overlay) options.overlay = overrides.overlay !== 'false';
|
18
|
+
if (overrides.reload) options.reload = overrides.reload !== 'false';
|
19
|
+
if (overrides.noInfo && overrides.noInfo !== 'false') {
|
20
|
+
options.log = false;
|
21
|
+
}
|
22
|
+
if (overrides.quiet && overrides.quiet !== 'false') {
|
23
|
+
options.log = false;
|
24
|
+
options.warn = false;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
if (typeof window.EventSource === 'undefined') {
|
29
|
+
console.warn(
|
30
|
+
"webpack-hot-middleware's client requires EventSource to work. " +
|
31
|
+
"You should include a polyfill if you want to support this browser: " +
|
32
|
+
"https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events#Tools"
|
33
|
+
);
|
34
|
+
} else {
|
35
|
+
connect();
|
36
|
+
}
|
37
|
+
|
38
|
+
function connect() {
|
39
|
+
var source = new window.EventSource(options.path);
|
40
|
+
var lastActivity = new Date();
|
41
|
+
|
42
|
+
source.onopen = handleOnline;
|
43
|
+
source.onmessage = handleMessage;
|
44
|
+
source.onerror = handleDisconnect;
|
45
|
+
|
46
|
+
var timer = setInterval(function() {
|
47
|
+
if ((new Date() - lastActivity) > options.timeout) {
|
48
|
+
handleDisconnect();
|
49
|
+
}
|
50
|
+
}, options.timeout / 2);
|
51
|
+
|
52
|
+
function handleOnline() {
|
53
|
+
if (options.log) console.log("[HMR] connected");
|
54
|
+
lastActivity = new Date();
|
55
|
+
}
|
56
|
+
|
57
|
+
function handleMessage(event) {
|
58
|
+
lastActivity = new Date();
|
59
|
+
if (event.data == "\uD83D\uDC93") {
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
try {
|
63
|
+
processMessage(JSON.parse(event.data));
|
64
|
+
} catch (ex) {
|
65
|
+
if (options.warn) {
|
66
|
+
console.warn("Invalid HMR message: " + event.data + "\n" + ex);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
function handleDisconnect() {
|
72
|
+
clearInterval(timer);
|
73
|
+
source.close();
|
74
|
+
setTimeout(connect, options.timeout);
|
75
|
+
}
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
var strip = require('strip-ansi');
|
80
|
+
|
81
|
+
var overlay;
|
82
|
+
if (options.overlay) {
|
83
|
+
overlay = require('./client-overlay');
|
84
|
+
}
|
85
|
+
|
86
|
+
function problems(type, obj) {
|
87
|
+
if (options.warn) console.warn("[HMR] bundle has " + type + ":");
|
88
|
+
var list = [];
|
89
|
+
obj[type].forEach(function(msg) {
|
90
|
+
var clean = strip(msg);
|
91
|
+
if (options.warn) console.warn("[HMR] " + clean);
|
92
|
+
list.push(clean);
|
93
|
+
});
|
94
|
+
if (overlay && type !== 'warnings') overlay.showProblems(list);
|
95
|
+
}
|
96
|
+
|
97
|
+
function success() {
|
98
|
+
if (overlay) overlay.clear();
|
99
|
+
}
|
100
|
+
|
101
|
+
var processUpdate = require('./process-update');
|
102
|
+
|
103
|
+
var customHandler;
|
104
|
+
function processMessage(obj) {
|
105
|
+
if (obj.action == "building") {
|
106
|
+
if (options.log) console.log("[HMR] bundle rebuilding");
|
107
|
+
} else if (obj.action == "built") {
|
108
|
+
if (options.log) console.log("[HMR] bundle rebuilt in " + obj.time + "ms");
|
109
|
+
if (obj.errors.length > 0) {
|
110
|
+
problems('errors', obj);
|
111
|
+
} else {
|
112
|
+
if (obj.warnings.length > 0) {
|
113
|
+
problems('warnings', obj);
|
114
|
+
} else {
|
115
|
+
success();
|
116
|
+
}
|
117
|
+
|
118
|
+
processUpdate(obj.hash, obj.modules, options);
|
119
|
+
}
|
120
|
+
} else if (customHandler) {
|
121
|
+
customHandler(obj);
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
if (module) {
|
126
|
+
module.exports = {
|
127
|
+
subscribe: function subscribe(handler) {
|
128
|
+
customHandler = handler;
|
129
|
+
}
|
130
|
+
};
|
131
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Webpack Hot Middleware Example
|
2
|
+
|
3
|
+
* Install deps
|
4
|
+
```sh
|
5
|
+
npm install
|
6
|
+
```
|
7
|
+
* Start server
|
8
|
+
```sh
|
9
|
+
npm start
|
10
|
+
```
|
11
|
+
* Open page in browser http://localhost:1616
|
12
|
+
* Open the developer console
|
13
|
+
* Edit `client.js` & save
|
14
|
+
* Watch the page reload
|
15
|
+
* Also try making a syntax error in `client.js`.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/* eslint-env browser */
|
2
|
+
var app = document.getElementById('app');
|
3
|
+
var time = document.getElementById('time');
|
4
|
+
|
5
|
+
var timer = setInterval(updateClock, 1000);
|
6
|
+
|
7
|
+
function updateClock() {
|
8
|
+
time.innerHTML = (new Date()).toString();
|
9
|
+
}
|
10
|
+
|
11
|
+
// Edit these styles to see them take effect immediately
|
12
|
+
app.style.display = 'table-cell';
|
13
|
+
app.style.width = '400px';
|
14
|
+
app.style.height = '400px';
|
15
|
+
app.style.border = '3px solid #339';
|
16
|
+
app.style.background = '#99d';
|
17
|
+
app.style.color = '#333';
|
18
|
+
app.style.textAlign = 'center';
|
19
|
+
app.style.verticalAlign = 'middle';
|
20
|
+
|
21
|
+
// Uncomment one of the following lines to see error handling
|
22
|
+
// require('unknown-module')
|
23
|
+
// a = /regex/q
|
24
|
+
|
25
|
+
if (module.hot) {
|
26
|
+
module.hot.accept();
|
27
|
+
module.hot.dispose(function() {
|
28
|
+
clearInterval(timer);
|
29
|
+
});
|
30
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name=viewport content="width=device-width, initial-scale=1">
|
6
|
+
<title>Webpack Hot Middleware Example</title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div id="app">
|
10
|
+
<p id="time">Date</p>
|
11
|
+
<input
|
12
|
+
type="text" size="40" style="text-align: center"
|
13
|
+
placeholder="Type something in here to prove state isn't lost"
|
14
|
+
/>
|
15
|
+
</div>
|
16
|
+
<script src="/bundle.js"></script>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "webpack-hot-middleware-example",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Example of using webpack-hot-middleware",
|
5
|
+
"author": "Glen Mailer <glen@stainlessed.co.uk>",
|
6
|
+
"license": "MIT",
|
7
|
+
"dependencies": {
|
8
|
+
"express": "^4.12.3",
|
9
|
+
"morgan": "^1.5.2",
|
10
|
+
"webpack": "^1.8.11",
|
11
|
+
"webpack-dev-middleware": "^1.0.11",
|
12
|
+
"webpack-hot-middleware": "./../"
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
var http = require('http');
|
2
|
+
|
3
|
+
var express = require('express');
|
4
|
+
|
5
|
+
var app = express();
|
6
|
+
|
7
|
+
app.use(require('morgan')('short'));
|
8
|
+
|
9
|
+
// ************************************
|
10
|
+
// This is the real meat of the example
|
11
|
+
// ************************************
|
12
|
+
(function() {
|
13
|
+
|
14
|
+
// Step 1: Create & configure a webpack compiler
|
15
|
+
var webpack = require('webpack');
|
16
|
+
var webpackConfig = require('./webpack.config');
|
17
|
+
var compiler = webpack(webpackConfig);
|
18
|
+
|
19
|
+
// Step 2: Attach the dev middleware to the compiler & the server
|
20
|
+
app.use(require("webpack-dev-middleware")(compiler, {
|
21
|
+
noInfo: true, publicPath: webpackConfig.output.publicPath
|
22
|
+
}));
|
23
|
+
|
24
|
+
// Step 3: Attach the hot middleware to the compiler & the server
|
25
|
+
app.use(require("webpack-hot-middleware")(compiler, {
|
26
|
+
log: console.log, path: '/__webpack_hmr', heartbeat: 10 * 1000
|
27
|
+
}));
|
28
|
+
})();
|
29
|
+
|
30
|
+
// Do anything you like with the rest of your express application.
|
31
|
+
|
32
|
+
app.get("/", function(req, res) {
|
33
|
+
res.sendFile(__dirname + '/index.html');
|
34
|
+
});
|
35
|
+
|
36
|
+
if (require.main === module) {
|
37
|
+
var server = http.createServer(app);
|
38
|
+
server.listen(process.env.PORT || 1616, function() {
|
39
|
+
console.log("Listening on %j", server.address());
|
40
|
+
});
|
41
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
var webpack = require('webpack');
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
context: __dirname,
|
5
|
+
entry: [
|
6
|
+
// Add the client which connects to our middleware
|
7
|
+
'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000',
|
8
|
+
// And then the actual application
|
9
|
+
'./client.js'
|
10
|
+
],
|
11
|
+
output: {
|
12
|
+
path: __dirname,
|
13
|
+
publicPath: '/',
|
14
|
+
filename: 'bundle.js'
|
15
|
+
},
|
16
|
+
devtool: '#source-map',
|
17
|
+
plugins: [
|
18
|
+
new webpack.optimize.OccurenceOrderPlugin(),
|
19
|
+
new webpack.HotModuleReplacementPlugin(),
|
20
|
+
new webpack.NoErrorsPlugin()
|
21
|
+
],
|
22
|
+
};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module.exports = webpackHotMiddleware;
|
2
|
+
|
3
|
+
var helpers = require('./helpers');
|
4
|
+
var pathMatch = helpers.pathMatch;
|
5
|
+
|
6
|
+
function webpackHotMiddleware(compiler, opts) {
|
7
|
+
opts = opts || {};
|
8
|
+
opts.log = typeof opts.log == 'undefined' ? console.log : opts.log;
|
9
|
+
opts.path = opts.path || '/__webpack_hmr';
|
10
|
+
opts.heartbeat = opts.heartbeat || 10 * 1000;
|
11
|
+
|
12
|
+
var eventStream = createEventStream(opts.heartbeat);
|
13
|
+
compiler.plugin("compile", function() {
|
14
|
+
if (opts.log) opts.log("webpack building...");
|
15
|
+
eventStream.publish({action: "building"});
|
16
|
+
});
|
17
|
+
compiler.plugin("done", function(stats) {
|
18
|
+
stats = stats.toJson();
|
19
|
+
if (opts.log) {
|
20
|
+
opts.log("webpack built " + stats.hash + " in " + stats.time + "ms");
|
21
|
+
}
|
22
|
+
eventStream.publish({
|
23
|
+
action: "built",
|
24
|
+
time: stats.time,
|
25
|
+
hash: stats.hash,
|
26
|
+
warnings: stats.warnings || [],
|
27
|
+
errors: stats.errors || [],
|
28
|
+
modules: buildModuleMap(stats.modules)
|
29
|
+
});
|
30
|
+
});
|
31
|
+
var middleware = function(req, res, next) {
|
32
|
+
if (!pathMatch(req.url, opts.path)) return next();
|
33
|
+
eventStream.handler(req, res);
|
34
|
+
};
|
35
|
+
middleware.publish = eventStream.publish;
|
36
|
+
return middleware;
|
37
|
+
}
|
38
|
+
|
39
|
+
function createEventStream(heartbeat) {
|
40
|
+
var clientId = 0;
|
41
|
+
var clients = {};
|
42
|
+
function everyClient(fn) {
|
43
|
+
Object.keys(clients).forEach(function(id) {
|
44
|
+
fn(clients[id]);
|
45
|
+
});
|
46
|
+
}
|
47
|
+
setInterval(function heartbeatTick() {
|
48
|
+
everyClient(function(client) {
|
49
|
+
client.write("data: \uD83D\uDC93\n\n");
|
50
|
+
});
|
51
|
+
}, heartbeat).unref();
|
52
|
+
return {
|
53
|
+
handler: function(req, res) {
|
54
|
+
req.socket.setKeepAlive(true);
|
55
|
+
res.writeHead(200, {
|
56
|
+
'Access-Control-Allow-Origin': '*',
|
57
|
+
'Content-Type': 'text/event-stream;charset=utf-8',
|
58
|
+
'Transfer-Encoding': 'chunked',
|
59
|
+
'Cache-Control': 'no-cache, no-transform',
|
60
|
+
'Connection': 'keep-alive'
|
61
|
+
});
|
62
|
+
res.write('\n');
|
63
|
+
var id = clientId++;
|
64
|
+
clients[id] = res;
|
65
|
+
req.on("close", function(){
|
66
|
+
delete clients[id];
|
67
|
+
});
|
68
|
+
},
|
69
|
+
publish: function(payload) {
|
70
|
+
everyClient(function(client) {
|
71
|
+
client.write("data: " + JSON.stringify(payload) + "\n\n");
|
72
|
+
});
|
73
|
+
}
|
74
|
+
};
|
75
|
+
}
|
76
|
+
|
77
|
+
function buildModuleMap(modules) {
|
78
|
+
var map = {};
|
79
|
+
modules.forEach(function(module) {
|
80
|
+
map[module.id] = module.name;
|
81
|
+
});
|
82
|
+
return map;
|
83
|
+
}
|
data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/History.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# 0.2.0 / 2013-02-21
|
2
|
+
|
3
|
+
- Refactor into function per-module idiomatic style.
|
4
|
+
- Improved test coverage.
|
5
|
+
|
6
|
+
# 0.1.0 / 2011-12-13
|
7
|
+
|
8
|
+
- Minor project reorganization
|
9
|
+
|
10
|
+
# 0.0.3 / 2011-04-16
|
11
|
+
- Support for AMD module loaders
|
12
|
+
|
13
|
+
# 0.0.2 / 2011-04-16
|
14
|
+
|
15
|
+
- Ported unit tests
|
16
|
+
- Removed functionality that depended on Buffers
|
17
|
+
|
18
|
+
# 0.0.1 / 2011-04-15
|
19
|
+
|
20
|
+
- Initial release
|
data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/License.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
Copyright 2012 Irakli Gozalishvili. All rights reserved.
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to
|
5
|
+
deal in the Software without restriction, including without limitation the
|
6
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
7
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
18
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
19
|
+
IN THE SOFTWARE.
|