sindresorhus / gulp-rev

Static asset revisioning by appending content hash to filenames: `unicorn.css` → `unicorn-d41d8cd98f.css`
MIT License
1.54k stars 217 forks source link

rev-manifest.json path issue #230

Closed miladmeidanshahi closed 7 years ago

miladmeidanshahi commented 7 years ago

Description

Hi, in rev-manifest.json file path are not true for example

already my file is

{
  "uikit.min.js": "uikit-f3c0fecbd1.min.js"
}

but it should be

{
  "js/uikit.min.js": "dist/js/uikit-f3c0fecbd1.min.js"
}

how can i do that ?

zhouzi commented 7 years ago

Hey @miladmeidanshahi 👋 Could you share the gulp task that uses gulp-rev please? By stripping irrelevant parts in the process 🙏

miladmeidanshahi commented 7 years ago

Hi @Zhouzi, many thanks to help me.

this is my task

shop = {
        css: [
            statics + 'css/client/framework.css',
            statics + 'css/client/home.css',
            statics + 'css/client/browse.css',
            // statics + 'css/client/5_million_1.css',
            statics + 'css/client/product-profile.css',
            statics + 'css/client/cropper.css',
            statics + 'css/client/product-compare.css',
            statics + 'css/client/cart.css',
            statics + 'css/client/user-profile.css',
            // statics + 'css/authenticate.css',
            statics + 'css/dataTables.uikit.min.css',
            statics + 'css/jquery-ui.css',
            statics + 'css/responsive.dataTables.min.css',
            statics + 'css/select2.css',
            statics + 'css/client/style.css'
        ]
    }

gulp.task('concatStyle', function (cb) {

    gulp.src(shop.css)
        .pipe(concat('style.min.css'))
        .pipe(cleanCSS())
        .pipe(rev())
        .pipe(tap(function(file, t) {
            b = file
            cb();
        }))
        .pipe(gulp.dest(statics + 'dist/css'))
        .pipe(rev.manifest())
        .pipe(revDel({ dest: statics + 'dist/css' }))
        .pipe(gulp.dest(statics + 'dist/css'))
})
zhouzi commented 7 years ago

@miladmeidanshahi did you figure it out? Could you please share the fix, for reference.

miladmeidanshahi commented 7 years ago

@Zhouzi yes it was my fault my package was older version