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

Added new option: attributes which are embedded in html tags #188

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Added new option: attributes which are embedded in html tags #188

wants to merge 4 commits into from

Conversation

lochbrunner
Copy link

In order to use this plugin together with other gulp-plugins such as for example gulp-inline-source, added an option called attributes which adds the specified attributes to the corresponding html tags.

The attributes can be

  • a string (the string is added as a attribute (suitable for gulp-inline-source: attributes: 'inline'))
  • an object ({a: 'A', b: 'B'} leads to a="A" b="B")
  • an array of
    • strings: ( ['a', 'b'] -> a b)
    • objects ( [{name: 'a', value:'A'}, {name: 'b', value:'B'}] -> a="A" b="B" )
    • arrays ( [['a', 'A'],['b', 'B']] -> a="A" b="B")

Tests for this feature are added too.

Please let me know if I should make some additional changes. For example specifying attributes to special files.

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.

1 participant