Skip to content

merge all rev-manifest.json assets to one rev-manifest.json #231

Open
@miladmeidanshahi

Description

@miladmeidanshahi

Description

Hi, how can i merge all assets to one rev-manifest.json for example css files js files to one rev-manifest.json and rev-del work correctly in this situation.

here is asset directory

static/dist/css/*.css
static/dist/js/*.js

rev-manifest.json files for all assets

static/dist/rev-manifest.json

{
  "test.js": "test-b159db5fed.min.js",
  "test.css": "test-b159db5fed.min.css",
  ...
}

and finally i think the gulp task must be something like this

for javascript files

        .pipe(rev())
        .pipe(gulp.dest(statics + 'dist/js'))
        .pipe(rev.manifest({ merge: true }))
        .pipe(revDel({ dest: statics + 'dist/js' }))
        // hear save the rev-manifest.json to static/dist/rev-manifest.json not separate for each folder 
        .pipe(gulp.dest(statics + 'dist'))

for css files

        .pipe(rev())
        .pipe(gulp.dest(statics + 'dist/css'))
        .pipe(rev.manifest({ merge: true }))
        .pipe(revDel({ dest: statics + 'dist/css' }))
        // hear save the rev-manifest.json to static/dist/rev-manifest.json not separate for each folder 
        .pipe(gulp.dest(statics + 'dist'))

the important step is revdel should work fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions