Uninstall a package from your project name (lodash)

๐Ÿ“ฆ Node.js-> Command Line
โœจ The Prompt Phrase
npm uninstall lodash

๐Ÿ’ป Code Preview

๐Ÿ“ฆ All-in-One Code
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Uninstall a package from your project (lodash) - Interactive Tutorial</title>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&family=Fira+Code:wght@400;500;600&display=swap" rel="stylesheet">
    <style>
        :root {
            --bg-primary: #0a0e27;
            --bg-secondary: #151932;
            --bg-card: #1e2139;
            --accent-purple: #a855f7;
            --accent-blue: #3b82f6;
            --accent-green: #10b981;
            --accent-red: #ef4444;
            --accent-yellow: #f59e0b;
            --accent-pink: #ec4899;
            --lodash-blue: #3492ff;
            --text-primary: #f8fafc;
            --text-secondary: #94a3b8;
            --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            --gradient-npm: linear-gradient(135deg, #cb3837 0%, #fb3640 100%);
            --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .progress-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: var(--bg-secondary);
            z-index: 1000;
        }

        .progress-bar {
            height: 100%;
            background: var(--gradient-danger);
            width: 0%;
            transition: width 0.3s ease;
        }

        .hero {
            text-align: center;
            padding: 100px 20px;
            background: var(--gradient-danger);
            position: relative;
            overflow: hidden;
            border-radius: 0 0 50px 50px;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
            animation: float 20s linear infinite;
        }

        @keyframes float {
            from { transform: translateY(0); }
            to { transform: translateY(-100px); }
        }

        .hero-content {
            position: relative;
            z-index: 1;
        }

        .trash-icon {
            font-size: 5rem;
            margin-bottom: 20px;
            animation: shake 2s ease-in-out infinite;
        }

        @keyframes shake {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-10deg); }
            75% { transform: rotate(10deg); }
        }

        .command-display {
            display: inline-block;
            background: rgba(0, 0, 0, 0.4);
            padding: 25px 40px;
            border-radius: 15px;
            font-family: 'Fira Code', monospace;
            font-size: 1.8rem;
            margin: 30px 0;
            border: 3px solid rgba(255, 255, 255, 0.3);
            animation: pulse 2s ease-in-out infinite;
            color: white;
            font-weight: 600;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
            50% { transform: scale(1.05); box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0); }
        }

        .hero h1 {
            font-size: 3.5rem;
            font-weight: 900;
            margin-bottom: 20px;
            animation: slideDown 0.8s ease-out;
            color: white;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .hero p {
            font-size: 1.4rem;
            opacity: 0.95;
            animation: slideUp 0.8s ease-out;
            color: white;
        }

        @keyframes slideDown {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        @keyframes slideUp {
            from { transform: translateY(50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .section {
            margin: 60px 0;
            animation: fadeIn 0.8s ease-out;
            animation-fill-mode: both;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .section-title {
            font-size: 2.5rem;
            margin-bottom: 30px;
            background: var(--gradient-danger);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: inline-block;
            font-weight: 700;
        }

        .card {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 40px;
            margin: 30px 0;
            box-shadow: var(--shadow);
            border: 1px solid rgba(255, 255, 255, 0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
        }

        .code-block {
            background: #1e1e1e;
            border-radius: 15px;
            padding: 25px;
            margin: 20px 0;
            position: relative;
            overflow: hidden;
            font-family: 'Fira Code', monospace;
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .code-lang {
            color: var(--accent-green);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .terminal-dots {
            display: flex;
            gap: 6px;
        }

        .terminal-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        .dot-red { background: #ff5f56; }
        .dot-yellow { background: #ffbd2e; }
        .dot-green { background: #27c93f; }

        .copy-btn {
            background: var(--accent-purple);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            font-family: 'Poppins', sans-serif;
        }

        .copy-btn:hover {
            background: var(--accent-blue);
            transform: scale(1.05);
        }

        .copy-btn.copied {
            background: var(--accent-green);
        }

        pre {
            margin: 0;
            overflow-x: auto;
        }

        code {
            color: #e0e0e0;
            font-size: 0.95rem;
            line-height: 1.8;
        }

        .code-comment { color: #6a9955; }
        .code-keyword { color: #569cd6; }
        .code-string { color: #ce9178; }
        .code-function { color: #dcdcaa; }
        .code-variable { color: #9cdcfe; }

        .steps {
            counter-reset: step-counter;
        }

        .step {
            background: var(--bg-secondary);
            border-radius: 15px;
            padding: 30px;
            margin: 20px 0;
            position: relative;
            padding-left: 100px;
            transition: all 0.3s ease;
        }

        .step:hover {
            background: var(--bg-card);
            transform: translateX(10px);
        }

        .step::before {
            counter-increment: step-counter;
            content: counter(step-counter);
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            width: 60px;
            height: 60px;
            background: var(--gradient-danger);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            font-weight: 900;
            color: white;
        }

        .step h3 {
            color: var(--accent-pink);
            margin-bottom: 10px;
            font-size: 1.5rem;
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 25px;
            margin: 30px 0;
        }

        .feature-card {
            background: var(--bg-secondary);
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .feature-card:hover {
            border-color: var(--accent-red);
            transform: translateY(-10px);
        }

        .feature-icon {
            font-size: 3.5rem;
            margin-bottom: 15px;
        }

        .feature-title {
            font-weight: 600;
            color: var(--accent-red);
            margin-bottom: 10px;
            font-size: 1.3rem;
        }

        .demo-container {
            background: var(--bg-secondary);
            border-radius: 20px;
            padding: 40px;
            margin: 30px 0;
        }

        .terminal {
            background: #1e1e1e;
            border-radius: 15px;
            padding: 20px;
            font-family: 'Fira Code', monospace;
            min-height: 250px;
            margin: 20px 0;
            max-height: 400px;
            overflow-y: auto;
        }

        .terminal-line {
            margin: 10px 0;
            display: flex;
            align-items: flex-start;
        }

        .terminal-prompt {
            color: var(--accent-green);
            margin-right: 10px;
        }

        .terminal-command {
            color: var(--accent-blue);
        }

        .terminal-output {
            color: var(--text-secondary);
            margin-left: 20px;
        }

        .demo-button {
            background: var(--gradient-danger);
            color: white;
            border: none;
            padding: 15px 40px;
            border-radius: 50px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin: 10px;
            font-family: 'Poppins', sans-serif;
        }

        .demo-button:hover {
            transform: scale(1.05);
            box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
        }

        .demo-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .tab {
            padding: 12px 24px;
            background: var(--bg-secondary);
            border: none;
            border-radius: 10px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            font-family: 'Poppins', sans-serif;
        }

        .tab:hover {
            background: var(--bg-card);
        }

        .tab.active {
            background: var(--gradient-danger);
            color: white;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
            animation: fadeIn 0.5s ease-out;
        }

        .accordion-header {
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: var(--bg-secondary);
            border-radius: 12px;
            margin: 15px 0;
            transition: all 0.3s ease;
        }

        .accordion-header:hover {
            background: var(--bg-card);
        }

        .accordion-icon {
            transition: transform 0.3s ease;
            font-size: 1.2rem;
        }

        .accordion-icon.active {
            transform: rotate(180deg);
        }

        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        .accordion-content.active {
            max-height: 2000px;
        }

        .accordion-body {
            padding: 20px;
            background: var(--bg-secondary);
            border-radius: 12px;
            margin-top: 5px;
        }

        .tip {
            background: rgba(59, 130, 246, 0.1);
            border-left: 4px solid var(--accent-blue);
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }

        .tip::before {
            content: '๐Ÿ’ก ';
            font-size: 1.5rem;
        }

        .warning {
            background: rgba(239, 68, 68, 0.1);
            border-left: 4px solid var(--accent-red);
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }

        .warning::before {
            content: 'โš ๏ธ ';
            font-size: 1.5rem;
        }

        .success {
            background: rgba(16, 185, 129, 0.1);
            border-left: 4px solid var(--accent-green);
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }

        .success::before {
            content: 'โœ… ';
            font-size: 1.5rem;
        }

        .info {
            background: rgba(236, 72, 153, 0.1);
            border-left: 4px solid var(--accent-pink);
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }

        .info::before {
            content: '๐Ÿ” ';
            font-size: 1.5rem;
        }

        .quiz-container {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 40px;
            margin: 30px 0;
        }

        .quiz-question {
            margin: 30px 0;
        }

        .quiz-question h3 {
            color: var(--accent-purple);
            margin-bottom: 20px;
            font-size: 1.3rem;
        }

        .quiz-options {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .quiz-option {
            background: var(--bg-secondary);
            padding: 20px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .quiz-option:hover {
            border-color: var(--accent-blue);
            transform: translateX(10px);
        }

        .quiz-option.correct {
            border-color: var(--accent-green);
            background: rgba(16, 185, 129, 0.1);
        }

        .quiz-option.incorrect {
            border-color: var(--accent-red);
            background: rgba(239, 68, 68, 0.1);
        }

        .quiz-feedback {
            margin-top: 15px;
            padding: 15px;
            border-radius: 10px;
            display: none;
        }

        .quiz-feedback.show {
            display: block;
            animation: slideIn 0.5s ease-out;
        }

        @keyframes slideIn {
            from { opacity: 0; transform: translateX(-20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        .quiz-feedback.correct {
            background: rgba(16, 185, 129, 0.1);
            border-left: 4px solid var(--accent-green);
        }

        .quiz-feedback.incorrect {
            background: rgba(239, 68, 68, 0.1);
            border-left: 4px solid var(--accent-red);
        }

        .cheat-sheet {
            background: var(--gradient-danger);
            border-radius: 20px;
            padding: 40px;
            margin: 30px 0;
            color: white;
        }

        .cheat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .cheat-item {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            padding: 20px;
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .cheat-item h4 {
            color: white;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .cheat-item code {
            background: rgba(0, 0, 0, 0.3);
            padding: 4px 8px;
            border-radius: 5px;
            font-size: 0.9rem;
            color: white;
        }

        .highlight {
            color: var(--accent-yellow);
            font-weight: 600;
        }

        .footer {
            text-align: center;
            padding: 40px 20px;
            background: var(--bg-secondary);
            margin-top: 80px;
            border-radius: 20px;
        }

        .footer p {
            color: var(--text-secondary);
            margin: 10px 0;
        }

        .badge {
            display: inline-block;
            padding: 6px 12px;
            background: var(--gradient-purple);
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin: 5px;
        }

        .tooltip {
            position: relative;
            display: inline-block;
            border-bottom: 2px dotted var(--accent-blue);
            cursor: help;
        }

        .tooltip .tooltiptext {
            visibility: hidden;
            width: 250px;
            background-color: var(--bg-card);
            color: var(--text-primary);
            text-align: center;
            border-radius: 10px;
            padding: 10px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -125px;
            opacity: 0;
            transition: opacity 0.3s;
            border: 1px solid var(--accent-blue);
            font-size: 0.9rem;
        }

        .tooltip:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }

        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2rem;
            }

            .command-display {
                font-size: 1.2rem;
                padding: 15px 20px;
            }

            .hero p {
                font-size: 1rem;
            }

            .section-title {
                font-size: 1.8rem;
            }

            .card {
                padding: 25px;
            }

            .step {
                padding-left: 80px;
            }

            .step::before {
                width: 50px;
                height: 50px;
                font-size: 1.5rem;
            }
        }
    </style>
</head>
<body>
    <div class="progress-container">
        <div class="progress-bar" id="progressBar"></div>
    </div>

    <div class="hero">
        <div class="hero-content">
            <div class="trash-icon">๐Ÿ—‘๏ธ</div>
            <h1>Master Package Removal!</h1>
            <div class="command-display">npm uninstall lodash</div>
            <p>Clean up your project by removing unnecessary packages! ๐Ÿงน</p>
        </div>
    </div>

    <div class="container">
        <section class="section" id="what-is-it">
            <h2 class="section-title">๐Ÿค” What Is npm uninstall lodash?</h2>
            <div class="card">
                <p style="font-size: 1.2rem; margin-bottom: 20px;">
                    This command <span class="highlight">removes</span> the <strong>lodash</strong> package from your Node.js project! ๐Ÿ—‘๏ธ
                </p>
                <p style="margin-bottom: 20px;">
                    Think of it like spring cleaning for your code! ๐Ÿงน When you no longer need a library (like lodash), this command removes it completely from your project, freeing up space and keeping things tidy!
                </p>
                <div class="info">
                    <strong>Breaking It Down:</strong>
                    <ul style="margin-left: 30px; margin-top: 10px; line-height: 2;">
                        <li><code>npm</code> - Node Package Manager</li>
                        <li><code>uninstall</code> - Remove a package</li>
                        <li><code>lodash</code> - The package name to remove</li>
                    </ul>
                </div>

                <div style="margin-top: 30px;">
                    <h3 style="color: var(--accent-pink); margin-bottom: 15px;">What is Lodash? ๐Ÿ”</h3>
                    <p style="margin-bottom: 15px;">Lodash is a popular JavaScript utility library that provides helpful functions for working with arrays, objects, and more. But sometimes you don't need it anymore!</p>
                </div>
            </div>
        </section>

        <section class="section" id="why-use-it">
            <h2 class="section-title">โœจ Why Uninstall Packages?</h2>
            <div class="card">
                <div class="feature-grid">
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿ’พ</div>
                        <div class="feature-title">Save Space</div>
                        <p style="color: var(--text-secondary);">Remove unused packages to reduce project size!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">โšก</div>
                        <div class="feature-title">Faster Installs</div>
                        <p style="color: var(--text-secondary);">Fewer packages = quicker npm install!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿ”’</div>
                        <div class="feature-title">Better Security</div>
                        <p style="color: var(--text-secondary);">Less code = smaller attack surface!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿงน</div>
                        <div class="feature-title">Clean Code</div>
                        <p style="color: var(--text-secondary);">Keep your dependencies organized!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿ“ฆ</div>
                        <div class="feature-title">Smaller Bundles</div>
                        <p style="color: var(--text-secondary);">Reduce final build size!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐ŸŽฏ</div>
                        <div class="feature-title">Avoid Conflicts</div>
                        <p style="color: var(--text-secondary);">Prevent version conflicts!</p>
                    </div>
                </div>
            </div>
        </section>

        <section class="section" id="how-it-works">
            <h2 class="section-title">โš™๏ธ How Does It Work?</h2>
            <div class="card">
                <p style="margin-bottom: 30px; font-size: 1.1rem;">Let's break down what happens step by step:</p>
                
                <div class="steps">
                    <div class="step">
                        <h3>Step 1: Reads package.json</h3>
                        <p>npm checks your package.json to find lodash in the dependencies list.</p>
                    </div>
                    
                    <div class="step">
                        <h3>Step 2: Removes from package.json</h3>
                        <p>The lodash entry is deleted from your dependencies or devDependencies.</p>
                    </div>
                    
                    <div class="step">
                        <h3>Step 3: Deletes from node_modules</h3>
                        <p>The entire lodash folder is removed from node_modules directory.</p>
                    </div>
                    
                    <div class="step">
                        <h3>Step 4: Updates package-lock.json</h3>
                        <p>The lock file is updated to reflect the removal.</p>
                    </div>
                    
                    <div class="step">
                        <h3>Step 5: Removes Unused Dependencies</h3>
                        <p>If lodash had dependencies that nothing else uses, they're removed too!</p>
                    </div>
                    
                    <div class="step">
                        <h3>Step 6: Complete!</h3>
                        <p>Lodash is completely gone from your project! ๐ŸŽ‰</p>
                    </div>
                </div>

                <div class="success" style="margin-top: 30px;">
                    <strong>๐ŸŽ‰ Done!</strong> Your project is now cleaner and lighter!
                </div>
            </div>
        </section>

        <section class="section" id="demo">
            <h2 class="section-title">๐ŸŽฎ Interactive Demo</h2>
            <div class="demo-container">
                <h3 style="margin-bottom: 20px; font-size: 1.5rem;">See Uninstallation in Action! ๐Ÿš€</h3>
                <p style="margin-bottom: 30px;">Click the button to simulate uninstalling lodash:</p>
                
                <button class="demo-button" onclick="simulateUninstall()">
                    <span>๐Ÿ—‘๏ธ</span>
                    <span>Uninstall Lodash</span>
                </button>

                <div class="terminal" id="terminal">
                    <div class="terminal-line">
                        <span class="terminal-prompt">$</span>
                        <span style="color: var(--text-secondary);">Ready for command...</span>
                    </div>
                </div>
            </div>
        </section>

        <section class="section" id="examples">
            <h2 class="section-title">๐Ÿ’ป Command Variations</h2>
            <div class="card">
                <div class="tabs">
                    <button class="tab active" onclick="switchTab('basic')">Basic Uninstall</button>
                    <button class="tab" onclick="switchTab('multiple')">Multiple Packages</button>
                    <button class="tab" onclick="switchTab('global')">Global Uninstall</button>
                    <button class="tab" onclick="switchTab('aliases')">Aliases</button>
                </div>

                <div id="basic" class="tab-content active">
                    <h3 style="color: var(--accent-pink); margin-bottom: 15px;">Basic Uninstallation</h3>
                    <div class="code-block">
                        <div class="code-header">
                            <span class="code-lang">
                                <div class="terminal-dots">
                                    <div class="terminal-dot dot-red"></div>
                                    <div class="terminal-dot dot-yellow"></div>
                                    <div class="terminal-dot dot-green"></div>
                                </div>
                                Terminal
                            </span>
                            <button class="copy-btn" onclick="copyCode(this, 'basic-code')">๐Ÿ“‹ Copy</button>
                        </div>
                        <pre><code id="basic-code"><span class="code-comment"># Uninstall lodash from your project</span>
npm uninstall lodash

<span class="code-comment"># This removes it from:</span>
<span class="code-comment"># - package.json</span>
<span class="code-comment"># - node_modules/</span>
<span class="code-comment"># - package-lock.json</span></code></pre>
                    </div>
                </div>

                <div id="multiple" class="tab-content">
                    <h3 style="color: var(--accent-pink); margin-bottom: 15px;">Uninstall Multiple Packages</h3>
                    <div class="code-block">
                        <div class="code-header">
                            <span class="code-lang">Terminal</span>
                            <button class="copy-btn" onclick="copyCode(this, 'multiple-code')">๐Ÿ“‹ Copy</button>
                        </div>
                        <pre><code id="multiple-code"><span class="code-comment"># Uninstall multiple packages at once</span>
npm uninstall lodash moment axios

<span class="code-comment"># All three packages will be removed!</span></code></pre>
                    </div>
                </div>

                <div id="global" class="tab-content">
                    <h3 style="color: var(--accent-pink); margin-bottom: 15px;">Uninstall Global Package</h3>
                    <div class="code-block">
                        <div class="code-header">
                            <span class="code-lang">Terminal</span>
                            <button class="copy-btn" onclick="copyCode(this, 'global-code')">๐Ÿ“‹ Copy</button>
                        </div>
                        <pre><code id="global-code"><span class="code-comment"># Uninstall a globally installed package</span>
npm uninstall -g typescript

<span class="code-comment"># Removes from system-wide location</span></code></pre>
                    </div>
                </div>

                <div id="aliases" class="tab-content">
                    <h3 style="color: var(--accent-pink); margin-bottom: 15px;">Command Aliases</h3>
                    <div class="code-block">
                        <div class="code-header">
                            <span class="code-lang">Terminal</span>
                            <button class="copy-btn" onclick="copyCode(this, 'aliases-code')">๐Ÿ“‹ Copy</button>
                        </div>
                        <pre><code id="aliases-code"><span class="code-comment"># All of these do the same thing!</span>
npm uninstall lodash
npm remove lodash
npm rm lodash
npm un lodash
npm r lodash</code></pre>
                    </div>
                    <div class="tip" style="margin-top: 15px;">
                        <strong>Pro Tip:</strong> <code>npm rm</code> is the shortest alias!
                    </div>
                </div>
            </div>
        </section>

        <section class="section" id="mistakes">
            <h2 class="section-title">โŒ Common Mistakes</h2>
            <div class="card">
                <div class="accordion">
                    <div class="accordion-item">
                        <div class="accordion-header" onclick="toggleAccordion(this)">
                            <span><strong>1. Forgetting to Remove Imports</strong></span>
                            <span class="accordion-icon">โ–ผ</span>
                        </div>
                        <div class="accordion-content">
                            <div class="accordion-body">
                                <div class="warning">
                                    <strong>Problem:</strong> Uninstalling but still importing in code!
                                </div>
                                <div class="code-block" style="margin-top: 15px;">
                                    <pre><code><span class="code-comment">// โŒ This will cause an error after uninstalling</span>
<span class="code-keyword">const</span> <span class="code-variable">_</span> = <span class="code-function">require</span>(<span class="code-string">'lodash'</span>);

<span class="code-comment">// โœ… Remove all imports before uninstalling!</span></code></pre>
                                </div>
                                <div class="success" style="margin-top: 15px;">
                                    <strong>Solution:</strong> Search your codebase for all imports/requires of the package before uninstalling!
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="accordion-item">
                        <div class="accordion-header" onclick="toggleAccordion(this)">
                            <span><strong>2. Wrong Package Name</strong></span>
                            <span class="accordion-icon">โ–ผ</span>
                        </div>
                        <div class="accordion-content">
                            <div class="accordion-body">
                                <div class="warning">
                                    <strong>Problem:</strong> Typo in package name!
                                </div>
                                <div class="code-block" style="margin-top: 15px;">
                                    <pre><code><span class="code-comment"># โŒ Wrong - typo</span>
npm uninstall loddash

<span class="code-comment"># โœ… Correct spelling</span>
npm uninstall lodash</code></pre>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="accordion-item">
                        <div class="accordion-header" onclick="toggleAccordion(this)">
                            <span><strong>3. Not Checking Dependencies</strong></span>
                            <span class="accordion-icon">โ–ผ</span>
                        </div>
                        <div class="accordion-content">
                            <div class="accordion-body">
                                <div class="warning">
                                    <strong>Problem:</strong> Other packages might depend on it!
                                </div>
                                <div class="tip" style="margin-top: 15px;">
                                    <strong>Check first:</strong>
                                    <ul style="margin-left: 30px; margin-top: 10px; line-height: 2;">
                                        <li>Search your code for imports</li>
                                        <li>Check if other packages need it</li>
                                        <li>Run tests after uninstalling</li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="accordion-item">
                        <div class="accordion-header" onclick="toggleAccordion(this)">
                            <span><strong>4. Manually Deleting from node_modules</strong></span>
                            <span class="accordion-icon">โ–ผ</span>
                        </div>
                        <div class="accordion-content">
                            <div class="accordion-body">
                                <div class="warning">
                                    <strong>Problem:</strong> Deleting folder manually doesn't update package.json!
                                </div>
                                <div class="code-block" style="margin-top: 15px;">
                                    <pre><code><span class="code-comment"># โŒ Wrong - manual deletion</span>
rm -rf node_modules/lodash

<span class="code-comment"># โœ… Correct - use npm</span>
npm uninstall lodash</code></pre>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="accordion-item">
                        <div class="accordion-header" onclick="toggleAccordion(this)">
                            <span><strong>5. Forgetting to Commit Changes</strong></span>
                            <span class="accordion-icon">โ–ผ</span>
                        </div>
                        <div class="accordion-content">
                            <div class="accordion-body">
                                <div class="warning">
                                    <strong>Problem:</strong> Not committing package.json changes!
                                </div>
                                <div class="code-block" style="margin-top: 15px;">
                                    <pre><code><span class="code-comment"># After uninstalling, commit the changes</span>
git add package.json package-lock.json
git commit -m "Remove lodash dependency"</code></pre>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <section class="section" id="pro-tips">
            <h2 class="section-title">๐Ÿš€ Pro Tips</h2>
            <div class="card">
                <div class="feature-grid">
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿ”</div>
                        <div class="feature-title">Check Before Removing</div>
                        <p style="color: var(--text-secondary);">Use <code>npm ls lodash</code> to see dependencies!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿงน</div>
                        <div class="feature-title">Clean Unused</div>
                        <p style="color: var(--text-secondary);"><code>npm prune</code> removes all unused packages!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿ“Š</div>
                        <div class="feature-title">Audit Size</div>
                        <p style="color: var(--text-secondary);">Use <code>npm ls --depth=0</code> to see all packages!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐Ÿ”’</div>
                        <div class="feature-title">Save Flag</div>
                        <p style="color: var(--text-secondary);">Modern npm auto-updates package.json!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">โšก</div>
                        <div class="feature-title">Batch Remove</div>
                        <p style="color: var(--text-secondary);">Uninstall multiple packages in one command!</p>
                    </div>
                    <div class="feature-card">
                        <div class="feature-icon">๐ŸŽฏ</div>
                        <div class="feature-title">Test After</div>
                        <p style="color: var(--text-secondary);">Always run tests after uninstalling!</p>
                    </div>
                </div>

                <div class="success" style="margin-top: 30px;">
                    <strong>๐ŸŽ“ Best Practice:</strong> Before uninstalling, search your entire codebase for any references to the package!
                </div>
            </div>
        </section>

        <section class="section" id="quiz">
            <h2 class="section-title">๐ŸŽฏ Knowledge Check Quiz</h2>
            <div class="quiz-container">
                <p style="margin-bottom: 30px; font-size: 1.1rem;">Test your understanding! Click on the correct answer. ๐Ÿง </p>

                <div class="quiz-question">
                    <h3>Question 1: What does npm uninstall do?</h3>
                    <div class="quiz-options">
                        <div class="quiz-option" onclick="checkAnswer(this, false, 1)">
                            A) Installs a new package
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, true, 1)">
                            B) Removes a package from your project
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, false, 1)">
                            C) Updates a package to latest version
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, false, 1)">
                            D) Lists all installed packages
                        </div>
                    </div>
                    <div class="quiz-feedback" id="feedback1"></div>
                </div>

                <div class="quiz-question">
                    <h3>Question 2: Which is NOT a valid alias for npm uninstall?</h3>
                    <div class="quiz-options">
                        <div class="quiz-option" onclick="checkAnswer(this, false, 2)">
                            A) npm remove
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, false, 2)">
                            B) npm rm
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, true, 2)">
                            C) npm delete
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, false, 2)">
                            D) npm un
                        </div>
                    </div>
                    <div class="quiz-feedback" id="feedback2"></div>
                </div>

                <div class="quiz-question">
                    <h3>Question 3: What should you do before uninstalling a package?</h3>
                    <div class="quiz-options">
                        <div class="quiz-option" onclick="checkAnswer(this, false, 3)">
                            A) Nothing, just uninstall it
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, true, 3)">
                            B) Check if it's still being used in your code
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, false, 3)">
                            C) Restart your computer
                        </div>
                        <div class="quiz-option" onclick="checkAnswer(this, false, 3)">
                            D) Delete node_modules first
                        </div>
                    </div>
                    <div class="quiz-feedback" id="feedback3"></div>
                </div>

                <div id="quizScore" style="margin-top: 30px; padding: 20px; background: var(--bg-secondary); border-radius: 12px; display: none;">
                    <h3 style="color: var(--accent-green); font-size: 1.5rem;">๐ŸŽ‰ Quiz Complete!</h3>
                    <p id="scoreText" style="font-size: 1.2rem; margin-top: 10px;"></p>
                </div>
            </div>
        </section>

        <section class="section" id="cheat-sheet">
            <h2 class="section-title">๐Ÿ“š Quick Reference Cheat Sheet</h2>
            <div class="cheat-sheet">
                <h3 style="margin-bottom: 20px; font-size: 2rem;">Package Removal Essentials! ๐Ÿ”–</h3>
                
                <div class="cheat-grid">
                    <div class="cheat-item">
                        <h4>๐Ÿ—‘๏ธ Basic Uninstall</h4>
                        <p><code>npm uninstall lodash</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Remove a package</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿ“ฆ Multiple Packages</h4>
                        <p><code>npm uninstall pkg1 pkg2</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Remove multiple at once</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐ŸŒ Global Uninstall</h4>
                        <p><code>npm uninstall -g package</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Remove global package</p>
                    </div>

                    <div class="cheat-item">
                        <h4>โšก Short Alias</h4>
                        <p><code>npm rm lodash</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Shortest command</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿ” Check Package</h4>
                        <p><code>npm ls lodash</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">See if installed</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿงน Prune Unused</h4>
                        <p><code>npm prune</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Remove all unused</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿ“‹ List All</h4>
                        <p><code>npm ls --depth=0</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Show all packages</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿ”„ Alternative</h4>
                        <p><code>npm remove lodash</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Same as uninstall</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿ“Š Check Size</h4>
                        <p><code>du -sh node_modules</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">See folder size</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐ŸŽฏ Dev Dependency</h4>
                        <p><code>npm un -D package</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Remove dev package</p>
                    </div>

                    <div class="cheat-item">
                        <h4>โœ… Verify Removal</h4>
                        <p><code>npm ls lodash</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Confirm it's gone</p>
                    </div>

                    <div class="cheat-item">
                        <h4>๐Ÿ”’ Clean Install</h4>
                        <p><code>rm -rf node_modules && npm i</code></p>
                        <p style="font-size: 0.85rem; margin-top: 5px;">Fresh install</p>
                    </div>
                </div>
            </div>
        </section>

        <div class="footer">
            <h2 style="font-size: 2rem; margin-bottom: 20px; color: var(--accent-pink);">
                ๐ŸŽ‰ Congratulations!
            </h2>
            <p style="font-size: 1.2rem; margin-bottom: 20px;">
                You now understand <strong>npm uninstall</strong> and how to manage your dependencies! ๐Ÿš€
            </p>
            <div style="margin: 30px 0;">
                <span class="badge">๐Ÿ—‘๏ธ Cleanup Master</span>
                <span class="badge">๐Ÿ“ฆ Package Pro</span>
                <span class="badge">๐Ÿงน Dependency Expert</span>
            </div>
            <p style="color: var(--text-secondary); margin-top: 30px;">
                Generated by <strong>AI Prompt Dictionary</strong> ๐Ÿค–
            </p>
            <p style="color: var(--text-secondary); font-size: 0.9rem;">
                Made with โค๏ธ for developers learning npm
            </p>
        </div>
    </div>

    <script>
        window.addEventListener('scroll', () => {
            const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
            const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            const scrolled = (winScroll / height) * 100;
            document.getElementById('progressBar').style.width = scrolled + '%';
        });

        function copyCode(button, codeId) {
            const code = document.getElementById(codeId).innerText;
            navigator.clipboard.writeText(code).then(() => {
                button.textContent = 'โœ… Copied!';
                button.classList.add('copied');
                setTimeout(() => {
                    button.textContent = '๐Ÿ“‹ Copy';
                    button.classList.remove('copied');
                }, 2000);
            });
        }

        function switchTab(tabName) {
            document.querySelectorAll('.tab-content').forEach(content => {
                content.classList.remove('active');
            });
            
            document.querySelectorAll('.tab').forEach(tab => {
                tab.classList.remove('active');
            });
            
            document.getElementById(tabName).classList.add('active');
            event.target.classList.add('active');
        }

        function toggleAccordion(header) {
            const content = header.nextElementSibling;
            const icon = header.querySelector('.accordion-icon');
            
            content.classList.toggle('active');
            icon.classList.toggle('active');
        }

        function simulateUninstall() {
            const terminal = document.getElementById('terminal');
            terminal.innerHTML = '<div class="terminal-line"><span class="terminal-prompt">$</span> <span class="terminal-command">npm uninstall lodash</span></div>';
            
            setTimeout(() => {
                terminal.innerHTML += '<div class="terminal-line"><span class="terminal-output">removed 1 package in 2s</span></div>';
            }, 1000);
            
            setTimeout(() => {
                terminal.innerHTML += '<div class="terminal-line"><span style="color: var(--accent-green);">โœ“ Lodash successfully removed!</span></div>';
            }, 2000);
            
            setTimeout(() => {
                terminal.innerHTML += '<div class="terminal-line"><span style="color: var(--accent-yellow);">๐Ÿ“ฆ Updated package.json</span></div>';
            }, 2500);
            
            setTimeout(() => {
                terminal.innerHTML += '<div class="terminal-line"><span style="color: var(--accent-yellow);">๐Ÿ—‘๏ธ Deleted from node_modules</span></div>';
            }, 3000);
            
            setTimeout(() => {
                terminal.innerHTML += '<div class="terminal-line"><span style="color: var(--accent-green);">๐ŸŽ‰ Your project is now cleaner!</span></div>';
                createConfetti();
            }, 3500);
        }

        let quizScore = 0;
        let questionsAnswered = 0;

        function checkAnswer(element, isCorrect, questionNum) {
            const options = element.parentElement.querySelectorAll('.quiz-option');
            options.forEach(opt => opt.style.pointerEvents = 'none');
            
            const feedback = document.getElementById('feedback' + questionNum);
            
            if (isCorrect) {
                element.classList.add('correct');
                feedback.className = 'quiz-feedback correct show';
                feedback.innerHTML = '<strong>๐ŸŽ‰ Correct!</strong> Great job!';
                quizScore++;
                createConfetti();
            } else {
                element.classList.add('incorrect');
                feedback.className = 'quiz-feedback incorrect show';
                feedback.innerHTML = '<strong>โŒ Not quite!</strong> Review the material and try again!';
            }
            
            questionsAnswered++;
            
            if (questionsAnswered === 3) {
                setTimeout(() => {
                    const scoreDiv = document.getElementById('quizScore');
                    const scoreText = document.getElementById('scoreText');
                    scoreDiv.style.display = 'block';
                    scoreText.textContent = `You scored ${quizScore}/3! ${quizScore === 3 ? '๐Ÿ† Perfect!' : quizScore === 2 ? '๐Ÿ‘ Good job!' : '๐Ÿ’ช Keep learning!'}`;
                }, 1000);
            }
        }

        function createConfetti() {
            const colors = ['#ef4444', '#3b82f6', '#10b981', '#f59e0b', '#ec4899', '#a855f7'];
            for (let i = 0; i < 50; i++) {
                const confetti = document.createElement('div');
                confetti.className = 'confetti';
                confetti.style.left = Math.random() * window.innerWidth + 'px';
                confetti.style.background = colors[Math.floor(Math.random() * colors.length)];
                confetti.style.animationDuration = (2 + Math.random() * 2) + 's';
                document.body.appendChild(confetti);
                setTimeout(() => confetti.remove(), 4000);
            }
        }
    </script>
</body>
</html>
Live Preview