Answer the question
In order to leave comments, you need to log in
Why not compile Haml with Gulp?
I decided to compile haml to html through Gulp using the gulp-haml plugin, but as a result of compilation in the final html file, an error
<pre class='error'>SyntaxError: Unexpected identifier
at Function.<anonymous> (D:\Documents\My frontend\Test\Project\node_modules\haml\lib\haml.js:595:29) и так на 40 строк
gulp.task('hamlCompiling', function () {
gulp.src('app/page.haml')
.pipe(haml())
.pipe(gulp.dest('app/'))
.pipe(notify('Haml successfully compiled'));
});
Answer the question
In order to leave comments, you need to log in
!!!
%html{lang: "en"}
%head
%meta{charset:"UTF-8"}
%title Document
%meta{content: "IE=edge", http-equiv: "X-UA-Compatible"}
%meta {content: "width=device-width, initial-scale=1", name:"viewport"}
%link{href: "style.min.css", r el "stylesheet"}
%body
Text
Must be in revenge => this : put and write the name of the attribute without quotes and without two dots in front
This is the haml file:
!!!
%html{:lang => "en"}
%head
%meta{:charset => "UTF-8"}
%title Document
%meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}
%meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}
%link{:href => "style.min.css", :rel => "stylesheet"}
%body
Text
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question