{"library":"polymer-rename","title":"polymer-rename","description":"polymer-rename v4.3.2 is a build tool that preprocesses Polymer HTML templates so that Closure Compiler's ADVANCED optimizations can safely rename data-binding expressions and event handlers. It parses Polymer templates, extracts bindings like [[prop]] and on-event handlers, and emits synthetic JavaScript for Closure Compiler to analyze, enabling property renaming without breaking template references. This avoids the need to quote or export every property used in bindings, resulting in smaller output and better type checking. Unlike manual exports, polymer-rename automates the integration of Polymer with Closure Compiler. The library last updated for Polymer 2; no active releases since 2020 indicate maintenance status.","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install polymer-rename"],"cli":null},"imports":["import polymerRename from 'polymer-rename'","import { rename } from 'polymer-rename'","import polymerRename from 'polymer-rename'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const polymerRename = require('polymer-rename');\nconst fs = require('fs');\n\n// Read a Polymer HTML file\nconst html = fs.readFileSync('my-element.html', 'utf8');\n\n// Generate synthetic JS from the template bindings\nconst result = polymerRename(html);\nconsole.log(result.js); // synthetic JS for Closure Compiler\nconsole.log(result.warnings); // any warnings\n\n// Write the synthetic JS to a file for compilation\nfs.writeFileSync('element-bindings.js', result.js);","lang":"javascript","description":"Demonstrates importing polymer-rename, parsing a Polymer HTML file, and extracting synthetic JavaScript for Closure Compiler.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}