New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

slimi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slimi

  • 0.7.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Slimi

test

Yet another implementation for Slim template language.

Introduction

Slimi provides almost the same functionality as Slim, with a few additional useful features, such as generating AST with detailed location information about embedded Ruby codes.

Originally, Slimi was developed for Slimcop, a RuboCop runner for Slim template. It uses Slimi to apply rubocop --auto-correct to embedded Ruby codes in Slim template.

Usage

Rails

Add this line to your application's Gemfile.

gem 'slimi'

This will cause app/views/**/*.slim files to be rendered by Slimi.

CLI

Slimi can be tested from command line by slimi executable. This takes Slim code from STDIN and converts it into another form.

$ slimi --help
Commands:
  slimi compile         # Convert Slim into Ruby
  slimi erb             # Convert Slim into ERB
  slimi help [COMMAND]  # Describe available commands or one specific command
  slimi parse           # Convert Slim into Temple expression
  slimi render          # Convert Slim into HTML

Compatibility

  • Line indicators
    • Vebatim text
    • Inline HTML
    • Control
    • Output
    • HTML comment
    • Code comment
    • IE conditional comment
  • Tags
    • Doctype declaration
    • Closed tags
    • Trailing and leading white space
    • Inline tags
    • Text content
    • Dynamic content
    • Tag shortcuts
    • Dynamic tags
  • Attributes
    • Attributes wrapper
    • Quoted attributes
    • Ruby attributes
    • Boolean attributes
    • Attribute merging
    • Attribute shortcuts
    • Splat attributes
  • Plugins
    • Include partials
    • Translator/I18n
    • Logic-less mode
    • Smart text mode
  • CLI
    • Convert Slim to Ruby
    • Convert Slim to HTML
    • Convert Slim to ERB
  • Slimi-only features
    • Embedded Ruby code location
    • Support for annotate_rendered_view_with_filenames
    • Convert Slim to Temple expression by CLI

FAQs

Package last updated on 25 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc