B
B
Bogdan2017-04-18 09:33:49
gulp.js
Bogdan, 2017-04-18 09:33:49

How to set option shortcut in gulp-slim?

Hello. Do not tell me how to set up your shortcuts when compiling from slim to html. For example I want to add:

Slim::Engine.set_options shortcut: {
  '#' => {attr: 'id'},
  '.' => {attr: 'class'},
  '&' => {tag: 'input', attr: 'type'},
  '@' => {attr: 'role'},
  '^' => {attr: %w(data-role role)}
}

The official documents say that you need to insert this code into "config/initializers/slim.rb", but what about when compilation is not in a Rails project? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question