संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Closure Compiler क्या है?
Closure Compiler एक ऐसा टूल है जिसकी मदद से JavaScript को तेज़ी से डाउनलोड और चलाया जा सकता है. यह सोर्स लैंग्वेज से मशीन कोड में कंपाइल करने के बजाय, JavaScript से बेहतर JavaScript में कंपाइल करता है. यह आपके JavaScript को पार्स करता है, उसका विश्लेषण करता है, और इस्तेमाल न होने वाले कोड को हटा देता है. साथ ही, बचे हुए कोड को फिर से लिखता है और उसे छोटा करता है. यह सिंटैक्स, वैरिएबल रेफ़रंस, और टाइप की भी जांच करता है. साथ ही, JavaScript से जुड़ी आम समस्याओं के बारे में चेतावनी देता है.
मैं Closure Compiler का इस्तेमाल कैसे करूं?
Closure Compiler का इस्तेमाल इन तरीकों से किया जा सकता है:
यह एक ओपन सोर्स Java ऐप्लिकेशन है, जिसे कमांड लाइन से चलाया जा सकता है.
ऐसी लाइब्रेरी जिस पर Bazel के ज़रिए भरोसा किया जा सकता है.
एक एनपीएम पैकेज
कंपाइलर का इस्तेमाल शुरू करने के लिए, यहां "मैं इसका इस्तेमाल कैसे शुरू करूं" देखें.
Closure Compiler का इस्तेमाल करने के क्या फ़ायदे हैं?
काम की क्षमता. Closure Compiler, आपकी JavaScript फ़ाइलों का साइज़ कम करता है और उन्हें ज़्यादा असरदार बनाता है. इससे आपका ऐप्लिकेशन तेज़ी से लोड होता है और बैंडविथ की ज़रूरत कम हो जाती है.
कोड की जांच की जा रही है. Closure Compiler, गैर-कानूनी JavaScript के लिए चेतावनियां देता है. साथ ही, संभावित रूप से खतरनाक कार्रवाइयों के लिए भी चेतावनियां देता है. इससे आपको ऐसी JavaScript बनाने में मदद मिलती है जिसमें कम बग होते हैं और जिसे आसानी से बनाए रखा जा सकता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe Closure Compiler is a tool that optimizes JavaScript for faster download and execution by analyzing, removing dead code, and minimizing the remaining code.\u003c/p\u003e\n"],["\u003cp\u003eIt offers benefits such as improved efficiency by reducing file size and enhanced code checking by providing warnings for potential issues.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize the Closure Compiler through a command-line application, a simple web interface, or by integrating it into their development workflow via the provided resources and documentation.\u003c/p\u003e\n"]]],[],null,["What is the Closure Compiler?\n-----------------------------\n\n\nThe Closure Compiler is a tool for making JavaScript download and run\nfaster. Instead of compiling\nfrom a source language to machine code, it compiles from JavaScript to\nbetter JavaScript. It parses your JavaScript, analyzes it, removes\ndead code and rewrites and minimizes what's left. It also checks\nsyntax, variable references, and types, and warns about common\nJavaScript pitfalls.\n\nHow can I use the Closure Compiler?\n-----------------------------------\n\n\nYou can use the Closure Compiler as:\n- An open source Java application that you can run from the command line.\n- A library you can depend on via Bazel.\n- An NPM package\n- To get started with the compiler, see \"How do I start\" below.\n\nWhat are the benefits of using Closure Compiler?\n------------------------------------------------\n\n - **Efficiency.** The Closure Compiler reduces the size of\n your JavaScript files and makes them more efficient, helping your\n application to load faster and reducing your bandwidth needs.\n\n - **Code checking.** The Closure Compiler provides warnings\n for illegal JavaScript and warnings for potentially dangerous\n operations, helping you to produce JavaScript that is less buggy and\n easier to maintain.\n\n How do I start?\n ---------------\n\n\n - Download the most recently released JAR file from the [Maven repository](https://mvnrepository.com/artifact/com.google.javascript/closure-compiler).\n - Work through the [Application\n Hello World](/closure/compiler/docs/gettingstarted_app).\n - Read about [Advanced\n compilation](/closure/compiler/docs/api-tutorial3).\n - Explore [the project's source code](https://github.com/google/closure-compiler).\n\n \u003cbr /\u003e"]]