S
S
Stone-Studio2015-10-21 15:00:55
gulp.js
Stone-Studio, 2015-10-21 15:00:55

How to make correct paths for Gulp in Laravel?

Main page - Blade template, located in /resources/views
The blocks that make up the main page are located in /resources/views/widgets and are included in the main file. In the browser, the main is available localhost/directory/index. I need to use the uncss plugin to remove unused styles. How can I correctly write the paths in the files?
At the moment the gulpfile.js file looks like this

var gulp = require('gulp');
var uncss = require('gulp-uncss');

gulp.task('uncss', function() {

    return gulp.src('/media/default/default_mobile.css')
        .pipe(
        uncss({
            html: ['http://localhost/index'],
            stylesheets: ['http://localhost/media/css/default/default_mobile.css']
        }))
        .pipe(gulp.dest('http://localhost/media/css/gulp/'));

});

I'm trying to run it..
1b0173144fdb43fdad59d070dee9aec7.png
It doesn't work.. (it says to the console that the task has been completed, but in fact nothing happens)
Please note that the layout is not in one html file, but in .blade.php files divided into blocks.
Help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rikcon, 2015-10-21
@Rikcon

Try specifying the stylesheet path on disk rather than on the web.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question