Skip to content

EJS Pulse transforms your EJS workflow with precise syntax highlighting, intelligent snippets, Emmet support, and a clean, optimized editing experience inside VS Code.

License

Notifications You must be signed in to change notification settings

CodewithEvilxd/EJS-PULSE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ EJS PULSE

EJS Pulse Logo

E J S โ–ธ P U L S E

โ–ˆ โ–“ โ–’ โ–‘ โ–ˆ โ–“ โ–’ โ–‘

โšก Level up your EJS templating game with intelligent syntax & smart snippets โšก

VS Code EJS License

๐ŸŽจ Syntax Highlighting

<% // Execute code %>
<%= // Output escaped %>
<%- // Output unescaped %>
<%# // Comments %>

โ–ธ Advanced EJS tag recognition
โ–ธ Full JavaScript syntax support
โ–ธ Nested structure handling
โ–ธ Smart color coding

โšก Smart Snippets

Type: ejsfor + Tab
Result: Loop structure
Type: ejsif + Tab  
Result: Conditional block

โ–ธ 12+ code snippets
โ–ธ Context-aware suggestions
โ–ธ Time-saving shortcuts
โ–ธ Customizable behavior

๐Ÿš€ Developer Experience

  • โœจ Full Emmet support within EJS templates
  • ๐Ÿง  IntelliSense for EJS-specific syntax
  • ๐Ÿ” Error detection and highlighting
  • ๐ŸŽฏ Quick navigation between blocks
  • โšก Optimized for large files

๐Ÿ“ฆ Installation

๐ŸŽฎ From VS Code Marketplace

# Method 1: Command Palette
Ctrl+Shift+P โ†’ Extensions: Install Extensions โ†’ Search "EJS Pulse"

# Method 2: Quick Open
Ctrl+P โ†’ ext install codewithevilxd.ejs-pulse

๐Ÿ› ๏ธ Manual Installation

git clone https://github.com/codewithevilxd/ejs-pulse.git
cd ejs-pulse
npm install
npm run package
code --install-extension ejs-pulse-1.0.0.vsix

โš™๏ธ Configuration

Add to your settings.json:

{
  "files.associations": {
    "*.ejs": "html"
  },
  "emmet.includeLanguages": {
    "ejs": "html"
  },
  "[ejs]": {
    "editor.defaultFormatter": "vscode.html-language-features",
    "editor.formatOnSave": true
  }
}

๐Ÿ“š Snippets Reference

Prefix Trigger Output
๐ŸŽฏ ejs Basic execution <% code %>
๐Ÿ“ค ejsout Escaped output <%= value %>
๐Ÿ”“ ejsesc Unescaped output <%- html %>
๐Ÿ’ฌ ejscom Comment <%# comment %>
๐Ÿ“ฅ ejsinc Include template <%- include('file') %>
๐Ÿ” ejsfor For loop <% for(let i = 0; i < n; i++) { %>
๐Ÿ”„ ejseach forEach loop <% items.forEach(item => { %>
โžก๏ธ ejsforof for...of loop <% for(const item of items) { %>
๐Ÿ”‘ ejsforin for...in loop <% for(const key in object) { %>
โ“ ejsif If statement <% if(condition) { %>
โšก ejsifelse If-else block <% if(cond) { %> ... <% } else { %>
๐ŸŽฒ ejster Ternary operator <%= condition ? true : false %>

๐Ÿ’ก Usage Examples

๐ŸŽฎ Basic Template

<!DOCTYPE html>
<html lang="en">
<head>
    <title><%= title %></title>
</head>
<body>
    <header>
        <h1>Welcome, <%= user.name %>! ๐ŸŽ‰</h1>
        <p>Level: <%= user.level %></p>
    </header>

    <% if(user.posts.length > 0) { %>
        <section class="posts">
            <h2>Your Posts (%= user.posts.length %):</h2>
            <ul>
            <% user.posts.forEach(post => { %>
                <li>
                    <h3><%= post.title %></h3>
                    <p><%- post.content %></p>
                </li>
            <% }) %>
            </ul>
        </section>
    <% } else { %>
        <div class="empty-state">
            <p>No posts yet ๐Ÿ“</p>
            <a href="/create">Create your first post!</a>
        </div>
    <% } %>
</body>
</html>

๐Ÿ”„ Loop Examples

<!-- โšก Traditional for loop -->
<div class="products-grid">
<% for(let i = 0; i < products.length; i++) { %>
    <div class="product-card">
        <h3><%= products[i].name %></h3>
        <p class="price">$<%= products[i].price %></p>
        <span class="badge">Item #<%= i + 1 %></span>
    </div>
<% } %>
</div>

<!-- ๐ŸŽฏ forEach loop -->
<div class="products-list">
<% products.forEach((product, index) => { %>
    <article class="product">
        <h3><%= product.name %></h3>
        <p><%= product.description %></p>
        <span class="price">$<%= product.price %></span>
    </article>
<% }) %>
</div>

<!-- โœจ for...of loop -->
<% for(const product of products) { %>
    <div class="product-minimal">
        <%= product.name %> - $<%= product.price %>
    </div>
<% } %>

๐ŸŽฒ Conditional Rendering

<!-- Ternary operator -->
<p class="status">
    Status: <%= user.isActive ? '๐ŸŸข Online' : '๐Ÿ”ด Offline' %>
</p>

<!-- If-else statement -->
<% if(user.role === 'admin') { %>
    <button class="admin-panel">โš™๏ธ Admin Dashboard</button>
<% } else if(user.role === 'moderator') { %>
    <button class="mod-panel">๐Ÿ›ก๏ธ Moderator Tools</button>
<% } else { %>
    <button class="user-panel">๐Ÿ‘ค User Profile</button>
<% } %>

๐Ÿ”— Resources


๐Ÿค Contributing

We'd love your help making EJS Pulse even better!

# Fork the repository
# Create your feature branch
git checkout -b feature/AmazingFeature

# Commit your changes
git commit -m 'Add some AmazingFeature'

# Push to the branch
git push origin feature/AmazingFeature

# Open a Pull Request

Ways to contribute:

  • ๐Ÿ› Report bugs and issues
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿ”ง Submit pull requests
  • ๐Ÿ“š Improve documentation

๐Ÿ’ฌ Support

Need help? We're here for you!

Issues Discussions


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐ŸŽฎ Made with ๐Ÿ’š by developers, for developers

Star โญ this repo if you find it useful!

GitHub Stars GitHub Forks

About

EJS Pulse transforms your EJS workflow with precise syntax highlighting, intelligent snippets, Emmet support, and a clean, optimized editing experience inside VS Code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published