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

Change scripts block to allow custom attributes #397

Closed
wants to merge 1 commit into from

Conversation

amesarosh
Copy link
Contributor

This is specifically useful for adding data attributes to the script tags generated by getBlock

Ex:
scripts.add( "/js/require.js", defer: false, attrs: 'data-main="js/main"' )

->

<script data-main="js/main" src="/js/require.js"></script>

@balupton
Copy link
Member

Looks good, I'll merge it in now. It would be nice if the attrs were a JSON object too but that can come later.

@balupton
Copy link
Member

Included in the just released v6.21.4 :)

@balupton balupton closed this Jan 16, 2013
balupton added a commit that referenced this pull request Jan 16, 2013
- v6.21.4 January 16, 2013
	- Fixed incorrect meta data parsing for certain files
		- Closes [issue #394](#394)
thanks to [Jose Quesada](https://github.com/quesada) and
[Stefan](https://github.com/stegrams)
	- Scripts and styles blocks now support an `attrs` option string
		- Closes [pull request
#397](#397) thanks to
[Alex](https://github.com/amesarosh)
		- Closes [issue #400](#400)
thanks to [edzillion](https://github.com/edzillion)
balupton added a commit that referenced this pull request Oct 23, 2013
- v6.21.4 January 16, 2013
	- Fixed incorrect meta data parsing for certain files
		- Closes [issue #394](#394)
thanks to [Jose Quesada](https://github.com/quesada) and
[Stefan](https://github.com/stegrams)
	- Scripts and styles blocks now support an `attrs` option string
		- Closes [pull request
#397](#397) thanks to
[Alex](https://github.com/amesarosh)
		- Closes [issue #400](#400)
thanks to [edzillion](https://github.com/edzillion)
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