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

Allow for multiple uses of {{ext}} in the Start and End Tag option #5

Merged
merged 1 commit into from
Jul 3, 2014

Conversation

robpc
Copy link

@robpc robpc commented Jun 16, 2014

Changed the replace in getInjectorTagsRegExp to a global regular expression. This allows the {{ext}} replacement to be used multiple places in the start or end tag. This is useful for making the tags the same as the usemin start and end tags. Example:

    <!-- build:css css/app.css -->
    ...
    <!-- endbuild -->
    ...
    <!-- build:js js/app.js -->
    ...
    <!-- endbuild -->

Normally two injector tasks would be needed, but with the changes, they can be in the form:

    {
      localDeps: {
         options: {
          starttag: '<!-- build:{{ext}} {{ext}}/app.{{ext}} -->',
          endtag: '<!-- endbuild -->'
         }
      }
    }

@joakimbeng
Copy link
Member

Great, thank you!

joakimbeng added a commit that referenced this pull request Jul 3, 2014
Allow for multiple uses of {{ext}} in the Start and End Tag option
@joakimbeng joakimbeng merged commit 6ef75c3 into klei:master Jul 3, 2014
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

Successfully merging this pull request may close these issues.

2 participants