{"_id":"amp-toolbox-optimizer","_rev":"24-0dc8e2619f6cf2693acc2a62a0e614e3","name":"amp-toolbox-optimizer","description":"Server-side rendering for AMPs.","dist-tags":{"latest":"1.2.0-alpha.3","canary":"1.2.0-alpha.1"},"versions":{"0.1.0":{"name":"amp-toolbox-optimizer","version":"0.1.0","description":"Server-side rendering for AMPs.","main":"index.js","scripts":{"test":"jasmine && eslint .","lint":"eslint .","lint-fix":"eslint . --fix"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"<1.0.0","amp-toolbox-runtime-version":"<1.0.0","parse5":"^3.0.2"},"devDependencies":{"colors":"^1.1.2","diff":"^3.3.1","eslint":"^3.0.1","eslint-config-google":"^0.6.0","html-minifier":"^3.5.5","jasmine":"^2.8.0","jasmine-spec-reporter":"^4.2.1","nock":"^9.1.6"},"_id":"amp-toolbox-optimizer@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-rZetZyZGl7bXpR1bNlj4pZM98pp7Lau9pXMJ9sFd7N6b4vVT5Qj1EFhQ0iLB+TYCsZ1JG4Pj4Lef4w7z7YP9Tg==","shasum":"1ad1a2af85138975f3c537e7ce749298d8132542","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVGmzMaB8iBRwbqrUGqrt46+vlrHpfWWtVrutQXksS9AiEAlI0ejPzi/o1IIzJJwELkfDGWHXbfC82xFPfxUJ7lGIg="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer-0.1.0.tgz_1517514557242_0.2884298018179834"},"directories":{},"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.3.0":{"name":"amp-toolbox-optimizer","version":"0.3.0","description":"Server-side rendering for AMPs.","main":"index.js","scripts":{"test":"jasmine && eslint .","lint":"eslint .","lint-fix":"eslint . --fix"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"<1.0.0","amp-toolbox-runtime-version":"<1.0.0","parse5":"^3.0.2"},"devDependencies":{"colors":"^1.1.2","diff":"^3.3.1","eslint":"^3.0.1","eslint-config-google":"^0.6.0","html-minifier":"^3.5.5","jasmine":"^2.8.0","jasmine-spec-reporter":"^4.2.1","nock":"^9.1.6"},"_id":"amp-toolbox-optimizer@0.3.0","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-5s6J5BuB6gN0W4jsmZ7hp9UX2ONRnBi060EnMP8XP1eSRv4QnzEsZtZIy8ov7MvUSurqhBvwOtcbdA4r4QLLWQ==","shasum":"755820c172baceb94fd81ce29a3e1520d23c469d","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.3.0.tgz","fileCount":150,"unpackedSize":190005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ45VCRA9TVsSAnZWagAAsSwQAKT+RiZHYtGsVKYo+rsJ\nLXSg7ZAPuuPdBFoWmQp9ZgMm/g7c/vjCqzPA5WUnj+mN6OVGzdQ+kE/FQ6fO\nki+x1cvSr/mZnlUILF/Ij8RyCEvWq80TjLEYAAwas5NVbCkVauWb6xiy6/kF\neDkSqYpR2Vv6dxqB6MZOuWiEAoOfPGu+Cq1CSIiB+4280Om9n4YILcms4pQo\nblFYvro1uG1UzGUNHoSWMDWWi/i7Xt1mDGBSSGl5EVCNJbSx7qUwBeJGl62Q\n2j6By/u+Rg0im0/qDyjE5OlY9nRQgZNxNyaiDflmCAlPEd0+6qGouk0QHLhf\nnHENUdY1ak1FfJGLji6ssOTzvAtxV6Q0TYIKDh1sVhd+BSQYSl+Qhk3rDFxS\nhTvP4GpgMRFs8wRSpOhidvrAoLGz3BTmvbAtvu15KpR00CaHGF7JZN0Skauo\n1P6mkGvh20LR6Vq419ouW7X0aw5BDy+PFBOpttSvRkzdJ3oF1lutMOIAiM9o\nLaLwIIRRgAzNd2FlxZv58uo2ClGl8QsnjhKIRGw0kexgZrkX5ZEHXBu94z30\nlndq5OwXx3QmE3KH13XQZItY0tX9gwBR92MobpapOVXC+bKznziWNd7LLc5E\nR4NNur/YY5E2RnnJIvxGtID1ucKR/a+oAB8EHbt2jgk8mUYxgCOux3WTErb2\nSFni\r\n=nn7P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByGPGKijQcIRP0i40C8cxAQpdGqFpAWL5YS57bm3YxHAiBDMxje7IR0qRBW1klTsDW3KqpZhh/sZvWniAd9zqT74Q=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.3.0_1529318995644_0.5397558741319877"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.3.1":{"name":"amp-toolbox-optimizer","version":"0.3.1","description":"Server-side rendering for AMPs.","main":"index.js","scripts":{"test":"jasmine && eslint .","lint":"eslint .","lint-fix":"eslint . --fix"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"<1.0.0","amp-toolbox-runtime-version":"<1.0.0","parse5":"^3.0.2"},"devDependencies":{"colors":"^1.1.2","diff":"^3.3.1","eslint":"^3.0.1","eslint-config-google":"^0.6.0","html-minifier":"^3.5.5","jasmine":"^2.8.0","jasmine-spec-reporter":"^4.2.1","nock":"^9.1.6"},"_id":"amp-toolbox-optimizer@0.3.1","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-FBnndz5qrQ3HgaQ78z7jnlr5Kc91Fm2GduPczwd5j6H/UxKbj1sTMwYxziUP04tt9d0lw0n+1OPzAv3JnYy9Qg==","shasum":"3d7eeef8b6da2882d876a0b3d331814d4b7b08cd","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.3.1.tgz","fileCount":451,"unpackedSize":1536208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbPLV4CRA9TVsSAnZWagAAFIsP/2BUL1pZ9M5+E1BKlI1t\n7NP3IEz6RcS0B1tyNuupVpjafculoC0p3QqsWxzxLyt6t4Rdqyy/wJr+VmZE\nqlmkjejNlvvtJBPIlZus7Ag2FnxwEtuWlevVJ8EINj81tCJ+G74C8lTsIFVe\nQAV+drH3Q5DEWWbnGKUszoWdNA9tEmtp61GVvHW43N9KUxq4x/tiEea1tkMc\nlcmDMuKxENdUk4IV+6ONB0+eWoxdL49ROq2I82rsVte+7FMHJvqo4F2fIWFt\nCKjs0AqYORZbC328RRJ90euRkXwEUyiEPfYbUeusl46cVuQR56PU4XDSPLuE\nqh7pP3f7zP6Q2t3fL4rh44KKEawnnlUmoM1NevtoHGtXiy292g3Xpgb8kWhd\nqNgc61JcWf0MYDLOg/0jR4BnTnQNvZjkBFYD+CzZ3Ysb0PRpxv7Wga6yZskv\nMHB486SNmm2oWqBFDB1JndlM3Za35y7Lp89lyN22dWxgNV3nmgMSZomOHyZx\nPw/T4CeLhR/eqGniK4q9hYaxEs9m2dNH2oo3+q02cQi4KLQbCPTJnPGXbC1O\nfY5zJa0VRO5s8nmuiWZTV9sVHPD47NwAbatAGbbHTlOTPIkHm0jrEvLxFfyK\nUqG66FLKA4iCwC9CV9L6iItQSmeuYAxzmb1dKvDu/cGRs/4NZruS4hawKc5G\nYte1\r\n=Fd7D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoxXYBS1xR5eN0uT/kiX6QKcz0trtnZKG0FUaVVF4s3AIhAPL9eCv9LyE8KoRPdZWJNUzUl0NsdAAv9G4roXjfp5fU"}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.3.1_1530705271944_0.8510664556259828"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.0":{"name":"amp-toolbox-optimizer","version":"0.4.0","description":"Server-side rendering for AMPs.","main":"index.js","scripts":{"test":"jasmine && npm run lint","lint":"eslint . --config ../.eslintrc.json","lint-fix":"eslint . --config ../.eslintrc.json --fix"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.0","amp-toolbox-runtime-version":"^0.2.0","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"devDependencies":{"colors":"1.3.2","diff":"3.5.0","eslint":"5.6.1","eslint-config-google":"0.10.0","html-minifier":"3.5.20","jasmine":"3.2.0","jasmine-spec-reporter":"4.2.1","jimp":"0.5.3","nock":"10.0.1"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.0","_npmVersion":"6.4.0","_nodeVersion":"8.11.3","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-Vo9eZOPUNrdk+UsqPVTxxP5fHt7ti0FDXCXZYsjTsQ3TDXD94ZBfzIfdLGU8YUR1jalyFj8HXx0IyDEIQ2eMWg==","shasum":"f6553f564b23b9a189754968c55e1a1c7aa8af5b","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.0.tgz","fileCount":1997,"unpackedSize":9080663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbv18NCRA9TVsSAnZWagAAASMP/35u9KmLvTewTmKI0OE2\nZfIwNeJg+mJJrKrSa+HHTcG/lhZm3WX8ACUmsYlUbFKlRUWNnIn/c1m8hbHN\nuD/bj5myy5LxaI+xVmJ9vZBEnvc/OnJM6uLkZlVX/aUrPPIX77Z72yHBjA+f\nI3AaN3OVWlMeFJeoEbF/vdSDSEYKv6LHRpZVcoDKPLUF2RjE/FXQSEZfgOAd\nlj2gPzA41qDlMj1VomJhzzQeHcE0AuI+QHDDo0osKvCM6mN4AOlyUIJGZ7f5\npRqVTre7BPicc8QnTAOTC5l1Rm5+CcqZNva05hKOHMOofXEPyRrB+0fmS7Cb\nomH/OF2IlQKlztNwvqiD+9dEzcxS/b9RdAJsGm3veLGCN8ZXIBXTnDHgd6R8\n6tpDdP4P5CHU9K2DMFsQunouL+OKO9bakAgvuc/HODQ5PBJHW7U5FPS9QRhX\nCbYt+IbS4V2t5LCQeWZZTomZ521I8zUXVyRjRO3K6icMigZ/0KdNnG62hH/U\n1jv78USt62tlWyDc+Q1tNwWfROkTMZUHvw8f75Edzqc1fGmshUGI3VGwdJlR\nS/Cqlem8j7Rz5LPCkcZexLUPkCzJuoW5BrdLSSMJUCssmDll9VfT5T6hYmnu\n3xLokcJtM6yMKgp12CNR4Zkn6rWLm8H8nGNf0GMNRM2r5xEMO4SDOgXH2OH/\n8LvB\r\n=672D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJ1kfxvn5qw/MAjYXAlTVlWLyVl3xhyvNnIorFoz37xAiA8KAtVqCbLibplppPhI06MBogp0LzgHaFdSNSjAmg8gw=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.0_1539268364094_0.49220601766009"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.1":{"name":"amp-toolbox-optimizer","version":"0.4.1","description":"Server-side rendering for AMPs.","main":"index.js","scripts":{"test":"jasmine && npm run lint","lint":"eslint . --config ../.eslintrc.json","lint-fix":"eslint . --config ../.eslintrc.json --fix"},"repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.0","amp-toolbox-runtime-version":"^0.2.0","parse5":"^5.1.0","jimp":"0.5.3","parse5-htmlparser2-tree-adapter":"^5.1.0"},"devDependencies":{"colors":"1.3.2","diff":"3.5.0","eslint":"5.6.1","eslint-config-google":"0.10.0","html-minifier":"3.5.20","jasmine":"3.2.0","jasmine-spec-reporter":"4.2.1","nock":"10.0.1"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.1","_npmVersion":"6.4.0","_nodeVersion":"8.11.3","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-rz/s0tqq2ps2UATioX276vp7zQUy5VP5qfd+W3RMeS5yZbxamTAcE+Nz2yckpaCLzyOEF4Y/UuWVeh2jEUTOIQ==","shasum":"148bf03d142828c9ea5fa3dc43cc300ae479826b","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.1.tgz","fileCount":1997,"unpackedSize":9080663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbv2D/CRA9TVsSAnZWagAAyS0P/jHyH+qnE9qz+/U1Gd0I\n/+AgJKCdp3Vqf1H6amSoqgiUcrD1mhVg8ufpiR6GvWIZTMklQ/qGXRwkOLWe\nXgjxDKx/f2DSF5lZT7Fr5V4P91jYrpvEE3rybOfmAf4M+hDaU8GmiFMT0jXy\naiQmX3Pak91qBigwU8tdjP5qyrUvqWN7TFVh6RhNfXc+C3UE+CArdoz8MGg4\niJdT6Qs3eE2pdXJb4E8w3Pz9RHfTLvLmUM/BNQ/nLCBKHXu1PJrg+K63a3pj\nAcHmryaOdSIjurrELlYRf2bKh/dxniyx3y+Py9lFnEm5lO/hJX9VopIAP0/u\nfX/APcZtlWqYBp8vqAU0OgHZwqlfm8kZYYPusrrsBnZGf/8rk1ueHnaDRuus\nh1w/uAlAfS5tUGYEbfc7Qi19z196Xxxo67p+zH50z/NW8356a2zEnC91mgl8\neWRQJK5yXm/pMsPw5Y9/aHNKiRsA0NKAlplsU0Ty7NoJ7D3CQ4GltITTzRqN\nlrRoIqWjPzoOpXCpIkfgc3YGUl5LeR20iuPaDmSo0TeWUP5xJ5f3k4xZB3pL\nOyWUsmocxx1nvraM1Ppbt8LM0Bpu0IU6BlIoauljUaDInIkZ4XstE5HSHOmd\nfG7QC+p1sDcB3Aayhm+A8u0xKkDukdygj21gBZTbCwvVmyePPNGLFzsZJcqq\n416t\r\n=CsuD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBse7uG4wxXujL5ZEJ8VY0N+ju0iAHBcj5YTWSqJsOhhAiEAm0aOgWgwukK4OtAGn0AyyYF8HG2y1JYf86M2irHZKwY="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.1_1539268862166_0.1716945521631945"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.3":{"name":"amp-toolbox-optimizer","version":"0.4.3","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.1","amp-toolbox-runtime-version":"^0.2.2","jimp":"0.5.6","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"gitHead":"058a60702136ac24dfd0a4f421877ed23aeee19f","bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.3","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-MuMDMtftIt5GOA6R70+0V04pnUbG8GBy4uGYONzsti70preshsGvXDcH45SfXtfmOKfJfNppHPbbgmoatslJ7w==","shasum":"4279b2de142c527ea9f1f6e44a8dfe72f79c1c5a","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.3.tgz","fileCount":163,"unpackedSize":8035260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7XL1CRA9TVsSAnZWagAA58sP+we3xJHBHvsfMOvC6Nlj\ncQEu2Ds22CyWtatMBszCpjto+b2FWjdjFOBvxp+5tSEiPltYPYmv7QghEaCm\naoypxuuF9T5rz85GwwD+VF/kNxSAz/w3KDd2EfSQyKkFIpce1TkOnc6HxdwL\nt6bgWrnGNDfSmeFxiKtJPYxlvyddu25Gt+HyL0lOo1nZlvYVPvUYnhyzRtqo\nw/EatVmr4YRMiupv/0C3p5r4ZfUtmolsWL9h6RxKcnO7wFlwPr8kDIYdPuhn\nfOz3NugLwkqzLSeUNvrCQ+5a4FsAk4Lo/vmEXxmNnfkMx4D3yPlUH5G2EeJd\nU8UMHom2ak3q8eG0/d9NNkBH8XvvZS3rjqYDYQy+sHjETvyXHbrZuj+z4j2I\nu1BT91M6tCriulNzeOZH1geTmQJIwCewDUSLXHgVevwrILY6r4P8udYmSf0d\nPVnnMo6D1pMLswMA99oLGNMqpm2mCPaCiSkPxYYk4npF5RREezWNow/uuprS\nf91gkVa6NPmD9qD3/uT5vYbSddkQcBYjkY+TLizn6lR8xm5Aroa6/lUIiCyJ\ni5YL4MslVQX8l7oh0Kc9xy5czyZVTxgbk3gTax5vRBl7DAAlfDlaOot3jNZV\nNvKT2ufhTr8soEFJAOJNFyBCgwh5Plg6rSWeCHOJ/igjQEqT3lMOqWjwSuQW\nvvkI\r\n=Dk7a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHS7e1Pganq5rbmEEl1cZyMESOcbZnaxXfpz/Jv2U5zTAiEAzay7+SauiVAs9owsLds88d1F6O63VkDZBcmVwTyWG10="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.3_1542288116198_0.31732748779504516"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.4":{"name":"amp-toolbox-optimizer","version":"0.4.4","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.1","amp-toolbox-runtime-version":"^0.2.2","jimp":"0.5.6","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"gitHead":"058a60702136ac24dfd0a4f421877ed23aeee19f","bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.4","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-QvFdt+L0b2WJMuaSlqDdIDbNMTlUB/th+DMxNtnS0GXE+Pg0euy+QSLlayDIyVmFKdqkbRuNMQMAx+XNnpyCfw==","shasum":"ddbed951d90e52c2f1d369c6b08f55c58f0e2378","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.4.tgz","fileCount":162,"unpackedSize":4113586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9D19CRA9TVsSAnZWagAA6SQP/1tVZKljRViAVIh1BnOr\njKuV10yyxy9HDlK9JyGCHMSPxGo4vS6x89Y7IwM5jVNN5GKUIGHmDjabopx/\n4tuoSwUHF6Y7/EoakU2YgHMhaRClDpnxydGZ+4M6ugl5NtuFIBjUIJPyyelf\nKa54JmWTsVCo1nwPdKIMwzvOF5gnmA8/uQ4yRXubGCCe+jhYjtqZVWq033HC\nl3DcxOQ13WTIla/BqYt9XKHlD/EtQuhk8lFhKo/yd4y+e9wSLDae9ybQ2U6F\nrCmpN4iuiEBerlexpqoDlc2hD3hkSIIoXOKButXWoNGftXjQ0Z2yUcSDwS5k\nVfUdIIptH9EIEobuZ/y+Mp6dUrIvCZL1W1++g9C17sj00hW74NVysLguv38V\npvRzz88olggLrL0xJ4I7eobIR+S6AkOP0NDsPlvtYNF1awF9l8KKcwWMH9Q/\nCRtSBux0oxKC8sNbnqs5BTHJW7uNHRX4sXC1j1/JuWU0x856KRCo0IWz+pLS\nUQtBKngKjjkxYnEBwxSGkJAC3pdzb6eOviHmTMpj7z25HXwAd0a1vmC5RLDZ\nCz7y7Iy7u7Fv5FtOiEO5f3QeuPP+MeDHfe4G8S3NAJYhIMa6HUnynxxqgYCi\najsDm8Ya1IM3PnR9b4XcwLMYCXeH6tv75eoS1UW9QgajR06G6SsV/o6/ECiX\nE5r4\r\n=YveX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJ8vAovau23Z4t0Fl7uCHTyvtX43lOvJo7SVqGB+JZ3AiByuV62tsBLEddC21+1U0QNS69sVlBjIpPR4q/bY0KOjQ=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.4_1542733180116_0.6161807111046009"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.5":{"name":"amp-toolbox-optimizer","version":"0.4.5","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.2","amp-toolbox-runtime-version":"^0.2.3","jimp":"0.5.6","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"gitHead":"4c0345ec4414a8c33dd896bbe9f8637e7c8561b8","_resolved":"","_integrity":"","_from":"file:amp-toolbox-optimizer-0.4.5.tgz","bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.5","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-ZqYBZ2TeXaDW4acU/rEIRItSdvmpUiYWDAY6TlS6OFLGIyyWaQ+DNEsKZAtUf9G8c3bvJv4jwmEog7k2D+2pVg==","shasum":"5f57e95178497d6c0ba45c943c8d0869ca7fc240","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.5.tgz","fileCount":163,"unpackedSize":4124929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/AlSCRA9TVsSAnZWagAAztcP/R9hpJi5oLrvhmWF1DUq\nKP6gRHEV5KHP5fzlq1QlvGOp7Ryj4HibpBf/u35lYUoAPRCBjMfsZtFoQaRY\n/FlrZ5acvPSHVBZLd2V6z2lTFlFt3uJViILCKHXrYMFnDXxqqhl0v+SJLmEJ\n8ugHYbd31yUooKZ7OM/FVdpECDkdQTYZNWEhccfVeEo9vpi3s83Qxzu41u6C\nWwUku3zFyKGnlfieraFC9Ya7SdzWayFpR9o2NuTIRXX7pH9T/iB67+p1lHQY\nGyb3OLFpc12+q+Vu75+gjug/cEAgUfbi5tV9rFatC4yvvccTfkUrnfMIUqJ3\nN0WIJE4hAF/StjriMP2LoQarFdgvJuC8ZwTCG45bgX4YXAPyoYZ+QwVbhRz5\nhmMXtEAuTTEaMyL8L8PXgr2+CrH3j+veEM7iMs5gR27TuHaNyYROvwRUGVyo\nxDMWFmW5i2FYe+K/0Fzg6mF9VYVkjvtHYLeCIQmOuwGiUuO2r8nzkHd4YFeN\nti+RefFO9dcYSfYPPNesI8GeG7sqgjQWcrJvqZsY4TRESws46wIkStp+thGi\nCgCy+oIm2BvXnnnhgp6/oebby/9bHJAxtk9IFxr1436RtcHiRDO6vOQOVruE\n7KRFKWM+nnPRCG9wHJS1eICpnzrj/RZLPNjIJgyt1ZkoprRo+nulcN9WqyIH\nIems\r\n=O+Xi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLO7TDRtj6w4w2RVl+1R3MvnloZVZZ67saG4Ba9dYtiQIgJSf3VGEM25OtJr2Y9hn2jd7POyK2Sa7wbQy5ufW3VP8="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.5_1543244113267_0.7894987846533863"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.6":{"name":"amp-toolbox-optimizer","version":"0.4.6","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.2","amp-toolbox-runtime-version":"^0.2.3","jimp":"0.6.0","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"gitHead":"c9a47dbc28d80a70594b3fd37cf9211f76e22cbb","_resolved":"","_integrity":"","_from":"file:amp-toolbox-optimizer-0.4.6.tgz","bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.6","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-W2kvznJnN0+MsYgBqtNis2TDXW0p5NampRTBwH+AuB2bVpuYRJioKqBjnS34tTDM45t+TaH3nZT9MoLXyfQIpw==","shasum":"709d61ca82e6e9751994719d60cc7b983dd86e50","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.6.tgz","fileCount":163,"unpackedSize":4124929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEQOVCRA9TVsSAnZWagAAR+EP/0K7tlo4wwcO0sa3J/Oh\nxyBWB2pCnwbdhjlKL7SEgru25g10aTlPFilNF17dQFpvbfZQYWUoVxW6hjzC\n6MJxPiEnwPuXD7qAOh9Uz5f1CmXEJf5pWwNnn7SkulT179KJ1LVzcCFVfX3u\nJygDYrIARBHCw6FCCedzzAuSfsINo+xwmLrqX0VSIDfQUKr+3OFsS/k7d6BP\nabmfAz/FfUm1UNvWs4skmWB77SJS41WfpVpqNy0vL4Ih8X4uklmJsCI4/1xB\n6zQRNRxfN03SuGimEzEjsQX2vLCw5+ZHYhQ9xXKVnIbU1MjG22TMotO9Eihg\nB9+RkhrqyJNzw3l4jSFLZ23t31M9vhmQA3wMNxi/bOlvLjEa48ega078y5FG\nhzlH+vGbjVmTnOHPeUwEfa5OU7rjNWLm+LdlGCmOzPQ9ypMlonO2++9w9tNc\n3rVezPTmJ4cBEuxoVwkSIb815DmhH96r8DhxEUS1mXulSxQHFSwLnYt3vmeC\n3/ryAbokq1uCBlWnT2D26QFkhsEWncbaWJzDPTVuNNMGloVvXIkCb9JWXMx3\n8Dfrn/bJsNq2a9ljPs4LVb5OYkyssuRMjYOU5+cTM2+Twi++kkOZLIY/afuc\nLI5Hm+XQMu/BILv1RJLnWSfj7GASSXRtVpKujGsORhpGaUx46f6PeeLJ5Ojz\nl5hi\r\n=EOjG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgK92RJNbhEioGIBhT64uOkKX4Xq2TPbVd5XoCifEXRAiEAuQp7mL2/M4R/aZvx9zf6QRMT4tDE8N1NTD6ggviIfkw="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.6_1544618900113_0.16832376644596736"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.7":{"name":"amp-toolbox-optimizer","version":"0.4.7","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.3","amp-toolbox-runtime-version":"^0.2.4","jimp":"0.6.0","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"gitHead":"8375d148097a6323663a8d35a9499b82fcedd28d","_resolved":"","_integrity":"","_from":"file:amp-toolbox-optimizer-0.4.7.tgz","bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox#readme","_id":"amp-toolbox-optimizer@0.4.7","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-7cgx9ZjEvvjJ8zgEf8ljapgcUYoBI8/bFrX9ywl5q8BZN8d2y63xEdVxWt+90grQmCxeKKj4+6UUQHF/MvS+rg==","shasum":"a51193e914c1c54b85435b0e61c0a33771b22b11","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.7.tgz","fileCount":2790,"unpackedSize":24538576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXcrxCRA9TVsSAnZWagAAhTwP/1+JYMlxWk2ecVVNd1LP\n39kjZvOIQzk+PhtGwM0SXDd4gUKifCvVfelExe/J+/zq3AUwyhBpb5Qt+iXK\naP3QVVcBGRR5F20wPtCdXS9XYewiI4yOiYHbXrdsGwUBMxvccltfYvKxKjjX\nuqytcaB+ZiDdxz8fO+sEO6pOW6T9dQGmFKtJygqKMmmhhYwTJzVfaQIUjDMq\nlv1mIqxUpV4DBbMMK8aKQi8u/P6eO8p8TTakcrftst21E2a6jbM8dcMlYcbD\nyYz/gx0cPo1VjQ9Ryk6h1/0dQFAqUxkszQLrlJGR9d+MQkuFHk6DqplkM0L2\nPcZ0vuXDeYXgUnxdMswxv9W4wBC7I8iqutCGZBmq1GZynT+Yj/eblB8ES7DD\nEWcd/pPk6I3/Bqg46AXTIGLer54KrZr8roZ7kuj5wrPwfyvRpWHJ6mL5bgrX\nRRxoCQu4qLfGugInHk3ZZkYl/TjuIxgT2rnfvRPmR7IdAAKl30GR9pgbxy1Z\nBote+z1TINLL4wDU0N+ySuteY/3nZHB8+BpS/4+v2IWLvw15QD+EZiQubEhh\nMd2dAnY87VTZ9yocHUWRBUmn7nXi1Qpl3rAKHwZCxhx3/5upkpSD630NXojd\nnYPfOrlmnICUtXAQOXrl0IVkDnTbj9O9fu9kDdUCWG3Nofi+oU1YrSvl3vp4\nRvFA\r\n=TyyY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbY++l+V7tbf3HWnSiA7OvtcDAjFSVopne+C5SHfgafAIhANVUPD99GUWzXr12NwmgCn207Nm7rxUEtLdWwj+ftsqD"}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.7_1549650672769_0.26648916149082447"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.4.8":{"name":"amp-toolbox-optimizer","version":"0.4.8","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.4","amp-toolbox-runtime-version":"^0.2.5","jimp":"0.6.0","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"058a60702136ac24dfd0a4f421877ed23aeee19f","_id":"amp-toolbox-optimizer@0.4.8","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-RcMm+GcTKXfnQsvYyGRsWGWsNxGNLhJZ8Ye92ROMQ+5uzHqSNBGeZaWaRyNBosOCUjB4oLKP1mIoYYq8xisBBg==","shasum":"7d60acf644b7979adf3d26971a55a3b97f1c4f9c","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.4.8.tgz","fileCount":2789,"unpackedSize":24527292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb8P3CRA9TVsSAnZWagAAA58P/3hKOwwZyLu2LYMGLKPZ\nZLtTzjpIENnY/XeqqVs7SwTEl0Iahv5io2wgZO8VnET6nFRUI8tGep5ObXhh\ntZJTrT35nVwm8MORrpALeikC81DVjk2ScaQZ6H+olM1x8O4zkxs03Z2JxHKb\npqJQJWxUE1tJb101h7KjA5nfaCiTE+a1xpWCNDwjPFMM6i87nNNasZuXGRfL\ni8D5ZDJSusirdrLBAdN3dDd1/GLIpX5cQKyX4l8bwfIzwuVKw30Y5MXXUl/S\nwdkxjKrL2OfTe0pc1o+HFS80xTKno/Pd/6GZlCd7W1Fc/s8f8f+WoSRLpkck\n0N24KApMC54JT7CxXllXhVdZAuO8bFwd75bIjNYqgM518cPqz0VJKpwc7x1V\n41QgXaZdOY/XIiIElrNOtrtuvQtmf4wSK2c/aZZOudo2MSM0KnhtDTwZ04uT\nxxkezxAEZLzAfKtTrUOYXfMAbxpXfDD0VUIp2pxl1g60wFK48qm3PTdkB4CU\nKTPAVVb5t8mNZNdr0jHst6mMFGYE5M6Xwg2N3WrSWKRixaoAagPX3K7YjhM4\npRsNS8B8id8fm3MGbBEe2gXclJXUc3qiwcnXufv4wrl+wwBMERHsOjBRkSID\nDf7pVUrDBzNBLB4f0y0CqLwTfSJBS8elCpyCU3JKhfut3ZvbTugyaYUlRWoS\nbTT0\r\n=HfWx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEG7F0HHbFNwAf9f7SZQ8ud/mH3ZjiVJGUqF3tuDtS5IAiEA1VfyydaTai1m5a3BU7IcEtjzzYCsbe7r3OrybTFWRuo="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.4.8_1550828534081_0.14670270458972734"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.5.0":{"name":"amp-toolbox-optimizer","version":"0.5.0","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.5","amp-toolbox-runtime-version":"^0.2.6","jimp":"0.6.0","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"0f15452c5a91d97bb54194b70bff3dcaf9f56d0e","_id":"amp-toolbox-optimizer@0.5.0","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.13.1/node@v10.11.0+x64 (darwin)","dist":{"integrity":"sha512-aV9S+oLtgA3oyZjVO3menaQTjXiLszdw6J/dIxR33GOXDtS44TC2cRZQ8Hw1dC2pL0NiALF6Z1qs3M+xj+3iSA==","shasum":"237ded095f7eda2086d1cd89d0b6db041147cd27","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.0.tgz","fileCount":2812,"unpackedSize":24621068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciPY5CRA9TVsSAnZWagAAfcMQAJEG2XnWSqVMPUInpTs8\ndj8ssXDj6ANm3lhc4kYzj9Mo9xYiGgitvxrOluSfHeVJ1OK8FVLkNUEU1Syw\ntQEvziIYhK1qc0gKpM3aS75dpMybKua8tY0zgFu/0Bm7+vdt8I5O/J0O2Y/E\nJvF2M5e8Mx9zSpPG5ZIDz+5eX49QATMLPR9l9Xfj5sTniuEV9Ob4chmuGqSe\nIh6oftByiL8Ho2RjBdWiONR5/389T6yc4rS1mX1nMKJ42YO6zKG5SW7OZa+l\nV3VZVKtegXPWZK7/rt9SCOvimH4jCVV4ei+QlHO2RW7vP7Dr3cDUEvFX/m8o\nN6qdThTUdQz5H70EYA1s7+iQOV5fs/pXFZY0J5raBEee2gZGQXr8FO4D62mb\n3eSc6MGxJeJ8C4EVZLpLunmQm4aQ3WC4V++lDkUzkKB+FwDjH8HQAV0dJsrG\nN6dYLtqknL/bUwrQR/YrCwUicgZgSHapKQoJn12+oIwSjtw9Q+83V9/TVV8I\nBVf4fAkpB2sbTKtCsvtBE4WvKPpdgvWDq9jwIYnVWkAxSV2YcTpfuK2klJQS\nKlmnrpn1W4as/KsnmN5Sdah3qAvAZ3kkhPz8w+mrmCmHwIyJiT1apYszDN0f\n7ZsZ+KQym1i3hLgbhGAoDUXZ3j3Xw4WyGStpGruSXtP9NQM0pOXqOZeQP9xC\n3yQ7\r\n=ivcZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB930TN0RwOTe2D/z+lTLsgKIUuor2bs7Me7Jknq82NAIhAOTLUWmEJuOEYdN8GeN343dNibbvfaRGBQEEoKVM5N7l"}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.0_1552479798263_0.8883144979163824"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.5.1":{"name":"amp-toolbox-optimizer","version":"0.5.1","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.5","amp-toolbox-runtime-version":"^0.2.6","jimp":"0.6.0","lru-cache":"^5.1.1","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"463777cbf13e816d147bf9a31fc1ec3fab73aaf6","_id":"amp-toolbox-optimizer@0.5.1","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.13.1/node@v10.11.0+x64 (darwin)","dist":{"integrity":"sha512-U5GB5EyodHX6sOnx3PySm69yYT6gYp1DZ+OuYbv6DTNcvRylvFjf1grJB0uMaa1601lEkl46U4RN7Zbcv5SX3w==","shasum":"d84c93245d67e75e25cd3319e2fcd72598825e2d","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.1.tgz","fileCount":2812,"unpackedSize":24622190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmKqdCRA9TVsSAnZWagAA9FcP/j8oa6LV4opI8nfvholl\np/WoDTyKOVEWeJUwJvW6VWFLS450RarFltulW1eJzF2hhc4ds/2c8VOa/kjd\nuvcNaYAhbcuRu/Hozl7No+SaeZqg1id0phUzbI3tkM+UkLyKUXD/LiuyNCyO\nXY2sd6HXRkrfxok0snQxLBaPfX9cgP+5d4C+ejPOJNkUyt5vlYswrkIs0Auc\nHKYYhMs3xihO4s4yC8nbfDbUVffv5crezGHsqB0dlxGjKpcv9dkEYIcr455U\nnhTUzysVFTotBp/hlDujSecNxbzU9aK6uVxtC9mCQyYfHWgbAuXVWvpqz3e3\n4ZEfqfxLOehOR03/QIbBeejI78/0CZsZbZn90H/pRI3jMD0pec/48cZpJR6h\nd8LcPk55G2YvXuG19vwHwXpBT9BenR8jeYSP5PMFkYpLHzCa//FvXKEBPSyE\n6NPki3SogQavrVpegoMtbSn+BCTEHAmeoNxuKnTLB4W0Ct1UKUrFfqZldxsI\n3+iG11Wqh0cf/JllWWMrUPJnfjrFSFf58chZQnMWE50MTDF8M/RH5kBp2qJY\nA+UJlFpIlTh9XHKm3UFJW+j6Je9zStULj+LFk4oWZ+hpNwlRjKh8txqHImWe\nOqt5niYJmknDHukE3HwTGc7055iLpikvvK3BQ15UYcyZN3BOwR5sNWrXDNGQ\nmwYV\r\n=sNeo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1pIoZBkuVflOu6KadiVmw9d0zR0Ojaxh+eXYl0uWrmAiEA+pguqAQfPjZ74cKPUMRefat/NYesQga6dhTcsIa69pk="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.1_1553509020844_0.6448974241544247"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.5.2-beta.0":{"name":"amp-toolbox-optimizer","version":"0.5.2-beta.0","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.5","amp-toolbox-runtime-version":"^0.2.6","css":"^2.2.4","jimp":"0.6.0","lru-cache":"^5.1.1","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"4e7a04461b370ff8d90f84d334e7977d958c88c7","readme":"# AMP Optimizer\n\n[![npm version](https://badge.fury.io/js/amp-toolbox-optimizer.svg)](https://badge.fury.io/js/amp-toolbox-optimizer)\n\nAMP Optimizer - the performance optimizations of the AMP Cache on your own site.\n\n![AMP Optimizer in Action](https://user-images.githubusercontent.com/380472/36001450-96cfbce2-0d26-11e8-8b65-4ffc3182d57c.gif)\n\nFirst Render - 3.0 seconds vs 4.8 seconds (37% faster) <br>\nVisually Complete - 3.7 seconds vs 6.4 seconds (42% faster) <br>\n\nwww.ampproject.org\n\n## Introduction\n\nAMP Optimizer optimizes AMPHTML files by: \n\n* Server-side rendering AMP layouts.\n* Removing the AMP boilerplate.\n* Pre-loading the AMP `v0.js` runtime to benefit from H2 push.\n* Versioning AMP runtime and extension imports.\n* Inlining critical CSS.\n\nYou can find the currently supported transformations [here](lib/transformers).\n\n**Warning: optimized AMPs will no longer be valid AMPHTML. Don't use this to optimize AMPs meant for being used by platforms such as Google Search.**\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Background](#background)\n- [Usage](#usage)\n  - [Options](#options)\n  - [Versioned AMP Runtime](##versioned-amp-runtime)\n- [Example](#example)\n- [Best Practices](#best-practices)\n  - [Transform AMP pages at build time if possible](#transform-amp-pages-at-build-time-if-possible)\n  - [Cache transformed AMPs](#cache-transformed-amps)\n- [Why is it faster?](#why-is-it-faster)\n- [Caveats](#caveats)\n- [Version History](#version-history)\n\n## Background\n\nThe [Google AMP Cache](https://developers.google.com/amp/cache/overview#cache-optimizations-and-modifications) performs additional optimizations to make AMP pages load even faster. You can find out more about these optimizations [here](https://github.com/ampproject/amphtml/issues/7022) and [here](https://github.com/ampproject/amphtml/issues/8566). This project provides a Node.js based implementation of the same set of transformations performed by the Google AMP Cache. This serves two goals:\n\n* Enable faster loading times for canonical AMP sites.\n* Provide a reference implementation for other AMP caches.\n\n## Usage\n\nInstall via:\n\n```\nnpm install amp-toolbox-optimizer\n```\n\nMinimal usage:\n\n```js\nconst ampOptimizer = require('amp-toolbox-optimizer');\n\n// Transformer expects a string (streams are not supported)\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n}).then(optimizedHtml => {\n  console.log(optimizedHtml);\n});\n\n```\n\nYou can find a sample implementation [here](demo/simple/). If you're using the express middleware in your backend, it's best to use the [AMP Optimizer Middleware](../optimizer-express).\n\n### Options\n\nCurrently the following options are supported:\n\n* **ampUrl**: an URL string pointing to the valid AMP version. Required by the AddAmpLink transformer.\n* **blurredPlaceholders**: enables blurry image placeholder generation. Default is `false`. **Important:** blurry image placeholder computation is expensive. Make sure to only use it for static or cached pages.\n* **imageBasePath**: a base URL or path required for resolving an image file from a given image `src` attribute. Used by for blurry image placeholder generation.\n* **maxBlurredPlaceholders**: specifies the max number of blurred images. Defaults to 5.\n* **ampRuntimeVersion** specifies a [specific version](https://github.com/ampproject/amp-toolbox/tree/master/runtime-version\") of the AMP runtime. For example: `ampRuntimeVersion: \"001515617716922\"` will result in AMP runtime URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  https://cdn.ampproject.org/rtv/001515617716922/v0.js\n  ```\n* **ampUrlPrefix (experimental)**: specifies an URL prefix for AMP runtime\n  URLs. For example: ```ampUrlPrefix: \"/amp\"` will result in AMP runtime\n  URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  /amp/v0.js\n  ```\n\n### Versioned AMP Runtime\n\nThe `ampRuntimeVersion` parameter will rewrite all AMP runtime and extension imports to the specified version. For example: \n\n```\nhttps://cdn.ampproject.org/v0.js\n```\n\nwill be replaced with:\n\n```\nhttps://cdn.ampproject.org/rtv/001515617716922/v0.js\n```\n\nVersioning the AMP runtime URLs has two benefits:\n\n1. Better usage of the brower cache: versioned AMP runtime URLs are served with a longer max-age than the unversioned ones.\n2. Critical CSS can be inlined. The AMP runtime defines it's [own CSS styles](https://cdn.ampproject.org/v0.css) for AMP layouts and other things. Versioning the AMP runtime makes it possible to inline these styles, which greatly improving time to FCP as it ensures that inlined styles and imported runtime are compatible.\n\n**Important:** when using versioned AMP runtime URLs make sure to invalidate all caches whenever a new AMP runtime is released. This is to ensure that your AMP pages always use the latest version of the AMP runtime.  \n\nYou can use [amp-toolbox-runtime-version](../amp-toolbox-runtime-version) to retrieve the latest version of the AMP runtime. Here is a sample to apply the optimizations including versioning the URLs:\n\n```\nconst ampOptimiser = require('amp-toolbox-optimizer');\n\n// retrieve the latest runtime version\nconst runtimeVersion = require('amp-toolbox-runtime-version');\n\n// retrieve the latest version\nconst ampRuntimeVersion = await runtimeVersion.currentVersion();\n\n// The input string\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nconst optimizedHtml = await ampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  ampRuntimeVersion: ampRuntimeVersion\n});\n\nconsole.log(optimizedHtml);\n```\n\n## Example\n\nThe following valid AMPHTML:\n\n```html\n<!doctype html>\n<html ⚡>\n<head>\n  <meta charset=\"utf-8\">\n  <link rel=\"canonical\" href=\"canonical.html\" />\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom>\n    h1 {\n      margin: 16px;\n    }\n  </style>\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=360 heigh=200 layout=responsive src=image.png></amp-img>\n</body>\n</html>\n```\n\nWill be transformed to:\n\n```html\n<!DOCTYPE html>\n<html i-amphtml-layout=\"\" i-amphtml-no-boilerplate=\"\">\n<head>\n  <style amp-runtime=\"\"></style>\n  <link rel=\"stylesheet\" href=\"https://cdn.ampproject.org/v0.css\">\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <script async=\"\" src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async=\"\" custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async=\"\" custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom=\"\">\n    h1 {\n      margin: 16px;\n    }\n  </style>\n  <link rel=\"canonical\" href=\"canonical.html\">\n  <link rel=\"amphtml\" href=\"canonical.amp.html\">\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=\"360\" heigh=\"200\" layout=\"responsive\" src=\"image.png\" class=\"i-amphtml-layout-responsive i-amphtml-layout-size-defined\" i-amphtml-layout=\"responsive\"></amp-img>\n</body>\n</html>\n```\n\nA few notable changes are:\n\n* The AMP attribute in the `html` tag gets removed as it's no longer valid AMP.\n* The AMP boilerplate gets removed. Instead the `v0.css` is added.\n* AMP layout classes are added to the `amp-img` extension.\n* `<link rel=\"amphtml\" href=\"canonical.amp.html\">` gets added linking to the valid AMP version.\n\n## Best Practices\n\n### Debugging\n\nEnable `verbose` mode to find out why the AMP boilerplate is not being removed.\n\n```\n// globally\nampOptimizer.setConfig({\n  verbose: true\n});\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n})\n\n// per transformation\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  verbose: true\n})\n```\n\n### Transform AMP pages at build time if possible\n\nApplying the transformations to an AMP file consumes additional server\nresources. Also, since the entire file is needed to apply the transformations,\nit also becomes impossible to stream the response while applying it.\n\nIn order to avoid server overhead, if the set of AMP files to be transformed is\nknown in advance, transformations should be run at build time.\n\n### Cache transformed AMPs\n\nMost websites have a more dynamic nature though and are not able to apply the\ntransformations statically. For such cases it is possible to run the\ntransformations after AMP pages are rendered, e.g. in an Express middleware.\n\nTo achieve best performance, those transformations shouldn't be applied for\nevery request. Instead, transformations should only be applied the *first time*\na page is requested, and the results then cached. Caching can happen on the CDN\nlevel, on the site's internal infrastructure (eg: Memcached), or even on the\nserver itself, if the set of pages is small enough to fit in memory.\n\n## Why is it faster?\n\nIn order to avoid Flash of Unstyled Content (FOUC) and reflows resulting from to the\nusage of web-components, AMP requires websites to add the amp-boilerplate in the header.\n\nThe amp-boilerplate renders the page invisible by changing it's opacity, while\nthe fonts and the AMP Runtime load. Once the AMP runtime is loaded, it is able\nto correctly set the sizes of the custom elements and once that happens, the\nruntimes makes the page visible again.\n\nAs a consequence, the first render of the page doesn't happen until the AMP\nRuntime is loaded.\n\nTo improve this, AMP server-side rendering applies the same rules as the\nAMP Runtime on the server. This ensures that the reflow will not happen  and\nthe AMP boilerplate is no longer needed. The first render no longer depends on the\nAMP Runtime being loaded, which improves load times.\n\n## Caveats\n\nIt's important to note that, even though the text content and layout will show\nfaster, content that depends on the custom AMP elements (eg: any element in\nthe page that starts with 'amp-') will only be visible after the AMP Runtime\nis loaded.\n\n","readmeFilename":"README.md","_id":"amp-toolbox-optimizer@0.5.2-beta.0","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.13.1/node@v10.11.0+x64 (darwin)","dist":{"integrity":"sha512-06SqqSPxhMW2fX/ZAICqdodcwsL+Xm0HHjiqxqx8yW80z9APnglr8Qmx8S9Hw3VEe6AaCTHXV3knvWfohS/r9g==","shasum":"72e083ff6045953ebe48161987c0639d55f3f9e5","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.2-beta.0.tgz","fileCount":2823,"unpackedSize":24634044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmpk7CRA9TVsSAnZWagAAbSEP/2mPvvin8MldPadi7Jww\nC9CWXiWrkZDMEC/HlWvPu8y+1i31xKRsqornzILaLbCNpNBJvytdG1XnIXpe\nN9g4vR3eDagyHzcl5hlJQdxcKGzG6yr2TvGQQ6EqEWvqieuq7lexR037c3mS\nm7T48VJidNJhhKhWiajSYN0wGexWX5Cb1UMJRa8m9x3weEitZHWwgklqrVfz\ndZpqAFmoN22veal/k031tZh2byGuxsrMZwJ6BbYzLVe+sjukKmP4WNMBwR8/\nCmSN08ufXvjCh/dDZjnvKda1w+20Q5K4hlAUP5XhfXU2RrqrvEXOiZWgalpu\ncFthIW6z678OD/2u297degTcdT2UdxYIbjxmy5IwGqAZfIgJZlHbtZSP7Fxo\nN7R1tih/FdBg2BoNTBA0mQp6r8PguMYJVWM6BnJy/iBioPjz0qCp59vnU8NT\nPScN25k/fgNKvvLYr8o5s2wTGhRNoTdhLPapnlDHEX6RMMmqHqTz+lSTX3N3\ngRZCU/0r5TF2ilIejhewVfTH5RkcSZDqKxNfhZ3InGfP4wTsgGuW1J+fRJCA\nIKz0+EMT+mdIAjhJH7hZnsHQdh9vaFRWZPb2TGv5Ib041gvWSh81vSF01tgp\nLbYlt1wSVLVTa49+ryp33QU4mCTBkMGNIOyMA9tGQhEyXbh/lfWDW8us7qb/\noNGr\r\n=yVTL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsRWNVoeqwIUB0UALvKoAMDR55t4igal5CDyVkIK2jKwIhAL8Jtz5nooqDv4lqTcKNzHGMw+4brX0yCd21235nHlty"}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.2-beta.0_1553635642283_0.12889907852578264"},"_hasShrinkwrap":false},"0.5.2-beta.5":{"name":"amp-toolbox-optimizer","version":"0.5.2-beta.5","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","dependencies":{"amp-toolbox-core":"^0.1.5","amp-toolbox-runtime-version":"^0.2.6","css":"^2.2.4","jimp":"0.6.0","lru-cache":"^5.1.1","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"6a73853606c104de17557be3b6e29bbc52639185","readme":"# AMP Optimizer\n\n[![npm version](https://badge.fury.io/js/amp-toolbox-optimizer.svg)](https://badge.fury.io/js/amp-toolbox-optimizer)\n\nAMP Optimizer - the performance optimizations of the AMP Cache on your own site.\n\n![AMP Optimizer in Action](https://user-images.githubusercontent.com/380472/36001450-96cfbce2-0d26-11e8-8b65-4ffc3182d57c.gif)\n\nFirst Render - 3.0 seconds vs 4.8 seconds (37% faster) <br>\nVisually Complete - 3.7 seconds vs 6.4 seconds (42% faster) <br>\n\nwww.ampproject.org\n\n## Introduction\n\nAMP Optimizer optimizes AMPHTML files by: \n\n* Server-side rendering AMP layouts.\n* Removing the AMP boilerplate.\n* Pre-loading the AMP `v0.js` runtime to benefit from H2 push.\n* Versioning AMP runtime and extension imports.\n* Inlining critical CSS.\n\nYou can find the currently supported transformations [here](lib/transformers).\n\n**Warning: optimized AMPs will no longer be valid AMPHTML. Don't use this to optimize AMPs meant for being used by platforms such as Google Search.**\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Background](#background)\n- [Usage](#usage)\n  - [Options](#options)\n  - [Versioned AMP Runtime](##versioned-amp-runtime)\n- [Example](#example)\n- [Best Practices](#best-practices)\n  - [Transform AMP pages at build time if possible](#transform-amp-pages-at-build-time-if-possible)\n  - [Cache transformed AMPs](#cache-transformed-amps)\n- [Why is it faster?](#why-is-it-faster)\n- [Caveats](#caveats)\n- [Version History](#version-history)\n\n## Background\n\nThe [Google AMP Cache](https://developers.google.com/amp/cache/overview#cache-optimizations-and-modifications) performs additional optimizations to make AMP pages load even faster. You can find out more about these optimizations [here](https://github.com/ampproject/amphtml/issues/7022) and [here](https://github.com/ampproject/amphtml/issues/8566). This project provides a Node.js based implementation of the same set of transformations performed by the Google AMP Cache. This serves two goals:\n\n* Enable faster loading times for canonical AMP sites.\n* Provide a reference implementation for other AMP caches.\n\n## Usage\n\nInstall via:\n\n```\nnpm install amp-toolbox-optimizer\n```\n\nMinimal usage:\n\n```js\nconst ampOptimizer = require('amp-toolbox-optimizer');\n\n// Transformer expects a string (streams are not supported)\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n}).then(optimizedHtml => {\n  console.log(optimizedHtml);\n});\n\n```\n\nYou can find a sample implementation [here](demo/simple/). If you're using the express middleware in your backend, it's best to use the [AMP Optimizer Middleware](../optimizer-express).\n\n### Options\n\nCurrently the following options are supported:\n\n* **ampUrl**: an URL string pointing to the valid AMP version. Required by the AddAmpLink transformer.\n* **blurredPlaceholders**: enables blurry image placeholder generation. Default is `false`. **Important:** blurry image placeholder computation is expensive. Make sure to only use it for static or cached pages.\n* **imageBasePath**: a base URL or path required for resolving an image file from a given image `src` attribute. Used by for blurry image placeholder generation.\n* **maxBlurredPlaceholders**: specifies the max number of blurred images. Defaults to 5.\n* **ampRuntimeVersion** specifies a [specific version](https://github.com/ampproject/amp-toolbox/tree/master/runtime-version\") of the AMP runtime. For example: `ampRuntimeVersion: \"001515617716922\"` will result in AMP runtime URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  https://cdn.ampproject.org/rtv/001515617716922/v0.js\n  ```\n* **ampUrlPrefix (experimental)**: specifies an URL prefix for AMP runtime\n  URLs. For example: ```ampUrlPrefix: \"/amp\"` will result in AMP runtime\n  URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  /amp/v0.js\n  ```\n\n### Versioned AMP Runtime\n\nThe `ampRuntimeVersion` parameter will rewrite all AMP runtime and extension imports to the specified version. For example: \n\n```\nhttps://cdn.ampproject.org/v0.js\n```\n\nwill be replaced with:\n\n```\nhttps://cdn.ampproject.org/rtv/001515617716922/v0.js\n```\n\nVersioning the AMP runtime URLs has two benefits:\n\n1. Better usage of the brower cache: versioned AMP runtime URLs are served with a longer max-age than the unversioned ones.\n2. Critical CSS can be inlined. The AMP runtime defines it's [own CSS styles](https://cdn.ampproject.org/v0.css) for AMP layouts and other things. Versioning the AMP runtime makes it possible to inline these styles, which greatly improving time to FCP as it ensures that inlined styles and imported runtime are compatible.\n\n**Important:** when using versioned AMP runtime URLs make sure to invalidate all caches whenever a new AMP runtime is released. This is to ensure that your AMP pages always use the latest version of the AMP runtime.  \n\nYou can use [amp-toolbox-runtime-version](../amp-toolbox-runtime-version) to retrieve the latest version of the AMP runtime. Here is a sample to apply the optimizations including versioning the URLs:\n\n```\nconst ampOptimiser = require('amp-toolbox-optimizer');\n\n// retrieve the latest runtime version\nconst runtimeVersion = require('amp-toolbox-runtime-version');\n\n// retrieve the latest version\nconst ampRuntimeVersion = await runtimeVersion.currentVersion();\n\n// The input string\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nconst optimizedHtml = await ampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  ampRuntimeVersion: ampRuntimeVersion\n});\n\nconsole.log(optimizedHtml);\n```\n\n## Example\n\nThe following valid AMPHTML:\n\n```html\n<!doctype html>\n<html ⚡>\n<head>\n  <meta charset=\"utf-8\">\n  <link rel=\"canonical\" href=\"canonical.html\" />\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom>\n    h1 {\n      margin: 16px;\n    }\n  </style>\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=360 heigh=200 layout=responsive src=image.png></amp-img>\n</body>\n</html>\n```\n\nWill be transformed to:\n\n```html\n<!DOCTYPE html>\n<html i-amphtml-layout=\"\" i-amphtml-no-boilerplate=\"\">\n<head>\n  <style amp-runtime=\"\"></style>\n  <link rel=\"stylesheet\" href=\"https://cdn.ampproject.org/v0.css\">\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <script async=\"\" src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async=\"\" custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async=\"\" custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom=\"\">\n    h1 {\n      margin: 16px;\n    }\n  </style>\n  <link rel=\"canonical\" href=\"canonical.html\">\n  <link rel=\"amphtml\" href=\"canonical.amp.html\">\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=\"360\" heigh=\"200\" layout=\"responsive\" src=\"image.png\" class=\"i-amphtml-layout-responsive i-amphtml-layout-size-defined\" i-amphtml-layout=\"responsive\"></amp-img>\n</body>\n</html>\n```\n\nA few notable changes are:\n\n* The AMP attribute in the `html` tag gets removed as it's no longer valid AMP.\n* The AMP boilerplate gets removed. Instead the `v0.css` is added.\n* AMP layout classes are added to the `amp-img` extension.\n* `<link rel=\"amphtml\" href=\"canonical.amp.html\">` gets added linking to the valid AMP version.\n\n## Best Practices\n\n### Debugging\n\nEnable `verbose` mode to find out why the AMP boilerplate is not being removed.\n\n```\n// globally\nampOptimizer.setConfig({\n  verbose: true\n});\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n})\n\n// per transformation\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  verbose: true\n})\n```\n\n### Transform AMP pages at build time if possible\n\nApplying the transformations to an AMP file consumes additional server\nresources. Also, since the entire file is needed to apply the transformations,\nit also becomes impossible to stream the response while applying it.\n\nIn order to avoid server overhead, if the set of AMP files to be transformed is\nknown in advance, transformations should be run at build time.\n\n### Cache transformed AMPs\n\nMost websites have a more dynamic nature though and are not able to apply the\ntransformations statically. For such cases it is possible to run the\ntransformations after AMP pages are rendered, e.g. in an Express middleware.\n\nTo achieve best performance, those transformations shouldn't be applied for\nevery request. Instead, transformations should only be applied the *first time*\na page is requested, and the results then cached. Caching can happen on the CDN\nlevel, on the site's internal infrastructure (eg: Memcached), or even on the\nserver itself, if the set of pages is small enough to fit in memory.\n\n## Why is it faster?\n\nIn order to avoid Flash of Unstyled Content (FOUC) and reflows resulting from to the\nusage of web-components, AMP requires websites to add the amp-boilerplate in the header.\n\nThe amp-boilerplate renders the page invisible by changing it's opacity, while\nthe fonts and the AMP Runtime load. Once the AMP runtime is loaded, it is able\nto correctly set the sizes of the custom elements and once that happens, the\nruntimes makes the page visible again.\n\nAs a consequence, the first render of the page doesn't happen until the AMP\nRuntime is loaded.\n\nTo improve this, AMP server-side rendering applies the same rules as the\nAMP Runtime on the server. This ensures that the reflow will not happen  and\nthe AMP boilerplate is no longer needed. The first render no longer depends on the\nAMP Runtime being loaded, which improves load times.\n\n## Caveats\n\nIt's important to note that, even though the text content and layout will show\nfaster, content that depends on the custom AMP elements (eg: any element in\nthe page that starts with 'amp-') will only be visible after the AMP Runtime\nis loaded.\n\n","readmeFilename":"README.md","_id":"amp-toolbox-optimizer@0.5.2-beta.5","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.13.1/node@v10.11.0+x64 (darwin)","dist":{"integrity":"sha512-jsweKYFESnRBoHWdo9x75HcF4IvRcztS6A+R6hpZIW5g+YAVkLj0QvFL0Djz9q/jc9wJh++XKnnSwe7PTN9XBQ==","shasum":"8f5cedb9166c7652a3fb7e99f18d6038923688d8","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.2-beta.5.tgz","fileCount":24,"unpackedSize":93913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpRuBCRA9TVsSAnZWagAAVREQAKL2T07AqEiMAIXk4wt5\nIvfYyKzaaB57SfKSbGIL6+J/Uzg9WGYRixG9CKzNv4njE/z+yWCX0e9GSbbZ\novg4lrTvKIB3dbTyi3aqeZMHXCR7qh4rSceRgDxSiUqRtG8kQYRzxcXeHoWg\nSltOsbp+QEiNfaFdsfq6TQsRZQDDl2ADPp5+NZYuNAMDTr4cBpvFstY8dZne\nNoyHYyYptt+F7U/QJ5xseBzhT9NWymUNQUptK2+rs5kQxe1vfwgYDhcEoUeg\nae9fSyR6KnbJUtYnzKYauwlKuFn1hBs03hh/kp53i9lV2sUzJSXH/HIeIHyd\nj5inV0twXxVOQim6sqHi1cUmSn4LkJkWnJtZauy0VAKLAymTycgYLpb3OsTy\nYJeXrdq8VKroOws/dBX6HlW/XyKbPY0JyvY9hcT1cuJlEWOBkZNGLJLrryYX\nT8C7GZxHbZO/+XXFfcmJAK7Plb6tMke46DTS1aGcAjF705NihYPRoSjDmlNA\n2Qgji9/v5PtrCJRBlJzrj6d/rNRCzxUYZiuod1N5Jj9v2vVXHiAsKeJaFFwa\no8Fwu0XpzQZcdRc+/MNdHczodse/9rhIsjivGx80PhcKD+cCd6p2BIaKNQHr\ns/igEuZVbLbrCpfPjdZujRZQBrfjvgXe9v+RzN/Q3uWa7zfUd2yFWWA73w7B\noeKT\r\n=Nj+j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDCdbKuzlaoqwkAPJPUM4tXzcAfY8grru5PVUjG7wEndAiBGWXxBPTRsMNVjo8CPICjgUKLNvvtOYNboECigwBes8w=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.2-beta.5_1554324352562_0.6018968297662224"},"_hasShrinkwrap":false},"0.5.2-beta.4":{"name":"amp-toolbox-optimizer","version":"0.5.2-beta.4","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^0.1.5","amp-toolbox-runtime-version":"^0.2.6","css":"^2.2.4","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"devDependencies":{"jimp":"0.6.0","lru-cache":"^5.1.1"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"814f2549e1bbb86296fcbfadd1ea71bc6bd08cc2","readme":"# AMP Optimizer\n\n[![npm version](https://badge.fury.io/js/amp-toolbox-optimizer.svg)](https://badge.fury.io/js/amp-toolbox-optimizer)\n\nAMP Optimizer - the performance optimizations of the AMP Cache on your own site.\n\n![AMP Optimizer in Action](https://user-images.githubusercontent.com/380472/36001450-96cfbce2-0d26-11e8-8b65-4ffc3182d57c.gif)\n\nFirst Render - 3.0 seconds vs 4.8 seconds (37% faster) <br>\nVisually Complete - 3.7 seconds vs 6.4 seconds (42% faster) <br>\n\nwww.ampproject.org\n\n## Introduction\n\nAMP Optimizer optimizes AMPHTML files by: \n\n* Server-side rendering AMP layouts.\n* Removing the AMP boilerplate.\n* Pre-loading the AMP `v0.js` runtime to benefit from H2 push.\n* Versioning AMP runtime and extension imports.\n* Inlining critical CSS.\n\nYou can find the currently supported transformations [here](lib/transformers).\n\n**Warning: optimized AMPs will no longer be valid AMPHTML. Don't use this to optimize AMPs meant for being used by platforms such as Google Search.**\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Background](#background)\n- [Usage](#usage)\n  - [Options](#options)\n  - [Versioned AMP Runtime](##versioned-amp-runtime)\n- [Example](#example)\n- [Best Practices](#best-practices)\n  - [Transform AMP pages at build time if possible](#transform-amp-pages-at-build-time-if-possible)\n  - [Cache transformed AMPs](#cache-transformed-amps)\n- [Why is it faster?](#why-is-it-faster)\n- [Caveats](#caveats)\n- [Version History](#version-history)\n\n## Background\n\nThe [Google AMP Cache](https://developers.google.com/amp/cache/overview#cache-optimizations-and-modifications) performs additional optimizations to make AMP pages load even faster. You can find out more about these optimizations [here](https://github.com/ampproject/amphtml/issues/7022) and [here](https://github.com/ampproject/amphtml/issues/8566). This project provides a Node.js based implementation of the same set of transformations performed by the Google AMP Cache. This serves two goals:\n\n* Enable faster loading times for canonical AMP sites.\n* Provide a reference implementation for other AMP caches.\n\n## Usage\n\nInstall via:\n\n```\nnpm install amp-toolbox-optimizer\n```\n\nMinimal usage:\n\n```js\nconst ampOptimizer = require('amp-toolbox-optimizer');\n\n// Transformer expects a string (streams are not supported)\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n}).then(optimizedHtml => {\n  console.log(optimizedHtml);\n});\n\n```\n\nYou can find a sample implementation [here](demo/simple/). If you're using the express middleware in your backend, it's best to use the [AMP Optimizer Middleware](../optimizer-express).\n\n### Options\n\nCurrently the following options are supported:\n\n* **ampUrl**: an URL string pointing to the valid AMP version. Required by the AddAmpLink transformer.\n* **blurredPlaceholders**: enables blurry image placeholder generation. Default is `false`. This transforms requires install `jimp` and `lru-cache`: `npm install jimp lru-cache` **Important:** blurry image placeholder computation is expensive. Make sure to only use it for static or cached pages.\n* **imageBasePath**: a base URL or path required for resolving an image file from a given image `src` attribute. Used by for blurry image placeholder generation.\n* **maxBlurredPlaceholders**: specifies the max number of blurred images. Defaults to 5.\n* **ampRuntimeVersion** specifies a [specific version](https://github.com/ampproject/amp-toolbox/tree/master/runtime-version\") of the AMP runtime. For example: `ampRuntimeVersion: \"001515617716922\"` will result in AMP runtime URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  https://cdn.ampproject.org/rtv/001515617716922/v0.js\n  ```\n* **ampUrlPrefix (experimental)**: specifies an URL prefix for AMP runtime\n  URLs. For example: ```ampUrlPrefix: \"/amp\"` will result in AMP runtime\n  URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  /amp/v0.js\n  ```\n\n### Versioned AMP Runtime\n\nThe `ampRuntimeVersion` parameter will rewrite all AMP runtime and extension imports to the specified version. For example: \n\n```\nhttps://cdn.ampproject.org/v0.js\n```\n\nwill be replaced with:\n\n```\nhttps://cdn.ampproject.org/rtv/001515617716922/v0.js\n```\n\nVersioning the AMP runtime URLs has two benefits:\n\n1. Better usage of the brower cache: versioned AMP runtime URLs are served with a longer max-age than the unversioned ones.\n2. Critical CSS can be inlined. The AMP runtime defines it's [own CSS styles](https://cdn.ampproject.org/v0.css) for AMP layouts and other things. Versioning the AMP runtime makes it possible to inline these styles, which greatly improving time to FCP as it ensures that inlined styles and imported runtime are compatible.\n\n**Important:** when using versioned AMP runtime URLs make sure to invalidate all caches whenever a new AMP runtime is released. This is to ensure that your AMP pages always use the latest version of the AMP runtime.  \n\nYou can use [amp-toolbox-runtime-version](../amp-toolbox-runtime-version) to retrieve the latest version of the AMP runtime. Here is a sample to apply the optimizations including versioning the URLs:\n\n```\nconst ampOptimiser = require('amp-toolbox-optimizer');\n\n// retrieve the latest runtime version\nconst runtimeVersion = require('amp-toolbox-runtime-version');\n\n// retrieve the latest version\nconst ampRuntimeVersion = await runtimeVersion.currentVersion();\n\n// The input string\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nconst optimizedHtml = await ampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  ampRuntimeVersion: ampRuntimeVersion\n});\n\nconsole.log(optimizedHtml);\n```\n\n## Example\n\nThe following valid AMPHTML:\n\n```html\n<!doctype html>\n<html ⚡>\n<head>\n  <meta charset=\"utf-8\">\n  <link rel=\"canonical\" href=\"canonical.html\" />\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom>\n    h1 {\n      margin: 16px;\n    }\n  </style>\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=360 heigh=200 layout=responsive src=image.png></amp-img>\n</body>\n</html>\n```\n\nWill be transformed to:\n\n```html\n<!DOCTYPE html>\n<html i-amphtml-layout=\"\" i-amphtml-no-boilerplate=\"\">\n<head>\n  <style amp-runtime=\"\"></style>\n  <link rel=\"stylesheet\" href=\"https://cdn.ampproject.org/v0.css\">\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <script async=\"\" src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async=\"\" custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async=\"\" custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom=\"\">\n    h1 {\n      margin: 16px;\n    }\n  </style>\n  <link rel=\"canonical\" href=\"canonical.html\">\n  <link rel=\"amphtml\" href=\"canonical.amp.html\">\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=\"360\" heigh=\"200\" layout=\"responsive\" src=\"image.png\" class=\"i-amphtml-layout-responsive i-amphtml-layout-size-defined\" i-amphtml-layout=\"responsive\"></amp-img>\n</body>\n</html>\n```\n\nA few notable changes are:\n\n* The AMP attribute in the `html` tag gets removed as it's no longer valid AMP.\n* The AMP boilerplate gets removed. Instead the `v0.css` is added.\n* AMP layout classes are added to the `amp-img` extension.\n* `<link rel=\"amphtml\" href=\"canonical.amp.html\">` gets added linking to the valid AMP version.\n\n## Best Practices\n\n### Debugging\n\nEnable `verbose` mode to find out why the AMP boilerplate is not being removed.\n\n```\n// globally\nampOptimizer.setConfig({\n  verbose: true\n});\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n})\n\n// per transformation\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  verbose: true\n})\n```\n\n### Transform AMP pages at build time if possible\n\nApplying the transformations to an AMP file consumes additional server\nresources. Also, since the entire file is needed to apply the transformations,\nit also becomes impossible to stream the response while applying it.\n\nIn order to avoid server overhead, if the set of AMP files to be transformed is\nknown in advance, transformations should be run at build time.\n\n### Cache transformed AMPs\n\nMost websites have a more dynamic nature though and are not able to apply the\ntransformations statically. For such cases it is possible to run the\ntransformations after AMP pages are rendered, e.g. in an Express middleware.\n\nTo achieve best performance, those transformations shouldn't be applied for\nevery request. Instead, transformations should only be applied the *first time*\na page is requested, and the results then cached. Caching can happen on the CDN\nlevel, on the site's internal infrastructure (eg: Memcached), or even on the\nserver itself, if the set of pages is small enough to fit in memory.\n\n## Why is it faster?\n\nIn order to avoid Flash of Unstyled Content (FOUC) and reflows resulting from to the\nusage of web-components, AMP requires websites to add the amp-boilerplate in the header.\n\nThe amp-boilerplate renders the page invisible by changing it's opacity, while\nthe fonts and the AMP Runtime load. Once the AMP runtime is loaded, it is able\nto correctly set the sizes of the custom elements and once that happens, the\nruntimes makes the page visible again.\n\nAs a consequence, the first render of the page doesn't happen until the AMP\nRuntime is loaded.\n\nTo improve this, AMP server-side rendering applies the same rules as the\nAMP Runtime on the server. This ensures that the reflow will not happen  and\nthe AMP boilerplate is no longer needed. The first render no longer depends on the\nAMP Runtime being loaded, which improves load times.\n\n## Caveats\n\nIt's important to note that, even though the text content and layout will show\nfaster, content that depends on the custom AMP elements (eg: any element in\nthe page that starts with 'amp-') will only be visible after the AMP Runtime\nis loaded.\n\n","readmeFilename":"README.md","_id":"amp-toolbox-optimizer@0.5.2-beta.4","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.13.1/node@v10.11.0+x64 (darwin)","dist":{"integrity":"sha512-IHTKATXu2EKipOvwilvdlNx6pDbxDHujQnyQqMm6IkTN6yNRaBQv3s+LeY7Cxi1xFUpBNg/3LmrCLthJ+BLqoQ==","shasum":"286ceb5c187b3848138952910e5ad0a5215262fa","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.2-beta.4.tgz","fileCount":24,"unpackedSize":94776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpesLCRA9TVsSAnZWagAAaeoQAJDj3kyjzWRhxpRd/2ep\nFuGth0DaBVDO/RuHA8NAl9tSjJr2Al4YqU6yamOKkHuI7vswoOu2xiQmj9/U\nSAU/sU1YH3iJSCvZ9o7YrGeagNce+8yie6Vs63LwgpXZMIOg8JqxC7S9OA5u\nehsBymYUX+7p0er6tSt8JWH2A8N5bOpGLjaBk/yhuIdw/hAgfqiM/xpoFAGE\nTTGZqoIi9ukFSj0pqw57jV0iUCHfjyWuaVmTj5gvjJuYZ1TDkLx9K973AJ2F\nPm8FUWxBomzVkfjKoQ/K/nYNWxSjkJWRYcbTu5Iaut9Fj5CDj5K1afUGUFbE\njeSZR1NUdZktEwhvb7XeKRXUMaogm1pvQwJbrvCIpmYNLioQB6A2e6QMQUWa\nUSxhclbDFbMn6lpyreTGXVe19t3ngtCzBjaVxob7aribdAguFQyXr15bJ+Ud\nDfCq8IEMkyPaqnoVORu3r23x9fKOAeZKt0HdpGKFq5r6T2gIaBPwnp0XlhWg\nZXKlgzhdqmxzmKGhlfFlURNIHHBDQVEsdQTwVXuHE5Q3f0tHLNJHojBJmdud\nj1iwYU9WcDm1An2tmncgB54SCwL/If4jX0EwXnL61hVocvutf/fgXLMuqlQ1\nlNP0T442rBzzlcE2BduczPmURNRqUKlPuqIkt7Sj9p5DQeLQMkzMlwQo4tKy\nIhJt\r\n=gciF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENSd1+j4dxNC0sZXg8aqWcd7+0TVpNVh+Qigu0jijvBAiAzKqDnWuZvVTdwO0cc0V5feAE9VrOuDchxbZiAfPQ1cg=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.2-beta.4_1554377482479_0.10440554819663173"},"_hasShrinkwrap":false},"0.5.2-beta.6":{"name":"amp-toolbox-optimizer","version":"0.5.2-beta.6","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^0.1.5","amp-toolbox-runtime-version":"^0.2.6","css":"^2.2.4","parse5":"^5.1.0","parse5-htmlparser2-tree-adapter":"^5.1.0"},"devDependencies":{"jimp":"0.6.0","lru-cache":"^5.1.1"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"a490384f040ede1eb569c807cbfab286eba77c4d","readme":"# AMP Optimizer\n\n[![npm version](https://badge.fury.io/js/amp-toolbox-optimizer.svg)](https://badge.fury.io/js/amp-toolbox-optimizer)\n\nAMP Optimizer - the performance optimizations of the AMP Cache on your own site.\n\n![AMP Optimizer in Action](https://user-images.githubusercontent.com/380472/36001450-96cfbce2-0d26-11e8-8b65-4ffc3182d57c.gif)\n\nFirst Render - 3.0 seconds vs 4.8 seconds (37% faster) <br>\nVisually Complete - 3.7 seconds vs 6.4 seconds (42% faster) <br>\n\nwww.ampproject.org\n\n## Introduction\n\nAMP Optimizer optimizes AMPHTML files by: \n\n* Server-side rendering AMP layouts.\n* Removing the AMP boilerplate.\n* Pre-loading the AMP `v0.js` runtime to benefit from H2 push.\n* Versioning AMP runtime and extension imports.\n* Inlining critical CSS.\n\nYou can find the currently supported transformations [here](lib/transformers).\n\n**Warning: optimized AMPs will no longer be valid AMPHTML. Don't use this to optimize AMPs meant for being used by platforms such as Google Search.**\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Background](#background)\n- [Usage](#usage)\n  - [Options](#options)\n  - [Versioned AMP Runtime](##versioned-amp-runtime)\n- [Example](#example)\n- [Best Practices](#best-practices)\n  - [Transform AMP pages at build time if possible](#transform-amp-pages-at-build-time-if-possible)\n  - [Cache transformed AMPs](#cache-transformed-amps)\n- [Why is it faster?](#why-is-it-faster)\n- [Caveats](#caveats)\n- [Version History](#version-history)\n\n## Background\n\nThe [Google AMP Cache](https://developers.google.com/amp/cache/overview#cache-optimizations-and-modifications) performs additional optimizations to make AMP pages load even faster. You can find out more about these optimizations [here](https://github.com/ampproject/amphtml/issues/7022) and [here](https://github.com/ampproject/amphtml/issues/8566). This project provides a Node.js based implementation of the same set of transformations performed by the Google AMP Cache. This serves two goals:\n\n* Enable faster loading times for canonical AMP sites.\n* Provide a reference implementation for other AMP caches.\n\n## Usage\n\nInstall via:\n\n```\nnpm install amp-toolbox-optimizer\n```\n\nMinimal usage:\n\n```js\nconst ampOptimizer = require('amp-toolbox-optimizer');\n\n// Transformer expects a string (streams are not supported)\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n}).then(optimizedHtml => {\n  console.log(optimizedHtml);\n});\n\n```\n\nYou can find a sample implementation [here](demo/simple/). If you're using the express middleware in your backend, it's best to use the [AMP Optimizer Middleware](../optimizer-express).\n\n### Options\n\nCurrently the following options are supported:\n\n* **ampUrl**: an URL string pointing to the valid AMP version. Required by the AddAmpLink transformer.\n* **blurredPlaceholders**: enables blurry image placeholder generation. Default is `false`. This transforms requires install `jimp` and `lru-cache`: `npm install jimp lru-cache` **Important:** blurry image placeholder computation is expensive. Make sure to only use it for static or cached pages.\n* **imageBasePath**: a base URL or path required for resolving an image file from a given image `src` attribute. Used by for blurry image placeholder generation.\n* **maxBlurredPlaceholders**: specifies the max number of blurred images. Defaults to 5.\n* **ampRuntimeVersion** specifies a [specific version](https://github.com/ampproject/amp-toolbox/tree/master/runtime-version\") of the AMP runtime. For example: `ampRuntimeVersion: \"001515617716922\"` will result in AMP runtime URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  https://cdn.ampproject.org/rtv/001515617716922/v0.js\n  ```\n* **ampUrlPrefix (experimental)**: specifies an URL prefix for AMP runtime\n  URLs. For example: ```ampUrlPrefix: \"/amp\"` will result in AMP runtime\n  URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  /amp/v0.js\n  ```\n\n### Versioned AMP Runtime\n\nThe `ampRuntimeVersion` parameter will rewrite all AMP runtime and extension imports to the specified version. For example: \n\n```\nhttps://cdn.ampproject.org/v0.js\n```\n\nwill be replaced with:\n\n```\nhttps://cdn.ampproject.org/rtv/001515617716922/v0.js\n```\n\nVersioning the AMP runtime URLs has two benefits:\n\n1. Better usage of the brower cache: versioned AMP runtime URLs are served with a longer max-age than the unversioned ones.\n2. Critical CSS can be inlined. The AMP runtime defines it's [own CSS styles](https://cdn.ampproject.org/v0.css) for AMP layouts and other things. Versioning the AMP runtime makes it possible to inline these styles, which greatly improving time to FCP as it ensures that inlined styles and imported runtime are compatible.\n\n**Important:** when using versioned AMP runtime URLs make sure to invalidate all caches whenever a new AMP runtime is released. This is to ensure that your AMP pages always use the latest version of the AMP runtime.  \n\nYou can use [amp-toolbox-runtime-version](../amp-toolbox-runtime-version) to retrieve the latest version of the AMP runtime. Here is a sample to apply the optimizations including versioning the URLs:\n\n```\nconst ampOptimiser = require('amp-toolbox-optimizer');\n\n// retrieve the latest runtime version\nconst runtimeVersion = require('amp-toolbox-runtime-version');\n\n// retrieve the latest version\nconst ampRuntimeVersion = await runtimeVersion.currentVersion();\n\n// The input string\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nconst optimizedHtml = await ampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  ampRuntimeVersion: ampRuntimeVersion\n});\n\nconsole.log(optimizedHtml);\n```\n\n## Example\n\nThe following valid AMPHTML:\n\n```html\n<!doctype html>\n<html ⚡>\n<head>\n  <meta charset=\"utf-8\">\n  <link rel=\"canonical\" href=\"canonical.html\" />\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom>\n    h1 {\n      margin: 16px;\n    }\n  </style>\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=360 heigh=200 layout=responsive src=image.png></amp-img>\n</body>\n</html>\n```\n\nWill be transformed to:\n\n```html\n<!DOCTYPE html>\n<html i-amphtml-layout=\"\" i-amphtml-no-boilerplate=\"\">\n<head>\n  <style amp-runtime=\"\"></style>\n  <link rel=\"stylesheet\" href=\"https://cdn.ampproject.org/v0.css\">\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <script async=\"\" src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async=\"\" custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async=\"\" custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom=\"\">\n    h1 {\n      margin: 16px;\n    }\n  </style>\n  <link rel=\"canonical\" href=\"canonical.html\">\n  <link rel=\"amphtml\" href=\"canonical.amp.html\">\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=\"360\" heigh=\"200\" layout=\"responsive\" src=\"image.png\" class=\"i-amphtml-layout-responsive i-amphtml-layout-size-defined\" i-amphtml-layout=\"responsive\"></amp-img>\n</body>\n</html>\n```\n\nA few notable changes are:\n\n* The AMP attribute in the `html` tag gets removed as it's no longer valid AMP.\n* The AMP boilerplate gets removed. Instead the `v0.css` is added.\n* AMP layout classes are added to the `amp-img` extension.\n* `<link rel=\"amphtml\" href=\"canonical.amp.html\">` gets added linking to the valid AMP version.\n\n## Best Practices\n\n### Debugging\n\nEnable `verbose` mode to find out why the AMP boilerplate is not being removed.\n\n```\n// globally\nampOptimizer.setConfig({\n  verbose: true\n});\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n})\n\n// per transformation\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  verbose: true\n})\n```\n\n### Transform AMP pages at build time if possible\n\nApplying the transformations to an AMP file consumes additional server\nresources. Also, since the entire file is needed to apply the transformations,\nit also becomes impossible to stream the response while applying it.\n\nIn order to avoid server overhead, if the set of AMP files to be transformed is\nknown in advance, transformations should be run at build time.\n\n### Cache transformed AMPs\n\nMost websites have a more dynamic nature though and are not able to apply the\ntransformations statically. For such cases it is possible to run the\ntransformations after AMP pages are rendered, e.g. in an Express middleware.\n\nTo achieve best performance, those transformations shouldn't be applied for\nevery request. Instead, transformations should only be applied the *first time*\na page is requested, and the results then cached. Caching can happen on the CDN\nlevel, on the site's internal infrastructure (eg: Memcached), or even on the\nserver itself, if the set of pages is small enough to fit in memory.\n\n## Why is it faster?\n\nIn order to avoid Flash of Unstyled Content (FOUC) and reflows resulting from to the\nusage of web-components, AMP requires websites to add the amp-boilerplate in the header.\n\nThe amp-boilerplate renders the page invisible by changing it's opacity, while\nthe fonts and the AMP Runtime load. Once the AMP runtime is loaded, it is able\nto correctly set the sizes of the custom elements and once that happens, the\nruntimes makes the page visible again.\n\nAs a consequence, the first render of the page doesn't happen until the AMP\nRuntime is loaded.\n\nTo improve this, AMP server-side rendering applies the same rules as the\nAMP Runtime on the server. This ensures that the reflow will not happen  and\nthe AMP boilerplate is no longer needed. The first render no longer depends on the\nAMP Runtime being loaded, which improves load times.\n\n## Caveats\n\nIt's important to note that, even though the text content and layout will show\nfaster, content that depends on the custom AMP elements (eg: any element in\nthe page that starts with 'amp-') will only be visible after the AMP Runtime\nis loaded.\n\n","readmeFilename":"README.md","_id":"amp-toolbox-optimizer@0.5.2-beta.6","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.13.1/node@v10.11.0+x64 (darwin)","dist":{"integrity":"sha512-Dtuq3W+cTludZcNbGEecIfKsq55YqlLuJ9eCr6HaMjwm8pJlsXnjDcYgQVqsbF4R5KLjsr/AywX3xYTi2ni8lQ==","shasum":"3f8ac38403bcae71b590d3f2579b0617689dbe56","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.2-beta.6.tgz","fileCount":24,"unpackedSize":94776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpe3vCRA9TVsSAnZWagAABMMQAIjyrkf7PhAkPP6f4X2e\nvLhoe46LH/Ko4qQ+EvFsEsSfrMXJ0dk2mJX/KvjEyBvSiLBBi64r35NTKARc\nq0dG5Xg6PxgyZ1I73PCUgoZIZXVI5WfkQJX1xCoKvtHTsSiEc3Py86567DqR\nme7hqz3+1VcHmvEVuHAp++o621xehFTT8fQEEiMNPrrjZ69Sgt1H6ZY+o3Ra\nQW6SQ6AtBlyC01BPimNjWE4ToKRAvq3GHNy+BRWuPrHXbFPaCizNu9tLwUyW\nbrKwJX83G975EcEofabybGAPn/6wAGE+nCdyUOXFjWEf05vNs7JyjAl4zB2b\nx15XhCMyrbGOJOxLUdsQ//UPvIMyHKPyoVY4qhjxZ7SKVPY0e2lCyJu/rAzc\nUnxv/3bqKaoaHJjgcuf9aeIxRy3woso5XoYKNZx6Wa8iQOCqKGsAMJt5dMLf\n562wO3/J6eRtf3jHh36PxGi+Zjs4zCGDpRLWJU7vtoIdQOSZGi/n56J/hYh/\nBNsyD3wxM6tMYU83Vjw+IUajAczJTzdWYsPg/YpdLlhnGmz1rJDlBeZ/NSas\n4gV4xWVpPN5uGhG25dLeX4NSfM1Gvx1Ee80HFIgLhcq3zciHkkSynmE9u2hV\nwYKvbqevs+zoA3erC/YRJyym968OcYxFKDkSmr+7E//0wpmbkMBP85RzzWxZ\nVoL+\r\n=nHFz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEr6e5Pqgbz3RpqWKXAPpMLIhAAbHZVB4wy5EYO8BmVoAiAy9LRdCX9kRJSb2S0TXI9aCuMy+8J7DD5y0lo+6fjLYw=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.2-beta.6_1554378222684_0.7290144279103641"},"_hasShrinkwrap":false},"0.5.2":{"name":"amp-toolbox-optimizer","version":"0.5.2","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^0.1.6","amp-toolbox-runtime-version":"^0.2.7","css":"2.2.4","parse5":"5.1.0","parse5-htmlparser2-tree-adapter":"5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"2d35887de8569692b17e90ea59717aa4720af602","_id":"amp-toolbox-optimizer@0.5.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"dist":{"integrity":"sha512-8fldWduvWHWDzy0jQGw2YkjjtpPVq945ieB1T0nOxygEdPBBdj9B6UP/wUJ96yrhAFVWuhMah/FmEaZJkvuYUw==","shasum":"f54ac519aeb72bde50e16f34ff0ab49a81930296","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.2.tgz","fileCount":23,"unpackedSize":84208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwAUPCRA9TVsSAnZWagAATGgP/3qN2Z5aSOYZ06i0Gl68\nCBsIMHPhGh0bgsP+eXx0QczRBhuWIHPRPTmlooDz5TAjr/1A0slgtK10Bstk\n5Yz0r1k2tk0LQ7JSIXiwSmRluHNi+C8uV6tZ2pX498eO3/Joy7TaEi596reK\nIHKlPoqS2s6Mjn8dAMgt5NGDsdBUtl1A38BU3uD4bE5uVZpwYf7ophlTO4In\nKEEZZkp26YJ0MJq8DzRhW5X34+HcjNSgplR0ybGnRyio3idIOW9SmrS7Jg1a\nhD7UgWU1mQhaKyGfyGTR5VslGYDWMWE9Ga64u19skGktqAUeBVNnC8iIZQyo\naMjEctNqfdy+9Mks2I5MyN86q3kl+gcfQA1lKGQnrYi8/h6SIkfim6Rb19un\n686ihaAu7AzHV20p41hdYSa6yE3BhS8MwqnIMgloh7JGJKoV/1McKAlKTZ6C\n+fz6J2+8qM2aXkhqwkiNq06Qe3xaHnfdfqar8SbfNbaZdV6bc5p1IUszBgSI\nc/SWxNYP2NVRLacq/prC6ksAmSibVvd+2ZgR+fELdyexWPueyLI6lc5Ic9yl\n5OmNAswnbHltA7PN3mkhLSeM0BT8YlrxVzs79HR0w7vjfb0vHr+UY+VcaEFm\nxJRXaqR6lV+c4FGhT1SHiIT67WRKdYmpKTUDxAJl/CeYqsTJsETU9uNkjh/0\nQ+PB\r\n=ZaGo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcs5T8qnXu0f0RTiteXHWFYkaZ59nZOmjqUBXzjqwwjgIhAIVCjZfLvecjZj/P4qAcIeBYbTnUys2RSbxBcuXqd2hl"}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.2_1556088077302_0.6661722687912448"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"0.5.3":{"name":"amp-toolbox-optimizer","version":"0.5.3","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^0.1.6","amp-toolbox-runtime-version":"^0.2.7","css":"2.2.4","parse5":"5.1.0","parse5-htmlparser2-tree-adapter":"5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"82f0e488e4478bb6bdecb2adc93ef51b293691d2","_id":"amp-toolbox-optimizer@0.5.3","_nodeVersion":"10.15.3","_npmVersion":"lerna/3.13.1/node@v10.15.3+x64 (darwin)","dist":{"integrity":"sha512-kw1dpWepegGJ8bxJd+qg+PfNj8oIG1erThuSWsGuLzgfHt1jQMZO+01N7BE4KjT2N1dLbqRFhJv3GjgaUMG+Lw==","shasum":"b7ab4c7651a6144c3271c1c7c0719082acbf1048","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-0.5.3.tgz","fileCount":24,"unpackedSize":95512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwFj0CRA9TVsSAnZWagAAnMwP/1yDxWl6gpwqcUZgxcMi\ns1K8tboczzxL1CrTwkuBRpef1aJhbCjgWHEdQcoJpgksqKse7I4P2WhLw6dP\nwQI9EBWTmjL3KRzHfJr6E2C0blFW9mk24S0arcNXJGH7EMiy+C70aMmGHXo8\nFitpKuoDq7VM9xsPwYgVU1C3ftWco71bBBTsTA2W1+j8tAKJ+28lmEXbrkNz\ncWLUwP/XZBCzkNNieYhu9ra9y2Kpdj8kfmPR/gjblPAmzKxVsBqFTG0OerLs\nEUy9hIF/2A/Ulc+8MjdLRvXTw0AfORcL8sdDG89YlDFtCYDwQ7YCTxq7X2XG\n2J14k/cVaF7qzWLBA6KYOlO7rGXh94OndHTIBWhj5abBWrBziu6hZsLyM9Iu\njm8W3oqGdF/yxyq+yefLgGra0SZVpkMszhMaX3lf5wmVdXQizVPhOyxp1j89\nHJKrtOScHpWc+OU7PQnvBRk6HMVSx7mMpPyo6wYPk2hMcEkVchum6egMYHX7\nC2WUGdZCgr0qpcdoa9xi9dTQyigoEo1+LDeL6k7FjZ6OkoBNaGr3Dejnv2dC\ni0fEArl7q+QvCuuNKL0cVuf/FMH1siUPFaC+SQE+NGsewDfMX72KRraYLH29\nlLAyimNOSVwAl/6mYBkxexx/86R+3bDAQAdTLlvc9xqQuf/Mqj/FCgQ+BwTu\nEkPM\r\n=NmLt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHy3Bm4dBzbjQPeaUDmM4lLA7S48F3610gQNXmPr4AR8AiEA1ihaaSHxSCNNvEy0CJvehnnoMvOI+EA1Djhzl3YDl4M="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_0.5.3_1556109556176_0.4854428865878351"},"_hasShrinkwrap":false,"deprecated":"\"amp-toolbox-optimizer has been moved to @ampproject/toolbox-optimizer\""},"1.2.0-alpha.0":{"name":"amp-toolbox-optimizer","version":"1.2.0-alpha.0","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^1.2.0-alpha.0","amp-toolbox-runtime-version":"^1.2.0-alpha.0","css":"2.2.4","parse5":"5.1.0","parse5-htmlparser2-tree-adapter":"5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"9d6243974ac2023a466656aa9790e47e1219a624","readme":"# AMP Optimizer\n\n[![npm version](https://badge.fury.io/js/amp-toolbox-optimizer.svg)](https://badge.fury.io/js/amp-toolbox-optimizer)\n\nAMP Optimizer - the performance optimizations of the AMP Cache on your own site.\n\n![AMP Optimizer in Action](https://user-images.githubusercontent.com/380472/36001450-96cfbce2-0d26-11e8-8b65-4ffc3182d57c.gif)\n\nFirst Render - 3.0 seconds vs 4.8 seconds (37% faster) <br>\nVisually Complete - 3.7 seconds vs 6.4 seconds (42% faster) <br>\n\nwww.ampproject.org\n\n## Introduction\n\nAMP Optimizer optimizes AMPHTML files by: \n\n* Server-side rendering AMP layouts.\n* Removing the AMP boilerplate.\n* Pre-loading the AMP `v0.js` runtime to benefit from H2 push.\n* Versioning AMP runtime and extension imports.\n* Inlining critical CSS.\n\nYou can find the currently supported transformations [here](lib/transformers).\n\n**Warning: optimized AMPs will no longer be valid AMPHTML. Don't use this to optimize AMPs meant for being used by platforms such as Google Search.**\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Background](#background)\n- [Usage](#usage)\n  - [Options](#options)\n  - [Versioned AMP Runtime](##versioned-amp-runtime)\n- [Example](#example)\n- [Best Practices](#best-practices)\n  - [Transform AMP pages at build time if possible](#transform-amp-pages-at-build-time-if-possible)\n  - [Cache transformed AMPs](#cache-transformed-amps)\n- [Why is it faster?](#why-is-it-faster)\n- [Caveats](#caveats)\n- [Version History](#version-history)\n\n## Background\n\nThe [Google AMP Cache](https://developers.google.com/amp/cache/overview#cache-optimizations-and-modifications) performs additional optimizations to make AMP pages load even faster. You can find out more about these optimizations [here](https://github.com/ampproject/amphtml/issues/7022) and [here](https://github.com/ampproject/amphtml/issues/8566). This project provides a Node.js based implementation of the same set of transformations performed by the Google AMP Cache. This serves two goals:\n\n* Enable faster loading times for canonical AMP sites.\n* Provide a reference implementation for other AMP caches.\n\n## Usage\n\nInstall via:\n\n```\nnpm install amp-toolbox-optimizer\n```\n\nMinimal usage:\n\n```js\nconst ampOptimizer = require('amp-toolbox-optimizer');\n\n// Transformer expects a string (streams are not supported)\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n}).then(optimizedHtml => {\n  console.log(optimizedHtml);\n});\n\n```\n\nYou can find a sample implementation [here](demo/simple/). If you're using the express middleware in your backend, it's best to use the [AMP Optimizer Middleware](../optimizer-express).\n\n### Options\n\nCurrently the following options are supported:\n\n* **ampUrl**: an URL string pointing to the valid AMP version. Required by the AddAmpLink transformer.\n* **blurredPlaceholders**: enables blurry image placeholder generation. Default is `false`. This transforms requires install `jimp` and `lru-cache`: `npm install jimp lru-cache` **Important:** blurry image placeholder computation is expensive. Make sure to only use it for static or cached pages.\n* **imageBasePath**: a base URL or path required for resolving an image file from a given image `src` attribute. Used by for blurry image placeholder generation.\n* **maxBlurredPlaceholders**: specifies the max number of blurred images. Defaults to 5.\n* **ampRuntimeVersion** specifies a [specific version](https://github.com/ampproject/amp-toolbox/tree/master/runtime-version\") of the AMP runtime. For example: `ampRuntimeVersion: \"001515617716922\"` will result in AMP runtime URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  https://cdn.ampproject.org/rtv/001515617716922/v0.js\n  ```\n* **ampUrlPrefix (experimental)**: specifies an URL prefix for AMP runtime\n  URLs. For example: ```ampUrlPrefix: \"/amp\"` will result in AMP runtime\n  URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  /amp/v0.js\n  ```\n\n### Versioned AMP Runtime\n\nThe `ampRuntimeVersion` parameter will rewrite all AMP runtime and extension imports to the specified version. For example: \n\n```\nhttps://cdn.ampproject.org/v0.js\n```\n\nwill be replaced with:\n\n```\nhttps://cdn.ampproject.org/rtv/001515617716922/v0.js\n```\n\nVersioning the AMP runtime URLs has two benefits:\n\n1. Better usage of the brower cache: versioned AMP runtime URLs are served with a longer max-age than the unversioned ones.\n2. Critical CSS can be inlined. The AMP runtime defines it's [own CSS styles](https://cdn.ampproject.org/v0.css) for AMP layouts and other things. Versioning the AMP runtime makes it possible to inline these styles, which greatly improving time to FCP as it ensures that inlined styles and imported runtime are compatible.\n\n**Important:** when using versioned AMP runtime URLs make sure to invalidate all caches whenever a new AMP runtime is released. This is to ensure that your AMP pages always use the latest version of the AMP runtime.  \n\nYou can use [amp-toolbox-runtime-version](../amp-toolbox-runtime-version) to retrieve the latest version of the AMP runtime. Here is a sample to apply the optimizations including versioning the URLs:\n\n```\nconst ampOptimiser = require('amp-toolbox-optimizer');\n\n// retrieve the latest runtime version\nconst runtimeVersion = require('amp-toolbox-runtime-version');\n\n// retrieve the latest version\nconst ampRuntimeVersion = await runtimeVersion.currentVersion();\n\n// The input string\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nconst optimizedHtml = await ampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  ampRuntimeVersion: ampRuntimeVersion\n});\n\nconsole.log(optimizedHtml);\n```\n\n## Example\n\nThe following valid AMPHTML:\n\n```html\n<!doctype html>\n<html ⚡>\n<head>\n  <meta charset=\"utf-8\">\n  <link rel=\"canonical\" href=\"canonical.html\" />\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom>\n    h1 {\n      margin: 16px;\n    }\n  </style>\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=360 heigh=200 layout=responsive src=image.png></amp-img>\n</body>\n</html>\n```\n\nWill be transformed to:\n\n```html\n<!DOCTYPE html>\n<html i-amphtml-layout=\"\" i-amphtml-no-boilerplate=\"\">\n<head>\n  <style amp-runtime=\"\"></style>\n  <link rel=\"stylesheet\" href=\"https://cdn.ampproject.org/v0.css\">\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <script async=\"\" src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async=\"\" custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async=\"\" custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom=\"\">\n    h1 {\n      margin: 16px;\n    }\n  </style>\n  <link rel=\"canonical\" href=\"canonical.html\">\n  <link rel=\"amphtml\" href=\"canonical.amp.html\">\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=\"360\" heigh=\"200\" layout=\"responsive\" src=\"image.png\" class=\"i-amphtml-layout-responsive i-amphtml-layout-size-defined\" i-amphtml-layout=\"responsive\"></amp-img>\n</body>\n</html>\n```\n\nA few notable changes are:\n\n* The AMP attribute in the `html` tag gets removed as it's no longer valid AMP.\n* The AMP boilerplate gets removed. Instead the `v0.css` is added.\n* AMP layout classes are added to the `amp-img` extension.\n* `<link rel=\"amphtml\" href=\"canonical.amp.html\">` gets added linking to the valid AMP version.\n\n## Best Practices\n\n### Debugging\n\nEnable `verbose` mode to find out why the AMP boilerplate is not being removed.\n\n```\n// globally\nampOptimizer.setConfig({\n  verbose: true\n});\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n})\n\n// per transformation\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  verbose: true\n})\n```\n\n### Transform AMP pages at build time if possible\n\nApplying the transformations to an AMP file consumes additional server\nresources. Also, since the entire file is needed to apply the transformations,\nit also becomes impossible to stream the response while applying it.\n\nIn order to avoid server overhead, if the set of AMP files to be transformed is\nknown in advance, transformations should be run at build time.\n\n### Cache transformed AMPs\n\nMost websites have a more dynamic nature though and are not able to apply the\ntransformations statically. For such cases it is possible to run the\ntransformations after AMP pages are rendered, e.g. in an Express middleware.\n\nTo achieve best performance, those transformations shouldn't be applied for\nevery request. Instead, transformations should only be applied the *first time*\na page is requested, and the results then cached. Caching can happen on the CDN\nlevel, on the site's internal infrastructure (eg: Memcached), or even on the\nserver itself, if the set of pages is small enough to fit in memory.\n\n## Why is it faster?\n\nIn order to avoid Flash of Unstyled Content (FOUC) and reflows resulting from to the\nusage of web-components, AMP requires websites to add the amp-boilerplate in the header.\n\nThe amp-boilerplate renders the page invisible by changing it's opacity, while\nthe fonts and the AMP Runtime load. Once the AMP runtime is loaded, it is able\nto correctly set the sizes of the custom elements and once that happens, the\nruntimes makes the page visible again.\n\nAs a consequence, the first render of the page doesn't happen until the AMP\nRuntime is loaded.\n\nTo improve this, AMP server-side rendering applies the same rules as the\nAMP Runtime on the server. This ensures that the reflow will not happen  and\nthe AMP boilerplate is no longer needed. The first render no longer depends on the\nAMP Runtime being loaded, which improves load times.\n\n## Caveats\n\nIt's important to note that, even though the text content and layout will show\nfaster, content that depends on the custom AMP elements (eg: any element in\nthe page that starts with 'amp-') will only be visible after the AMP Runtime\nis loaded.\n\n","readmeFilename":"README.md","_id":"amp-toolbox-optimizer@1.2.0-alpha.0","_nodeVersion":"10.15.3","_npmVersion":"lerna/3.13.1/node@v10.15.3+x64 (darwin)","dist":{"integrity":"sha512-DBnPC/1xq4rEpiUCn7JYezpdnlVHCcxQL5ZCtlIRyycHS9ynRpoy/MlAzCKb5iplKkVy66M1/c1lXv6px3DnjQ==","shasum":"3d122b358813ad7d966ca2c0e40c05fb703a2531","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-1.2.0-alpha.0.tgz","fileCount":25,"unpackedSize":97058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0UorCRA9TVsSAnZWagAAqkUQAIKG0heuqHpTKvXSneMp\nv9qAWLqOtZUmD6XFObZZkjio6M0Mp05PAGYpLXXYSE+vah/Yp9sYysJyXGOh\nBj4I8ph99ynNdNwNp6n+U2tAidJZdTdP5OT8qxyatPCzRjy9yTJGDDoo5ciR\n2oOeV0sZbW2qvZvMccSeNmbriBdHlBdG0K83LBWsF+WTMM+Vu3Bv/VprbfCY\n19lUu6wDQYen6deumwVUjPxTaPBg3/WgkWqm06XavGA707rGRZ7i5y55HP9k\n8bzj+dKM4Bb47CVvhMIwkSdmHsk9b+fgED6o/UUeYVffSTiXlALyiqtkmu8O\nvrSOvFwfgU7ZpeMdcs9TFOI5AkxuB1ERCFOgQ5S0sl+0qdIenk/eeksOGbOS\nzKbvfuWD7gkOsYFZGFLJ3Cj3TJ+fl2yPv/CzurH7LDhSc/NMh2YGFbGXpmLY\nBPQKGq69L2AkZYciyskVD07YqGAfed28mLfYGHavhfU4uGpGBn9Tj6b+TJKm\niXeKx/hJHnG+DhMyFegtqzBKuiBWThLrt+6IHG0GrwGTkoII9suLxZPFa7la\nA5uWlrfFPVO4fcdCgl5ugYCUXKOfUOoZvPGG7rFpuae+Ibmm6JYg2fCgLYPQ\nREvqBqNqqqNf0RIfjfSCBl77HXunFcmBkjJvXlIq0AjjaoGSKgxcVA2JuvCx\n4g8J\r\n=LNH5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwh+Kb4Kzc8DR3ehOtMSQ6vtoFP8ZXb/CoJAPz0Yb4nAiA8j62CDMlONCtofAkXRSF6LB6bKIPvVSebW4eJgtHnZg=="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_1.2.0-alpha.0_1557219882922_0.4030048521978349"},"_hasShrinkwrap":false},"1.2.0-alpha.1":{"name":"amp-toolbox-optimizer","version":"1.2.0-alpha.1","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^1.2.0-alpha.1","amp-toolbox-runtime-version":"^1.2.0-alpha.1","css":"2.2.4","parse5":"5.1.0","parse5-htmlparser2-tree-adapter":"5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"0b9aae09249e5572bdeb7c07bfb2f2beeb714b67","readme":"# AMP Optimizer\n\n[![npm version](https://badge.fury.io/js/amp-toolbox-optimizer.svg)](https://badge.fury.io/js/amp-toolbox-optimizer)\n\nAMP Optimizer - the performance optimizations of the AMP Cache on your own site.\n\n![AMP Optimizer in Action](https://user-images.githubusercontent.com/380472/36001450-96cfbce2-0d26-11e8-8b65-4ffc3182d57c.gif)\n\nFirst Render - 3.0 seconds vs 4.8 seconds (37% faster) <br>\nVisually Complete - 3.7 seconds vs 6.4 seconds (42% faster) <br>\n\nwww.ampproject.org\n\n## Introduction\n\nAMP Optimizer optimizes AMPHTML files by: \n\n* Server-side rendering AMP layouts.\n* Removing the AMP boilerplate.\n* Pre-loading the AMP `v0.js` runtime to benefit from H2 push.\n* Versioning AMP runtime and extension imports.\n* Inlining critical CSS.\n\nYou can find the currently supported transformations [here](lib/transformers).\n\n**Warning: optimized AMPs will no longer be valid AMPHTML. Don't use this to optimize AMPs meant for being used by platforms such as Google Search.**\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Background](#background)\n- [Usage](#usage)\n  - [Options](#options)\n  - [Versioned AMP Runtime](##versioned-amp-runtime)\n- [Example](#example)\n- [Best Practices](#best-practices)\n  - [Transform AMP pages at build time if possible](#transform-amp-pages-at-build-time-if-possible)\n  - [Cache transformed AMPs](#cache-transformed-amps)\n- [Why is it faster?](#why-is-it-faster)\n- [Caveats](#caveats)\n- [Version History](#version-history)\n\n## Background\n\nThe [Google AMP Cache](https://developers.google.com/amp/cache/overview#cache-optimizations-and-modifications) performs additional optimizations to make AMP pages load even faster. You can find out more about these optimizations [here](https://github.com/ampproject/amphtml/issues/7022) and [here](https://github.com/ampproject/amphtml/issues/8566). This project provides a Node.js based implementation of the same set of transformations performed by the Google AMP Cache. This serves two goals:\n\n* Enable faster loading times for canonical AMP sites.\n* Provide a reference implementation for other AMP caches.\n\n## Usage\n\nInstall via:\n\n```\nnpm install amp-toolbox-optimizer\n```\n\nMinimal usage:\n\n```js\nconst ampOptimizer = require('amp-toolbox-optimizer');\n\n// Transformer expects a string (streams are not supported)\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n}).then(optimizedHtml => {\n  console.log(optimizedHtml);\n});\n\n```\n\nYou can find a sample implementation [here](demo/simple/). If you're using the express middleware in your backend, it's best to use the [AMP Optimizer Middleware](../optimizer-express).\n\n### Options\n\nCurrently the following options are supported:\n\n* **ampUrl**: an URL string pointing to the valid AMP version. Required by the AddAmpLink transformer.\n* **blurredPlaceholders**: enables blurry image placeholder generation. Default is `false`. This transforms requires install `jimp` and `lru-cache`: `npm install jimp lru-cache` **Important:** blurry image placeholder computation is expensive. Make sure to only use it for static or cached pages.\n* **imageBasePath**: a base URL or path required for resolving an image file from a given image `src` attribute. Used by for blurry image placeholder generation.\n* **maxBlurredPlaceholders**: specifies the max number of blurred images. Defaults to 5.\n* **ampRuntimeVersion** specifies a [specific version](https://github.com/ampproject/amp-toolbox/tree/master/runtime-version\") of the AMP runtime. For example: `ampRuntimeVersion: \"001515617716922\"` will result in AMP runtime URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  https://cdn.ampproject.org/rtv/001515617716922/v0.js\n  ```\n* **ampUrlPrefix (experimental)**: specifies an URL prefix for AMP runtime\n  URLs. For example: ```ampUrlPrefix: \"/amp\"` will result in AMP runtime\n  URLs being re-written from:\n\n  ```\n  https://cdn.ampproject.org/v0.js\n  ```\n\n  to:\n\n  ```\n  /amp/v0.js\n  ```\n\n### Versioned AMP Runtime\n\nThe `ampRuntimeVersion` parameter will rewrite all AMP runtime and extension imports to the specified version. For example: \n\n```\nhttps://cdn.ampproject.org/v0.js\n```\n\nwill be replaced with:\n\n```\nhttps://cdn.ampproject.org/rtv/001515617716922/v0.js\n```\n\nVersioning the AMP runtime URLs has two benefits:\n\n1. Better usage of the brower cache: versioned AMP runtime URLs are served with a longer max-age than the unversioned ones.\n2. Critical CSS can be inlined. The AMP runtime defines it's [own CSS styles](https://cdn.ampproject.org/v0.css) for AMP layouts and other things. Versioning the AMP runtime makes it possible to inline these styles, which greatly improving time to FCP as it ensures that inlined styles and imported runtime are compatible.\n\n**Important:** when using versioned AMP runtime URLs make sure to invalidate all caches whenever a new AMP runtime is released. This is to ensure that your AMP pages always use the latest version of the AMP runtime.  \n\nYou can use [amp-toolbox-runtime-version](../amp-toolbox-runtime-version) to retrieve the latest version of the AMP runtime. Here is a sample to apply the optimizations including versioning the URLs:\n\n```\nconst ampOptimiser = require('amp-toolbox-optimizer');\n\n// retrieve the latest runtime version\nconst runtimeVersion = require('amp-toolbox-runtime-version');\n\n// retrieve the latest version\nconst ampRuntimeVersion = await runtimeVersion.currentVersion();\n\n// The input string\nconst originalHtml = `\n<!doctype html>\n<html ⚡>\n...\n`\n\n// Additional options can be passed as the second argument\nconst optimizedHtml = await ampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  ampRuntimeVersion: ampRuntimeVersion\n});\n\nconsole.log(optimizedHtml);\n```\n\n## Example\n\nThe following valid AMPHTML:\n\n```html\n<!doctype html>\n<html ⚡>\n<head>\n  <meta charset=\"utf-8\">\n  <link rel=\"canonical\" href=\"canonical.html\" />\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>\n  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom>\n    h1 {\n      margin: 16px;\n    }\n  </style>\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=360 heigh=200 layout=responsive src=image.png></amp-img>\n</body>\n</html>\n```\n\nWill be transformed to:\n\n```html\n<!DOCTYPE html>\n<html i-amphtml-layout=\"\" i-amphtml-no-boilerplate=\"\">\n<head>\n  <style amp-runtime=\"\"></style>\n  <link rel=\"stylesheet\" href=\"https://cdn.ampproject.org/v0.css\">\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n  <script async=\"\" src=\"https://cdn.ampproject.org/v0.js\"></script>\n  <script async=\"\" custom-element=\"amp-experiment\" src=\"https://cdn.ampproject.org/v0/amp-experiment-0.1.js\"></script>\n  <script async=\"\" custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.1.js\"></script>\n  <style amp-custom=\"\">\n    h1 {\n      margin: 16px;\n    }\n  </style>\n  <link rel=\"canonical\" href=\"canonical.html\">\n  <link rel=\"amphtml\" href=\"canonical.amp.html\">\n</head>\n<body>\n  <h1>Hello, AMP world!</h1>\n  <amp-img width=\"360\" heigh=\"200\" layout=\"responsive\" src=\"image.png\" class=\"i-amphtml-layout-responsive i-amphtml-layout-size-defined\" i-amphtml-layout=\"responsive\"></amp-img>\n</body>\n</html>\n```\n\nA few notable changes are:\n\n* The AMP attribute in the `html` tag gets removed as it's no longer valid AMP.\n* The AMP boilerplate gets removed. Instead the `v0.css` is added.\n* AMP layout classes are added to the `amp-img` extension.\n* `<link rel=\"amphtml\" href=\"canonical.amp.html\">` gets added linking to the valid AMP version.\n\n## Best Practices\n\n### Debugging\n\nEnable `verbose` mode to find out why the AMP boilerplate is not being removed.\n\n```\n// globally\nampOptimizer.setConfig({\n  verbose: true\n});\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html'\n})\n\n// per transformation\nampOptimizer.transformHtml(originalHtml, {\n  ampUrl: 'canonical.amp.html',\n  verbose: true\n})\n```\n\n### Transform AMP pages at build time if possible\n\nApplying the transformations to an AMP file consumes additional server\nresources. Also, since the entire file is needed to apply the transformations,\nit also becomes impossible to stream the response while applying it.\n\nIn order to avoid server overhead, if the set of AMP files to be transformed is\nknown in advance, transformations should be run at build time.\n\n### Cache transformed AMPs\n\nMost websites have a more dynamic nature though and are not able to apply the\ntransformations statically. For such cases it is possible to run the\ntransformations after AMP pages are rendered, e.g. in an Express middleware.\n\nTo achieve best performance, those transformations shouldn't be applied for\nevery request. Instead, transformations should only be applied the *first time*\na page is requested, and the results then cached. Caching can happen on the CDN\nlevel, on the site's internal infrastructure (eg: Memcached), or even on the\nserver itself, if the set of pages is small enough to fit in memory.\n\n## Why is it faster?\n\nIn order to avoid Flash of Unstyled Content (FOUC) and reflows resulting from to the\nusage of web-components, AMP requires websites to add the amp-boilerplate in the header.\n\nThe amp-boilerplate renders the page invisible by changing it's opacity, while\nthe fonts and the AMP Runtime load. Once the AMP runtime is loaded, it is able\nto correctly set the sizes of the custom elements and once that happens, the\nruntimes makes the page visible again.\n\nAs a consequence, the first render of the page doesn't happen until the AMP\nRuntime is loaded.\n\nTo improve this, AMP server-side rendering applies the same rules as the\nAMP Runtime on the server. This ensures that the reflow will not happen  and\nthe AMP boilerplate is no longer needed. The first render no longer depends on the\nAMP Runtime being loaded, which improves load times.\n\n## Caveats\n\nIt's important to note that, even though the text content and layout will show\nfaster, content that depends on the custom AMP elements (eg: any element in\nthe page that starts with 'amp-') will only be visible after the AMP Runtime\nis loaded.\n\n","readmeFilename":"README.md","_id":"amp-toolbox-optimizer@1.2.0-alpha.1","_nodeVersion":"10.15.3","_npmVersion":"lerna/3.14.1/node@v10.15.3+x64 (darwin)","dist":{"integrity":"sha512-H8divkzDAsI9p5cAJF8TCMD75AnWnTfSPgT7N8SctUzxeCh4jquDS03kl8mjCwbRSvnMrogh0/twQjoSjjIjpg==","shasum":"20a1c2a28bfe2e46179f43084db727634eb0e68a","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-1.2.0-alpha.1.tgz","fileCount":25,"unpackedSize":97244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4w5UCRA9TVsSAnZWagAAOngP/0Cz4JuZVo4/wE8gJ348\nwWXJfgRpFuwmXmdc4ENYeY4KZN60XHFgDATFWYRUhGIdEFY3HOHOCYB2ZZGF\n+4XqvfZHHvas+wD59OltKUvjdI0ulM1bc3TP9LJqG44gqUzXKU59JTR0l3qv\nejjrWlWyXE/oSnrkkxpH8iiqOPW9LPVnnBPL5Nbpk8soM1diTd9334ABYXt4\nE7wjtT5S7+Ww6/0UPnupnf87z5m6O5ODwOa06EwOG5e22+yvgAWf/AOkQ9PN\nwDgpW63qqVllNO/r6DKldics8vQvfMQfku9CDoYwMLGLEm+GCOlxPckcEKDK\naYPJhWjo+eC/shWN7dE6QeybgR8i+SpVhk5axtpg2mfHKYTZDnryl1Xlm8gP\nETBHNsXfGEDMc0D/GjgTTwJiJSnUHG2ccLXgA9wzxhM/Z3EftoBFAerXnyKA\ncqD8QksvxMRSN5QpPT+Km07SdLSN7a9bHoiOiPuBay4mU5b5TN7u16URGjH3\nuoJMEoHlUPmINmDXfYTN/LYDub5dt0zz6eqtY1XAo6f+Um9iOmWIwRvBMjSo\ngcEeGAFALx5wsTfckXFx+fOBD1hvZZx55i7d/l+ANjUxWagDLCtWgBqz8Zba\n90e03zii3ni2/B0yHWn8AbYrB2DkU3Ih4hffhiei8UaBu5Phf7ButCQoeed3\nSDhL\r\n=wI4F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHg7OvOfFpoJNnHU4tyjPBqkyKXyADejdU7g8cPWtfgvAiEAhVGJ+xCLfZ1KlRnmXoygWsK5GNfoKCDtm2xx3uFO6Zc="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_1.2.0-alpha.1_1558384211871_0.08058542406721392"},"_hasShrinkwrap":false},"1.2.0-alpha.2":{"name":"amp-toolbox-optimizer","version":"1.2.0-alpha.2","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^1.2.0-alpha.2","amp-toolbox-runtime-version":"^1.2.0-alpha.2","css":"2.2.4","parse5":"5.1.0","parse5-htmlparser2-tree-adapter":"5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"fd8f6a83d9c444c9fdf6c6eba01dc5b360bbae59","_id":"amp-toolbox-optimizer@1.2.0-alpha.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aCeQa0dA6ynXrdNUdiL/FyfKQs1GS+9XnC1jRYq0j4MfKvPCUGxNa1g+f3l7GD1QK31gf6rYvSxA9xQNf/iIeQ==","shasum":"49fc7841d4b2eb4db65dfab4c3deeec14291913b","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-1.2.0-alpha.2.tgz","fileCount":24,"unpackedSize":85973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9ny2CRA9TVsSAnZWagAA+4wQAIYU15Zwb32INhiMOmTP\ny/Gi/57Gtn+YFzbuqwkgVNf1i0BTOAtcZBGthJp84aCnV35vxxZF2hffEULB\nnvajKiwNedLqnC734xAWvisNOgPKQXR57HBP6WIr3cQ3zH6f5+xvufWkyv5+\npklWPbgATdD7qhAzsl//nrSVWM2Xz//adcSdqXO5FvLTAW9GXYNI3qq8hZ5h\n36luVuwaa9KfAAy2+2FmEmKUZxBDQiWQtJt/HAeC//lKsJ4lbI3aHajyz7GU\nRqIa3HPP7zbZ3RiR+OFIXfMJcoXABaWvfcwcKotUWO6B77ZhH1fwWDeqTNkp\nCuFjPCsDgtLCtLjmcPpopE2T3EhFWjLmAfCQSfuw2wwR3Lm+Mb1d7rvKzKhO\ntFx6gCD5BIHIfo8LSFrr3JHeu4Si3H5l9Yph8LdEpcifWPxP2lcMxF8f1R3s\nhS5PbuLhI6b7K7FNnme38Qg9ZMfD3XkVHIue94s2X3SanX8tSjGAP8rx8KdR\n4YhJ4z2OokMOILFGCpHh0ROJUeEj1VSU6jUexZrecRSygb1NzqmHZAvIG9AF\ntNnZR8Jzk/xx8Vy+w4d0AsFDymtfZdQac/bMOMptFkZ07I06IM0ybE9NXOOn\njJAlD1UUdwD66H5Io98rPTxtIgVWBILexcUT80DKU1zVMrqByrCTQ2/+nCyK\n6Xs0\r\n=Hac8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx6i8TcWoRehprz+zh7AfgzRQX175u29jiDKmQj7++XAIgbI4xZ9in7NaQMWmPOxroC3VfR+owsjZ/W8wgBsktKjU="}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_1.2.0-alpha.2_1559657653323_0.5032596035462786"},"_hasShrinkwrap":false},"1.2.0-alpha.3":{"name":"amp-toolbox-optimizer","version":"1.2.0-alpha.3","description":"Server-side rendering for AMPs.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","peerDependenciesMeta":{"jimp":{"optional":true},"lru-cache":{"optional":true}},"dependencies":{"amp-toolbox-core":"^1.2.0-alpha.2","amp-toolbox-runtime-version":"^1.2.0-alpha.2","css":"2.2.4","parse5":"5.1.0","parse5-htmlparser2-tree-adapter":"5.1.0"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"},"homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","gitHead":"fd8f6a83d9c444c9fdf6c6eba01dc5b360bbae59","_id":"amp-toolbox-optimizer@1.2.0-alpha.3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-A9UxSSDWgWKCH05V72ae7bAWZuSxAvnS3+5PF+G65Km5T/KQ37vVYUQSrWTnewS5tbNo13GLzxfAh0n0ick3HA==","shasum":"bdca6b80b4a6692aee96dc43a602fc2b086c7593","tarball":"https://registry.npmjs.org/amp-toolbox-optimizer/-/amp-toolbox-optimizer-1.2.0-alpha.3.tgz","fileCount":24,"unpackedSize":74872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU8QmCRA9TVsSAnZWagAAOywP/2GwZs93gfMQAnEkdKXJ\neIGpxkJ6H3Bv6EXsi9JyMTVXhUPAkrZ3upRvoKlfpGWSMzzXFABVpekup2Vx\nL5C95uXflklhfEhABUt//L40ON0aZjVkn0E4qfcqL8Ve1G6Q4s8ukt2efyGn\nSyt+X3SGdiz14Y1SJZYBmpiQWV3f0QL17ahZOHI0BYuU7wRkIUyripetJgPA\ndSbUcHsepip+bQeztH2m2eyrw0BUGFRE6EEm5Rat1PLGpl8MMU9/WLMp6lcM\nSHHn3tz+G4dSNJt/PdPnMAP3o1xyi2OYdoHoDHEVzeiz7zFsQXZTF3qc3hz/\nzV7yZpPn9YD/LAclqN7OCOVCVUy2YXBmgZJMgVZR7BINEQUJ6F4NfqmZXSRU\nt9XQbLq3jwglAk30ooXm3wa16ByqssfXB0Br0YxIpuvVsScB2rPwfbS5v5bI\nPKZFT/j/K+Hi5hVOqkFPboX83Dy5+YlKEXrmL+CnbJGOb2V19ze1zVLa73RX\n6Wr7PE3Rp7IMT1P8WRHeY7hJJ9OtQviU1YmFY0aUi4uQcJr8VwXQwYl/B5DO\nmZxDvdklvRCePU+g7iiWn/bgf+kmQ0x8UJUOBukUwxv17KSRstvVoYbzCM/t\nqnKAj64K7dsUJv/lAb3ghV72az1uiSiofcpTZNfQAiry700DmX18cNMA3bte\nl3Lc\r\n=aJ7/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyoZHf5S2RzzITvKDve12yjS0dOuot6sf9yfurDeQI1gIhAOn8bbJ1UkXhrslNgYa6uNep4yVcbrnWzay2dCQoHS1s"}]},"maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"_npmUser":{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amp-toolbox-optimizer_1.2.0-alpha.3_1565770788913_0.9889165402862217"},"_hasShrinkwrap":false}},"readme":"# AMP Optimizer\n\nThis version of AMP Optimizer is deprecated. Please use [@ampproject/toolbox-optimizer](https://www.npmjs.com/package/@ampproject/toolbox-optimizer) instead: \n\n```\n$ npm install @ampproject/toolbox-optimizer\n```\n\n\n\n","maintainers":[{"name":"amp-toolbox","email":"amp-toolbox-eng@google.com"}],"time":{"modified":"2022-04-11T13:41:42.531Z","created":"2018-02-01T19:49:17.325Z","0.1.0":"2018-02-01T19:49:17.325Z","0.3.0":"2018-06-18T10:49:55.712Z","0.3.1":"2018-07-04T11:54:32.100Z","0.4.0":"2018-10-11T14:32:44.493Z","0.4.1":"2018-10-11T14:41:02.690Z","0.4.3":"2018-11-15T13:21:56.773Z","0.4.4":"2018-11-20T16:59:40.462Z","0.4.5":"2018-11-26T14:55:13.525Z","0.4.6":"2018-12-12T12:48:20.441Z","0.4.7":"2019-02-08T18:31:13.434Z","0.4.8":"2019-02-22T09:42:14.569Z","0.5.0":"2019-03-13T12:23:20.688Z","0.5.1":"2019-03-25T10:17:01.366Z","0.5.2-beta.0":"2019-03-26T21:27:22.788Z","0.5.2-beta.5":"2019-04-03T20:45:52.994Z","0.5.2-beta.4":"2019-04-04T11:31:22.710Z","0.5.2-beta.6":"2019-04-04T11:43:42.817Z","0.5.2":"2019-04-24T06:41:17.503Z","0.5.3":"2019-04-24T12:39:16.408Z","1.2.0-alpha.0":"2019-05-07T09:04:43.066Z","1.2.0-alpha.1":"2019-05-20T20:30:12.041Z","1.2.0-alpha.2":"2019-06-04T14:14:13.473Z","1.2.0-alpha.3":"2019-08-14T08:19:49.074Z"},"keywords":["amp"],"author":{"name":"AMPHTML Team"},"license":"Apache-2.0","readmeFilename":"README.md","homepage":"https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer","repository":{"type":"git","url":"git+https://github.com/ampproject/amp-toolbox.git"},"bugs":{"url":"https://github.com/ampproject/amp-toolbox/issues"}}