{"_id":"polymorph","_rev":"11-6c124a5da308ede3ca04e67c018b0039","name":"polymorph","description":"Connect middleware for transparence compile dev files.","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"polymorph","description":"Polymorph Node module for compile client dev files on fly, inspired by connect-assets.","version":"0.0.1","author":{"name":"Dmitry Bochkarev","email":"dimabochkarev@gmail.com"},"dependencies":{"mime":">= 1.2.2","uglify-js":">= 1.1.1","coffee-script":">= 1.1.1","jade":">= 0.17.0","stylus":">= 0.13.0"},"repository":{"type":"git","url":"git://github.com/dmitrybochkarev/Polymorph.git"},"main":"index","engines":{"node":">= 0.4.0"},"_npmUser":{"name":"dmitrybochkarev","email":"dimabochkarev@gmail.com"},"_id":"polymorph@0.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"82878f04c1e03f5f6daed6e059d4094c08db2c76","tarball":"https://registry.npmjs.org/polymorph/-/polymorph-0.0.1.tgz","integrity":"sha512-T4AbDp8Jm+ZrLMsPK3IEBvHr5PmyFdkSWUd8fZZOGMW4g/V1bjcBpQ2MUPJJ4iajLT9OO3xjl/2yaTfK+OS/rg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIktGbcVaxeryCHtWZvwFf1tTlUtGkhjy6rCV6gyVzkwIhAI21HtcDg66FlRvorq0Ebb+k55ORZa35LJENZ+98cKrA"}]},"maintainers":[{"name":"dmitrybochkarev","email":"dimabochkarev@gmail.com"}],"directories":{}},"0.0.2":{"name":"polymorph","description":"Connect middleware for transparence compile dev files.","version":"0.0.2","author":{"name":"Dmitry Bochkarev","email":"dimabochkarev@gmail.com"},"dependencies":{"mime":">= 1.2.2","uglify-js":">= 1.1.1","coffee-script":">= 1.1.1","jade":">= 0.17.0","stylus":">= 0.13.0"},"repository":{"type":"git","url":"git://github.com/dmitrybochkarev/Polymorph.git"},"main":"index","engines":{"node":">= 0.4.0"},"_npmUser":{"name":"dmitrybochkarev","email":"dimabochkarev@gmail.com"},"_id":"polymorph@0.0.2","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"973d96fead78b18ae10aaa7adcd62d6e79661750","tarball":"https://registry.npmjs.org/polymorph/-/polymorph-0.0.2.tgz","integrity":"sha512-cm9djIRHGSA05L0CvjiNb9kCQhvLNq0/Kj2Hj3IAwNKlNYfX2oyx9rV4EbRSGeCSrpDsqKoRrhluFeelN581/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRA7eriSbeAEtcvOFFJoJsNUu+Jyt0FUtQPlLB36BcCQIgJE0kw/lkFWWjTBQZ1zgLUQmqmv1jh0YiKR++AocrVOA="}]},"maintainers":[{"name":"dmitrybochkarev","email":"dimabochkarev@gmail.com"}]}},"readme":"# Polymorph\n\n__Polymorph__ [Node](http://nodejs.org) module for compile client dev files on fly, inspired by [connect-assets](http://github.com/TrevorBurnham/connect-assets).\n## Installation\n\n`npm install polymorph`\n\n## Example\n\n`server.coffee`\n\n``` coffeescript\nexpress = require 'express'\napp = express.createServer()\n\n{Polymorph, compilers} = require 'polymorph'\n\npolymorph = new Polymorph {\n  path: \"#{__dirname}/assets\"\n}\n\npolymorph.form '.html', '.jade', compilers.jade\npolymorph.form '.js', '.coffee', compilers.coffee\n# Uncomment next line for test compressed version of scripts\n# polymorph.form '.js', compilers.uglify\n\napp.use polymorph.middleware()\n\napp.listen 3000\n```\n\n`assets/index.jade`\n\n``` jade\n!!! 5\nhtml\n  head\n  body\n    h1 Jade template!\n```\n\n`assets/hello.coffee`\n\n``` coffeescript\nclass Hello\n  constructor: () ->\n    alert 'CoffeeScript'\n\nnew Hello\n```\n\nRun server `coffee server.coffee`.\n\nThen open `http://localhost:3000/index.html` in you browser.\n\n## Features\n\n- Useful for development under frameworks with dynamic class loading ([Ext](http://www.sencha.com/products/extjs/), [Batmanjs](http://batmanjs.org/))\n- Recompile only if content changed, but never sent 304 response\n\n## TODO\n\n- Refactoring sources now it is ugly\n- May be to realize able to respond 304?\n\n## License\n\nCopyright (c) 2011 Dmitry Bochkarev ([github](http://github.com/dmitrybochkarev))\n\nMIT license\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","maintainers":[{"name":"dmitrybochkarev","email":"dimabochkarev@gmail.com"}],"time":{"modified":"2022-06-24T07:14:31.970Z","created":"2011-11-17T04:30:02.473Z","0.0.1":"2011-11-17T04:30:05.538Z","0.0.2":"2011-11-25T06:11:05.813Z"},"author":{"name":"Dmitry Bochkarev","email":"dimabochkarev@gmail.com"},"repository":{"type":"git","url":"git://github.com/dmitrybochkarev/Polymorph.git"}}