{ "name": "karma-html2js-preprocessor", "version": "0.1.0", "description": "A Karma plugin. Convert HTML files into JS strings to serve them in a script tag.", "main": "lib/index.js", "scripts": { "test": "grunt test" }, "repository": { "type": "git", "url": "git://github.com/karma-runner/karma-html2js-preprocessor.git" }, "keywords": [ "karma-plugin", "karma-preprocessor", "html2js", "html" ], "author": { "name": "Vojta Jina", "email": "vojta.jina@gmail.com" }, "dependencies": {}, "devDependencies": { "grunt": "~0.4.1", "grunt-simple-mocha": "~0.4", "grunt-contrib-jshint": "~0.6", "chai": "~1.4", "mocha": "~1.8", "grunt-npm": "~0.0.2", "grunt-bump": "~0.0.7", "grunt-auto-release": "~0.0.2" }, "peerDependencies": { "karma": ">=0.9" }, "license": "MIT", "contributors": [], "readme": "# karma-html2js-preprocessor [![Build Status](https://travis-ci.org/karma-runner/karma-html2js-preprocessor.png?branch=master)](https://travis-ci.org/karma-runner/karma-html2js-preprocessor)\n\n> Preprocessor for converting HTML files into JS strings.\n\n*Note:* If you are using [AngularJS](http://angularjs.org/), check out [karma-ng-html2js-preprocessor](https://github.com/karma-runner/karma-ng-html2js-preprocessor).\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-html2js-preprocessor` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-html2js-preprocessor\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-html2js-preprocessor --save-dev\n```\n\n## Configuration\nFollowing code shows the default configuration...\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n preprocessors: {\n '**/*.html': ['html2js']\n },\n\n files: [\n '*.js',\n '*.html'\n ]\n });\n};\n```\n\n## How does it work ?\n\nThis preprocessor converts HTML files into JS strings and publishes them in the global `window.__html__`, so that you can use these for testing DOM operations.\n\nFor instance this `template.html`...\n```html\n