This topic contains 5 replies, has 3 voices, and was last updated by Sean Sean 1 year, 11 months ago.

Gulpfile piping to new ./html directory


  • ses_proses
    Participant

    Posts: 1
    Member Reply #5371

    Hi,

    I’m new to Metronic and pretty new to Gulp as well. As far as I understand the gulpfile, the minify task will always output the minified JS/CSS to a new folder called html. This new folder isn’t referenced from the .html files, so I don’t see the point of it. The minify statements look like this:

    gulp.src(['./assets/apps/css/*.css', '!./assets/apps/css/*.min.css']).pipe(minifyCss()).pipe(rename({suffix: '.min'})).pipe(gulp.dest('./html'));

    What’s the reason behind this? Would it not make more sense to write the minified files to their original locations?

    Thanks,

    Adrian

    Sean
    Sean
    Keymaster

    Posts: 4226
    Support Staff Reply #5395

    Hi,

    May i know what Metronic version are you using ? Can you try it with the latest v4.5.4 version ?

    Thanks.


    ses_proses
    Participant

    Posts: 1
    Member Reply #5429

    We’re on 4.5.4. I’ve changed the gulpfile so that it writes the minified scripts back to their original directories:

    .pipe(gulp.dest('./assets/pages/scripts/'))

    I’ve also added a minify:watch task like so:

    gulp.task('minify:watch', function() {
    gulp.watch(['./assets/pages/scripts/*.js','!./assets/pages/scripts/*.min.js'], ['minify']);
    });

    I think that’s the best way to work on the JavaScript. I’m just confused as to why you were writing all the scripts into a new directory.

    Thanks!

    Sean
    Sean
    Keymaster

    Posts: 4226
    Support Staff Reply #5451

    Hi,

    Thanks for your feedback. We will double check this issue and provide the fix in the next update that we are planning to release very soon.

    Thanks.


    ohblue
    Participant

    Posts: 3
    Member Reply #5463

    i have the same issue.

    • This reply was modified 1 year, 11 months ago by  ohblue.
    Sean
    Sean
    Keymaster

    Posts: 4226
    Support Staff Reply #5473

    Hi ohblue,

    Please refer to http://keenthemes.com/forums/topic/gulp-minity-not-updating-assetsmin-css/ to get this fixed. If you need any further clarifications please let us know.

    Thanks.

Tagged: 

You must be logged in to reply to this topic.