D
D
Dmitry2016-07-01 10:47:10
ruby
Dmitry, 2016-07-01 10:47:10

How to compile slim to html?

installed Ruby,
then gem install slim -v '>= 3.0.2'
then gem install slim-rails
then npm install gulp-slim --save-dev
Task like this:

gulp.task('slim', function(){
  return gulp.src("src/slim/*.slim")
    .pipe(slim())
    .pipe(gulp.dest("/"));
});

slim like this:
doctype html
html
  head
    title Slim Examples
  body
    h1 Markup examples

when you run gulp slim gives an error
fiwb.png
Tell me where to dig?
(added C:\Ruby23-x64\bin to PATH)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Amir Gafurov, 2016-07-01
@amir73911

Check the syntax, maybe there is an extra space somewhere or the indents are wrong. In general, instead of S;im, use Pug (ex-Jade)

D
Dmitry, 2016-07-01
@dkvasov

the problem is clearly not in the slim file, if you leave one line "html", it produces the same thing.
Pug will not work, slim is required (

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question