{"_id":"rp-widget","_rev":"31-0cac2c0a92dd64fb167b1467de4b8d80","name":"rp-widget","description":"Templates for rp","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"rp-widget","version":"0.1.0","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.0","dist":{"shasum":"312d4cb9fbf2e60e2aced1ad73f6274cee64d0b9","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.0.tgz","integrity":"sha512-HN7qj0S8uO5OnK1BEdZGMqelGzPG5h0rYZ9I8bdNHJUhZwnBmPFeFiN0tAeqt9H3Kzw8GovM2FpFF9jE2seA8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWeidoH8UPt2x59j/ncTn3j4o5dHcTJsljhql0/oe26AiAQ4QmuFMZ+XYaFwEoWEfUExY3ysLenVKVZfSXrgrtKEQ=="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.1":{"name":"rp-widget","version":"0.1.1","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.1","dist":{"shasum":"3d2e49a4638e458174b2726a820b247c0197f35e","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.1.tgz","integrity":"sha512-iDD/MC7QrwMDBpdVyZJ7NDH413CSABB+5kxhk7Uw4DIl3dZ6mOjFMptet7rxXl2Bf30gY3DCTjGOdnfNfcbvXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB8RHPze5jrBW/5/abFy9kpkPtlJNLZa7m9WeefF/PsiAiBZ3kUIE852A5jja0VRSemoDBElamztodHSNA//Fb0GVQ=="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.2":{"name":"rp-widget","version":"0.1.2","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.2","dist":{"shasum":"20444e1641cd85ffda917747dadb88df17d3809f","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.2.tgz","integrity":"sha512-yCryxj1TIRVm/qqlABqh3dYrEJcO8mj2PMhVhN5eIK6VKZOcSsf2as8T9UcYWDE18hI/4iUwnS+DWJNO8uQCAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXmMJmFHJeZ0PCvG/XdKM4PZu0io0w5cBiHVE7Z/47SAIgQc2AQIbtDCwOu5K3kZJ6hO+MVD6/dkbUfS85lLqUn7A="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.3":{"name":"rp-widget","version":"0.1.3","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x","rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderPush.rpw rpw"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.3","dist":{"shasum":"f4770afdbb974114958905eb5a3cc70bf99ce94d","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.3.tgz","integrity":"sha512-7h5kULjR33KjkfSAt+9vWKHEM40QdYKZycxn8+DjAICeWmdtLNNcf7wx0s6WMMUWeryPAPiIufdHKDrCF6J9vA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlsAUtiv3nDnqL399bowixSe2WuurhhqEwf9CZlm6EPAiApzOHe4EEAIGfPHNxi0utZJmSmt6UtTjrNIouXnyZfqg=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.5":{"name":"rp-widget","version":"0.1.5","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderPush.rpw rpw"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.5","dist":{"shasum":"798ae0ff03be97b262f509c985dfefbad15bc8d2","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.5.tgz","integrity":"sha512-uheZha7nx8RseCbaJWiqgaq/+Wf5z7DbxhwyM01glbTtg3XH6Tt771Ms4KWTjQIAPas/IwWIl3F8rb8ELSmERA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICytpUssa1rWL4s2GQMls0lqymI0Jwqyts3MP0EX6MbXAiEA9WhJqsKtItynTVTCcojIgzuF2qXNDIao5ni5l0j/TBw="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.6":{"name":"rp-widget","version":"0.1.6","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderPush.rpw rpw"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.6","dist":{"shasum":"4ee7406ed18662390e4ab281041bdf82d05f9614","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.6.tgz","integrity":"sha512-rtOHcR3eIzskVWKUr8tGgG7laIxkjD7FY31r46SA3RCbZGTGyFzATJgsE0kZA4akiTyc2YbJUCCWUqtmrmAimQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDD3EgWKKtUjoIUJx8rdxv8ymNxhdR8C6YEI2rL//BzcAiEAttrazmBh3eCvS2qesIeQPwHWahocTKlwECxOEM4VX10="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.7":{"name":"rp-widget","version":"0.1.7","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderPush.rpw rpw"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.7","dist":{"shasum":"cab34689d25af65c97231cd60721814bb282f52a","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.7.tgz","integrity":"sha512-8Qb53yJe1bvy0ViHvkN5ER2If/PibWUdVq3J36WKT0ZG7C7VpVPOgpkBbJPpMNyQm7PfRphazR1zvJtLJtemRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYF43xwVV0o6XYJu/hXAOgM3aY/GuY6BKYyRoHrrw3IAiEA5gCXhNrH6KzHYFsJ3RlvOMYyHbs3wkcCdUwF0/+b7CE="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.8":{"name":"rp-widget","version":"0.1.8","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderFrom.rpw rpw","test":"mocha -R spec"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.8","dist":{"shasum":"717614b0d5ad2cf0d18f821b784de4cae23dd300","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.8.tgz","integrity":"sha512-jF5T1MNDZFWOmkP3O1b5gMcu5rYF8ZkArHhUQtB4Kb+4Vsc59hHNz0Bd0fpPUCLVyGESQnk/3fvDbHnCR0Py1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFQqpkpMIOEreQCYtXR7UG46qP6xgckgsrG07/dc3zOAIgb4S1CGznQamCoIZI8oO39wi0AEJ2jCB02M817/LhySE="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.9":{"name":"rp-widget","version":"0.1.9","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderFrom.rpw rpw","test":"mocha -R spec"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.9","dist":{"shasum":"66330923a5828d02b60376e82047bd33397c69f0","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.9.tgz","integrity":"sha512-cVZZOTrxu/Mx02JBdYkldZccLFnUAA1h+lMouUXNxE/OoRQRkiI36I5B//jXoYyapPjzpUl7i/943k1NNaJSYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFXw5ddjLVN1pEdf3pP/arrp0sPMJKaYKhqgCEJptWkAiEA8CuJj9bSOwE+P5HU5W/CvzLkhOyXqwfUAtwcp9xD8NQ="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.10":{"name":"rp-widget","version":"0.1.10","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","json-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderFrom.rpw rpw","test":"mocha -R spec"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.10","dist":{"shasum":"8cfb5ec9aa296504d2bcebf429996692b6ebd11e","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.10.tgz","integrity":"sha512-InLIT1hcOU4KuFWEUJmwgKTdvCHnufw+2tMbF4qXKgnse3Hm0IEhF84E5Z81ij4TqJ98WkjO+LCHVaug0DZ6qQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERFKSBN3+acbHZXMvm8ZEmQIoWfNBcx1hsgT/91HgqcAiEAiMMW1v6DBlb5yFVAgo6BEOiQYWphLimtKcSEG3pJ0ZA="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.1.11":{"name":"rp-widget","version":"0.1.11","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.1.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","json-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderFrom.rpw rpw","test":"mocha -R spec"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"_id":"rp-widget@0.1.11","dist":{"shasum":"e5946878beeba7e2fd4135c3012dfc3b3afda87f","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.1.11.tgz","integrity":"sha512-0ddHBQzOsqARhjol4gF0uM9LVABxdJz/r3/U7SUZzdNNf7p7Dfoh+pSZ71Xm705dFB40yQtNH81fh6PktgPqDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNoGdsaRJKNcfJdMWz2kxmwVuwn7QilnxtN1tr2fZVBwIhALV2MuaFq4bGa6s2BeNvxU4Hi5b49v7ialyAbHShIilb"}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.2.0":{"name":"rp-widget","version":"0.2.0","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.2.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","json-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderFrom.rpw rpw","gh-pages":"cd examples/playground && webpack -p && cd ../simple && webpack -p && cd ../todo && webpack -p && cd ../spa && webpack -p","test":"mocha -R spec"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"homepage":"https://github.com/sokra/rp-widget","_id":"rp-widget@0.2.0","dist":{"shasum":"69d4723c36f486ca165fe073d9bcff1f48caa4dc","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.2.0.tgz","integrity":"sha512-yysgEIQ/zjpoF9X2lwO5VnvX215uoS6f/HQdleTkMQsjUF5TL5SXx+FZSACKi/lbg6ZcK1xrYlJ+bCBeKoLkkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXAUZeyLrr5rBHmW/33n7SITdaEYPbCuVx17Uo+Vh/8AiEA+7Gi0+Ktb9CBcp1NBzTeILZZWB9MIXQ6RAtdQ4P2/F8="}]},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"directories":{}},"0.2.1":{"name":"rp-widget","version":"0.2.1","author":{"name":"Tobias Koppers @sokra"},"description":"Templates for rp","license":"MIT","dependencies":{"source-map":"0.1.x","loader-utils":"0.2.x"},"peerDependencies":{"rp":"0.2.x"},"devDependencies":{"mocha":"*","should":"*","style-loader":"*","css-loader":"*","json-loader":"*","file-loader":"*"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"scripts":{"prepublish":"node ./bin/rp-widget inc/If.rpw rpw && node ./bin/rp-widget inc/Switch.rpw rpw && node ./bin/rp-widget inc/RenderInto.rpw rpw && node ./bin/rp-widget inc/RenderFrom.rpw rpw","gh-pages":"cd examples/playground && webpack -p && cd ../simple && webpack -p && cd ../todo && webpack -p && cd ../spa && webpack -p","test":"mocha -R spec"},"bin":{"rp-widget":"./bin/rp-widget.js"},"loader":"./index.loader.js","main":"./lib/index.js","bugs":{"url":"https://github.com/sokra/rp-widget/issues"},"homepage":"https://github.com/sokra/rp-widget","_id":"rp-widget@0.2.1","dist":{"shasum":"1db0c3ee91fc2861f187b0085604d0b068554146","tarball":"https://registry.npmjs.org/rp-widget/-/rp-widget-0.2.1.tgz","integrity":"sha512-hDRrA6cQL+26QTkY5PJVp1VbntTdfogO2z0WWeHFCAUQohOonsWngHmNgdllHnaNbtaH8L6/cA6YDoWqF7TSGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDdZq64PP1Gy9OkghkNmnol8fGn4H8gTDpaODcCboxAAiEA8hB595aouQa7Cq0Uw4RYGldi7EUjnvhCFdbAEVRdT+8="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}]}},"readme":"# rp-widget\r\n\r\nTemplates for [rp](https://github.com/sokra/rp). WORK IN PROGRESS!\r\n\r\nThey initially render to HTML and than update to DOM when anything changed.\r\n\r\n## Usage\r\n\r\nCompile:\r\n\r\n``` sh\r\nrp-widget template.rpw\r\n```\r\n\r\nUse with some CommonJs runtime:\r\n\r\n``` javascript\r\n// choose a runtime before requiring templates\r\nvar rpWidget = require(\"rp-widget/runtime/html5\");\r\n\r\n// require the compiled template\r\nvar template = require(\"./template\");\r\n\r\n// The rp library\r\nvar rp = require(\"rp\");\r\n\r\nvar data = rp.variable([...]);\r\nvar param1 = rp.variable([...]);\r\nvar param2 = rp.const([...]);\r\n\r\nrp.atomic(function() {\r\n\t// Just call the template... It'll return a HTML string\r\n\tdocument.body.innerHTML = template(data /* main argument */, {\r\n\t\t// additional arguments\r\n\t\tparam1: param1,\r\n\t\tparam2: param2,\r\n\t\tparam3: \"Teststring\" // any argument is converted to a RP\r\n\t});\r\n\t// At the end of rp.atomic all HTML generated by templates\r\n\t//  must be part of the DOM!\r\n});\r\n```\r\n\r\n## Syntax for `RPW`\r\n\r\nJust write normal HTML with some extra stuff.\r\n\r\n``` text\r\nInline\r\n{{= data.a.b.c }} Renders a text\r\n{{{= data[\"xyz\"].b }}} Renders a html (unsafe!!)\r\n{{ data(\"p\")() + data(\"v\")() }} Renders a computed value as text\r\n{{{ data(\"p\")() + data(\"v\")() }}} Renders a computed value as html (unsafe!!)\r\n\r\nAs attributes\r\n<input value=\"Text\" disabled=true /> Const as normal\r\n<input checked=data.a.b.c /> Bind references\r\n<span style={{ \"background: \" + color() }}> Bind computed values </span>\r\n<span checked={{{ which() ? color : data(\"color\") }}}> Bind delegated values </span>\r\n<div class=\"one\" class=\"two\"> Multiple values are joined with space </div>\r\n```\r\n\r\n### Arguments and Variables\r\n\r\n``` text\r\n<#arg data default> Give the main argument a name\r\n<#arg param1> Additional arguments (required, will throw if missing)\r\n<#arg param3 default=null> Additional arguments with default value (optional)\r\n\r\n<#var items={{ [1,2,3] }}> Define a local variable (rp.variable) with initial value\r\n<#var bool=true>\r\n\r\n<#let temp={{{ items.size() }}}> Store temporary RP with <#let>\r\n\r\n<#let temp2= items filter {{ _%2==0 }} reduce {{ a+b }} plus 1> With operations\r\n```\r\n\r\n### Partials\r\n\r\nA partial is used like a HTML element but starting with a upper case letter.\r\n\r\nThey get a main argument plus multiple arguments as attributes.\r\n\r\nThe content is the main partial given the the called partial. Other partials can given by <#name> and can take an argument.\r\n\r\nYou can name the main argument given to your provided partial with \"as\" plus identifier\r\n\r\n``` text\r\n<Partial \"main argument\" param1=additional.argument param2=123.456>\r\n\tThe Partials main partial\r\n<#xyz>\r\n\tIn first additional partial\r\n<#abc \"main argument to partial\">\r\n\tIn second additional partial\r\n</Partial>\r\n```\r\n\r\nExample: The included \"If\" and \"ForEach\" partials:\r\n\r\n``` text\r\n<ul>\r\n\t<ForEach items as item>\r\n\t\t<li>\r\n\t\t\t<If item.done>\r\n\t\t\t\t<span>Item {{= item.text }} is done.</span>\r\n\t\t\t<#elseif {{ item(\"text\")().length > 0 }}>\r\n\t\t\t\t<span>{{= item.text }} need to be done.</span>\r\n\t\t\t<#else>\r\n\t\t\t\t<span style=\"background: red\">Empty item</span>\r\n\t\t\t</If>\r\n\t\t</li>\r\n\t</ForEach>\r\n</ul>\r\n```\r\n\r\nBecause some stuff is reactive it need to be wrapped in a html element.\r\n\r\n``` javascript\r\nNot allowed if x is not constant:\r\n<div>\r\n\tText\r\n\t<If x>abc</If>\r\n</div>\r\n\r\nAllowed:\r\n<div>\r\n\tText\r\n\t<span><If x>abc</If></span>\r\n</div>\r\n```\r\n\r\nThe wrapping element (`<span>`) gets a special class to identify the element and exchange the html content if x is changed.\r\n\r\n\r\n#### Using provided partials\r\n\r\n``` text\r\nThe main partial can be used a \"Partial\": <Partial />\r\n\r\n<#partial as Name> Give the main partial another name (instead of Partial)\r\n\r\n<#partial type as Name> Get the additional partial <#type> (throws if missing or multiple)\r\nAnd use it: <Name />\r\n\r\n<#partial type as Name optional> (doesn't throw if missing, but is null)\r\n<#partial type as Name default=OtherName> Defaults to another partial\r\n\r\n<#partial type as Name with value> Get the <#type> partial and the value (throws if missing or multiple)\r\n\r\n<#partials type as array>\r\n<#partials type as array>  Get all matching partials as array of {p: Partial, v: RP} (RP)\r\n\r\n<ForEach array as element>\r\n\t<#let value = element.v delegated>\r\n\t<#let partial = element.p>\r\n\t<*{{=partial}} value />\r\n</ForEach>\r\n```\r\n\r\n### Prefix\r\n\r\nAttributes of HTML elements can have a prefix, which describe the way they are handled.\r\n\r\n``` javascript\r\n<input attr:value=xyz />\r\nBind xyz to the attribute \"value\"\r\nChanged of \"value\" are not propagated to xyz\r\n\r\n<input property:indeterminate=xyz />\r\nThe \"property\" prefix bind xyz to the property\r\ninstead of the attribute\r\n\r\n<input bpc:value=xyz />\r\nThe \"bpc\" prefix bind xyz to the attribute value\r\nand the property value to xyz (bpc = on change)\r\nbpc: \"Bind Property Change\"\r\nbpku: \"Bind Property Key Up\"\r\nbpkd: \"Bind Property Key Down\"\r\nbpkp: \"Bind Property Key Press\"\r\nbpi: \"Bind Property Input\"\r\n\r\n<button on:click=someFn />\r\nThe \"on\" prefix just bind a event.\r\nThe argument should be a RP resolving to a function\r\nThe \"on\" prefix allow some special syntax for inlined functions:\r\n<button on:click={{{ xyz.increment() }}} />\r\n\r\n<div style:height=\"50px\" class:my-class=true class:other-class=x></div>\r\nShortcuts for style and class\r\n```\r\n\r\nThere are some useful defaults if you don't set the prefix. I. e. \"value\" defaults to \"bpc:value\".\r\n\r\n### `id` attribute\r\n\r\nUse the id attribute on html elements. They are bound to variables.\r\nYou can access them in your code.\r\n\r\nExample:\r\n\r\n``` text\r\n<button id=\"myButton\" on:click={{{\r\n\tmyButton === this; // Depends on runtime...\r\n\tmyButton.disabled = true;\r\n}}}>Button</button>\r\n```\r\n\r\nBut better do it this way:\r\n\r\n``` text\r\n<#var buttonDisabled=false>\r\n<button disabled=buttonDisabled on:click={{{\r\n\tbuttonDisabled.set(true);\r\n}}}>Button</button>\r\n```\r\n\r\n### `<script>`\r\n\r\nCustom code...\r\n\r\n``` javascript\r\n<script> __buf.push(\"<!!>\"); </script>\r\nRun when generating html\r\n\r\n<script load></script>\r\nRun at end of atomic. The HTML is now in the DOM.\r\n\r\n<script changed data.a.b.c></script>\r\nHandle changed (or updated, added, removed) event of RPs.\r\n\r\n<script private myFunction(a, b)></script>\r\nDefine a local function, which can be used in other scripts or handler\r\n\r\n<script public myFunction(a, b)></script>\r\nDefine a exported function, which can be used from outside too.\r\nYou need to instanciate the widgets with a \"id\" property.\r\n<Xyz id=\"abc\" /> <script> abc.myFunction(1,2); </script>\r\n\r\n<script dispose>clearTimeout(t)</script>\r\nRun when widget is no longer needed.\r\n```\r\n\r\n\r\n## Use with webpack\r\n\r\nWith webpack you don't need to compile your template. It will do it for you. Just configure the loader and the extension with:\r\n\r\n``` javascript\r\nmodule.exports = {\r\n\tmodule: {\r\n\t\tloaders: [\r\n\t\t\t{ test: /\\.rpw$/, loader: \"rp-widget\" }\r\n\t\t]\r\n\t},\r\n\tresolve: {\r\n\t\textensions: [\"\", \".webpack.js\", \".web.js\", \".rpw\", \".js\"]\r\n\t}\r\n}\r\n```\r\n\r\nAnd require the template with `require(\"./template\")`.\r\n\r\n\r\n## FAQ\r\n\r\n### Why another templating language?\r\n\r\nIt's not just a templating language, it's reactive template. The DOM will ever reflect the current value of the data. But it looks like a templating language, to atract users and be simple to use.\r\n\r\n### Why not in Jade style?\r\n\r\nrp-widget is modular (parser -AST-> (optimizer) -AST-> generator). So it possible (and planed) to make a jade style parser too.\r\n\r\n### What is the difference to React?\r\n\r\n* React can have templates inlined in javascript. rp-widget cannot do this.\r\n* React rerenders templates and compute the difference. rp-widget only renders and updates changed elements.\r\n* React and rp-widget are both declarative. React has one-way bindings, rp-widget two-way bindings.\r\n\r\n#### Hello World\r\n\r\n``` javascript\r\n/** @jsx React.DOM */\r\nvar HelloMessage = React.createClass({\r\n  render: function() {\r\n    return <div>{'Hello ' + this.props.name}</div>;\r\n  }\r\n});\r\n```\r\n\r\n``` xml\r\n<#arg name>\r\n<div>Hello {{= name }}</div>\r\n```\r\n\r\n#### TODO App\r\n\r\n``` javascript\r\n/** @jsx React.DOM */\r\nvar TodoList = React.createClass({\r\n  render: function() {\r\n    var createItem = function(itemText) {\r\n      return <li>{itemText}</li>;\r\n    };\r\n    return <ul>{this.props.items.map(createItem)}</ul>;\r\n  }\r\n});\r\nvar TodoApp = React.createClass({\r\n  getInitialState: function() {\r\n    return {items: [], text: ''};\r\n  },\r\n  onChange: function(e) {\r\n    this.setState({text: e.target.value});\r\n  },\r\n  handleSubmit: function(e) {\r\n    e.preventDefault();\r\n    var nextItems = this.state.items.concat([this.state.text]);\r\n    var nextText = '';\r\n    this.setState({items: nextItems, text: nextText});\r\n  },\r\n  render: function() {\r\n    return (\r\n      <div>\r\n        <h3>TODO</h3>\r\n        <TodoList items={this.state.items} />\r\n        <form onSubmit={this.handleSubmit}>\r\n          <input onChange={this.onChange} value={this.state.text} />\r\n          <button>{'Add #' + (this.state.items.length + 1)}</button>\r\n        </form>\r\n      </div>\r\n    );\r\n  }\r\n});\r\n```\r\n\r\n``` xml\r\n<#define TodoList>\r\n\t<#arg items>\r\n\t<ul>\r\n\t\t<ForEach items as item>\r\n\t\t\t<li>{{= item }}</li>\r\n\t\t</ForEach>\r\n\t</ul>\r\n</define>\r\n<#var items = {{ [] }}>\r\n<#var text = \"\">\r\n<div>\r\n\t<h3>TODO</h3>\r\n\t<TodoList items=items />\r\n\t<form on:submit={{{\r\n\t\tevent.preventDefault();\r\n\t\titems.push(text());\r\n\t\ttext.set(\"\");\r\n\t}}}>\r\n\t\t<input value=text />\r\n\t\t<#let nextNum = items size plus 1>\r\n\t\t<button>Add #{{= nextNum }}</button>\r\n\t</form>\r\n</div>\r\n```\r\n\r\n# TODO\r\n\r\n* More included Widgets\r\n* parse basic expressions in attributes `<a href=\"xyz\"+data.x>`\r\n* remove whitespace when appropriate\r\n* optimize the resulting AST\r\n\r\n\r\n# License\r\n\r\nMIT\r\n","maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"time":{"modified":"2022-06-26T14:24:34.057Z","created":"2013-08-15T11:56:34.852Z","0.1.0":"2013-08-15T11:56:40.646Z","0.1.1":"2013-08-16T14:40:00.498Z","0.1.2":"2013-10-08T13:12:39.197Z","0.1.3":"2013-10-10T12:59:44.412Z","0.1.5":"2013-10-10T14:11:31.299Z","0.1.6":"2013-10-17T09:13:54.030Z","0.1.7":"2013-10-24T07:38:24.477Z","0.1.8":"2013-10-24T10:25:51.969Z","0.1.9":"2013-11-14T08:47:13.881Z","0.1.10":"2013-11-14T12:06:47.997Z","0.1.11":"2013-11-28T18:03:01.230Z","0.2.0":"2014-01-22T15:34:02.374Z","0.2.1":"2014-02-05T12:30:57.905Z"},"author":{"name":"Tobias Koppers @sokra"},"repository":{"type":"git","url":"https://github.com/sokra/rp-widget.git"},"readmeFilename":"README.md"}