S
S
Sergey Goryachev2017-03-22 23:22:58
css
Sergey Goryachev, 2017-03-22 23:22:58

What is wrong with task gulp jade and how to include css content in jade?

Something I again got confused in the galpa%) There is a task.

// jade task
gulp.task('jade', function() {
    gulp.src('asset/jade/**/*.jade','!asset/jade/**/_*.jade')
    .pipe(plumber())
    .pipe(jade({
        pretty: '\t'
    }))
    .pipe(gulp.dest('./'))
});

Gives an error on startup.
TypeError: Cannot assign to read only property 'cwd' of !asset/jade/**/_*.jade

There are 2 files in the jade folder.
--- _head.jade
---index.jade
The index.jade is written include _head.jade
I don't understand something and do I need some other plugin?
And another related question.
I want to pour css directly into the file into the index.html output file.
Can this be done with jade?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zooks, 2017-03-22
@webirus

1. The *.jade files need to be renamed to *.pug
2. Edit gulpfile.js:

gulp.src(['asset/jade/**/*.pug','!asset/jade/**/_*.pug'])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question