-
Notifications
You must be signed in to change notification settings - Fork 596
Adding SRI support to codeorigin.jquery.com #22
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
Conversation
Thank you for your pull request. It looks like this may be your first contribution to a jQuery Foundation project, if so we need you to sign our Contributor License Agreement (CLA). 📝 Please visit http://contribute.jquery.org/CLA/ to sign. After you signed, the PR is checked again automatically after a minute. If there's still an issue, please reply here to let us know. If you've already signed our CLA, it's possible your git author information doesn't match your CLA signature (both your name and email have to match), for more information, check the status of your CLA check. |
Point of note. I signed the CLA (twice) and verified that both the name and email address that I used match what's in my github.com settings. |
Handlebars.registerHelper( "release", function( prefix, release ) { | ||
var html = prefix + " " + release.version + " - " + | ||
"<a href='/" + release.filename + "'>uncompressed</a>"; | ||
var sri = function(filename) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should be defined outside of the helper so that it's only ever defined once.
There are a lot of code style violations with spacing, but we can fix that when merging. |
That's correct. If you have any other questions about the way the sites work or if you run into any issues getting everything set up, just let us know.
Just add it to |
Indeed. However, the CLA check doesn't look at GitHub, it looks at the actual commits in git. In git, you have your name set as Josh, not Joshua. You can either update your git config and reset the author info on these commits, or sign the CLA as Josh. On a related note, I see that the CLA status page is 404ing. I'll try to take a look at that tomorrow. |
@scottgonzalez Thanks for the feedback. I'll address everything mentioned. If there's a published style guide, or linter that you use, I'd be happy to address any violations. Cheers and thanks again! |
grunt.file.mkdir( "dist/resources" ); | ||
}); | ||
|
||
grunt.registerTask( "sri-generate", [ "ensure-dist-resources", "sri:generate" ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, I registered this as such because sri:generate
will fail without this step.
http://contribute.jquery.org/style-guide/js/ We generally lint code with JSHint and JSCS, but we don't currently run those on our site repos. |
Cool. I'll review the style guide tonight and do my best to fix what's missing. I think I got all the spacing specific issues though. |
Hello!
Per the discussions on #20, I'm adding SRI generation and include the
class
anddata-hash
attributes here injquery/codeorigin.jquery.com
. The changes here should have no functional impact on the site, but are required for implementation. I'm new to both the*.jquery.com
setup and Wordpress itself, however based on what I'm seeing, it looks like the rest will need to be implemented in github.com/jquery/jquery-wp-content insidethemes/codeorigin.jquery.com
. If I am incorrect in that assumption, please let me know.Additionally, a question for the group. I opted to include the generated
sri-directives.json
file, but still generate it on deployment. I wanted to get some feedback on this. I sort of think it should be one or the other. Either (a) generate on deployment (adding it to the.gitignore
file) or (b) required it to be manually generated and checked in. Thoughts?Thanks and cheers!
J
(cc @jdorfman)