Home

Awesome

webpack-subresource-integrity

npm version Build Status Coverage Status License

If you're looking for installation and usage instructions, visit the main package.

Or you might be looking for the 1.x version with support for Webpack 1-4 and older versions of html-webpack-plugin? Visit the 1.x branch.

Upgrading from version 1.x? Read the migration guide.

If you want to hack on the package, read on — you're in the right place.

Installing from source

To install from source, clone this repository, cd into it and run

yarn

Note: this repository uses yarn workspaces; you have to use a recent version of Yarn, npm won't work. (This limitation does not apply to the built package; you can install that with npm, yarn, or any other package manager.)

Running tests

The following will run all unit tests, integration tests, examples, and lint. It will also build the package and run a smoke test on the resulting tarball:

yarn check

Adding a new test

The easiest way to add a new test is to create an example, which is an integration test. An example is a self-contained package in directory example. It should follow these simple rules: