Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filerev task doesn't work when using the same output file per two pages with targetPrefix #23

Closed
ppitonak opened this issue Oct 23, 2014 · 1 comment

Comments

@ppitonak
Copy link
Contributor

Let's say I have the following two jade pages (with same content for simplification):

//-<!-- build:js compiled/jquery.min.js -->
script(src='/src/script1.js')
//-<!-- endbuild -->

And the following Gruntfile config:

jadeUsemin: {
  withPrefixTwoFiles: {
    options: {
      tasks: {
        js: ['concat', 'uglify', 'filerev'],
        css: ['concat', 'cssmin']
      },
      dirTasks: ['filerev'],
      prefix: 'test/',
      targetPrefix: 'test/'
    },
    files: [{
      src: 'test/fixtures/layout.jade',
      dest: 'test/compiled/layout.jade'
    }, {
      src: 'test/fixtures/layout2.jade',
      dest: 'test/compiled/layout2.jade'
    }]
  }
}

After running jadeUsemin task compiled link in one file is correct (compiled/jquery.min.aaa4f100.js) but in the other file stays non-revisioned (compiled/jquery.min.js).

ppitonak added a commit to ppitonak/grunt-jade-usemin that referenced this issue Oct 23, 2014
… the same output file per two pages with targetPrefix
@pgilad pgilad closed this as completed in 7ae0733 Oct 24, 2014
pgilad added a commit that referenced this issue Oct 24, 2014
* ppitonak-23_filerev_targetprefix_two_files:
  fix replacement of revved assets. fixes #23
  failing test for issue #23 filerev task doesn't work when using the same output file per two pages with targetPrefix
@pgilad
Copy link
Owner

pgilad commented Oct 24, 2014

Thanks!! I think I finally got it. It was a problem with a combination of targetPrefix and filerev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants