Skip to content

Commit

Permalink
Refactor, add minimum Node version, replace SRI link
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Szakacs committed Nov 1, 2017
1 parent e5a50db commit 0ae303a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# get-sri

[![Node.js Version][node-badge]][node-url]
[![Travis CI - Build Status][travis-badge]][travis-url]
[![AppVeyor CI - Build Status][appveyor-badge]][appveyor-url]
[![Coveralls - Code Coverage Status][cov-badge]][cov-url]
[![JavaScript Style Guide][jsstd-badge]][jsstd-url]
[![PRs Welcome][pr-badge]][pr-url]

Generates the [**SRI**][sri-url] [*(Subresource Integrity)*][sri-url] of the given string
Generates the [**SRI**][sri-url] [*(Subresource Integrity)*][sri-url] hash of the given string
to use as the **SRIs of CDN files** without publishing the content to CDN
*(e.g. when generating the readme file before release and publish)*.

With `get-sri`, you can just simply generate the `sha256-j7UhB[...]5ni2s=` part of the `integrity` attribute
for `<link>` and `<script>` elements, e.g.:

```html
<script src="https://cdn.mycustom.com/javascript-file-from-cdn.min.js"
<script src="https://example.com/example-framework.js"
integrity="sha256-j7UhB8zxegHMV59uYb38Ho75sqloISge2+fsjN5ni2s="
crossorigin="anonymous"></script>
```
Expand Down Expand Up @@ -46,16 +47,15 @@ getSRI('... file content as string ...', getSRI.SHA256, true) // 'sha256-OXPgIuk
## Contribution

**Any contribution is appreciated**. To get going, check out the
[**contribution guidelines**](CONTRIBUTING.md) and the
[**development guide**](DEVELOPMENT.md).

***Thank you, have fun!***
[**contribution guidelines**](CONTRIBUTING.md). ***Thank you, have fun!***

## License

[MIT](LICENSE.md) @ [Richard Szakacs](https://www.github.com/richardszkcs)


[node-badge]: https://img.shields.io/badge/Node-4+-brightgreen.svg?longCache=true&style=flat
[node-url]: https://travis-ci.org/ntbx/get-sri
[travis-badge]: https://travis-ci.org/ntbx/get-sri.svg?branch=master
[travis-url]: https://travis-ci.org/ntbx/get-sri
[appveyor-badge]: https://ci.appveyor.com/api/projects/status/09qmd4yk9arxyeph?svg=true
Expand All @@ -68,5 +68,5 @@ getSRI('... file content as string ...', getSRI.SHA256, true) // 'sha256-OXPgIuk
[jsstd-url]: https://standardjs.com

[pr-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[sri-url]: https://hacks.mozilla.org/2015/09/subresource-integrity-in-firefox-43
[sri-url]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
[pr-url]: CONTRIBUTING.md

0 comments on commit 0ae303a

Please sign in to comment.