jest-raw-loader
Advanced tools
Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "jest-raw-loader", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "Jest transformer mimicking webpack-contrib/raw-loader's functionality", | ||
@@ -9,3 +9,28 @@ "main": "index.js", | ||
"license": "MIT", | ||
"private": false | ||
"private": false, | ||
"scripts": { | ||
"test": "jest", | ||
"precommit": "lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"prettier --write", | ||
"git add", | ||
"jest --bail --findRelatedTests" | ||
], | ||
"*.json": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
}, | ||
"devDependencies": { | ||
"husky": "^0.14.3", | ||
"jest": "^21.2.1", | ||
"lint-staged": "^4.3.0", | ||
"prettier": "^1.7.4" | ||
}, | ||
"jest": { | ||
"coverageDirectory": "./coverage/", | ||
"collectCoverage": true | ||
} | ||
} |
# jest-raw-loader | ||
Jest transformer mimicking [webpack-contrib/raw-loader](https://github.com/webpack-contrib/raw-loader)'s functionality | ||
[![npm](https://img.shields.io/npm/v/jest-raw-loader.svg)](https://www.npmjs.com/package/jest-raw-loader) | ||
[![Build Status](https://travis-ci.org/keplersj/jest-raw-loader.svg?branch=master)](https://travis-ci.org/keplersj/jest-raw-loader) | ||
[![Code Coverage](https://codecov.io/gh/keplersj/jest-raw-loader/branch/master/graph/badge.svg)](https://codecov.io/gh/keplersj/jest-raw-loader) | ||
[![Code Style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[Jest](https://facebook.github.io/jest/) transformer mimicking [webpack-contrib/raw-loader](https://github.com/webpack-contrib/raw-loader)'s functionality | ||
## Install | ||
``` | ||
$ npm install --save-dev jest-raw-loader | ||
``` | ||
## Usage | ||
Use [jest's `transform` configuration options](https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string) to use this package in your unit tests. | ||
For example use the following to raw load `.md` and `.graphql` files: | ||
```json | ||
"jest": { | ||
"transform": { | ||
"\\.graphql$": "<rootDir>/node_modules/jest-raw-loader/index.js", | ||
"\\.md$": "<rootDir>/node_modules/jest-raw-loader/index.js" | ||
} | ||
} | ||
``` | ||
## License | ||
MIT © [Kepler Sticka-Jones](https://github.com/keplersj) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3834
7
13
1
34
0
4