{"_id":"karma-html2js-preprocessor","_rev":"20-e204b3ca2d8a8364d475a1a6385fbbc6","name":"karma-html2js-preprocessor","description":"A Karma plugin. Convert HTML files into JS strings to serve them in a script tag.","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.1":{"name":"karma-html2js-preprocessor","version":"0.0.1","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","preprocessor","html2js","html"],"author":{"name":"Vojta Jina","email":"vojta.jina@gmail.com"},"dependencies":{},"devDependencies":{"grunt":"~0.4.0rc5","grunt-simple-mocha":"~0.3.2","grunt-contrib-jshint":"~0.1.1rc5","chai":"~1.4","mocha":"~1.8"},"peerDependencies":{"karma":"~0.9"},"license":"MIT","_id":"karma-html2js-preprocessor@0.0.1","dist":{"shasum":"89c20e91b7d207d650c6e8514123933ffcf74e1a","tarball":"https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-0.0.1.tgz","integrity":"sha512-CcQL6LCxmAAFvd40fQrH0zIZ06cGubcuPlzRQwcx/ADYiQ2rgDA1I6OjP/2uMipd0F7OasX5lqtsPq7b28Rgbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEcq0SyliuXuepzKP3Rcr0MlSlnOXe4678JR2piDLBhWAiEA0z95Qz6jLjInpL14xPjeeIM4QU8rqdwwYprJLPZekzU="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"vojtajina","email":"vojta.jina@gmail.com"},"maintainers":[{"name":"vojtajina","email":"vojta.jina@gmail.com"}]},"0.0.2":{"name":"karma-html2js-preprocessor","version":"0.0.2","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","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":[],"bugs":{"url":"https://github.com/karma-runner/karma-html2js-preprocessor/issues"},"_id":"karma-html2js-preprocessor@0.0.2","dist":{"shasum":"25e648e16f2f369e42003661b34e978ad3d91bc7","tarball":"https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-0.0.2.tgz","integrity":"sha512-uDIuAB2F4KFvV9zljYQkoXjn9evEDUFxuapqGVs+M/QDZlRT5CLN3kU4Zo1s0pTVp4LHxvHbdRCiPJfuxGojSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGHzi8h/z6ppnuymnrgwC1GsA8mWkWpsuOrZ4qQoExuAiB75VvT1flITwjD8hcJ08WVIqrmGk7kfHybYX45Eku3zA=="}]},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"vojtajina","email":"vojta.jina@gmail.com"},"maintainers":[{"name":"vojtajina","email":"vojta.jina@gmail.com"}]},"0.1.0":{"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":[],"bugs":{"url":"https://github.com/karma-runner/karma-html2js-preprocessor/issues"},"_id":"karma-html2js-preprocessor@0.1.0","dist":{"shasum":"2f7cf881f54a5d0b72154cc6ee1241c44292c7fe","tarball":"https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-0.1.0.tgz","integrity":"sha512-lX+imoRNys+eFBtuxAOaqUTi4Pvdq/oKvKqzmGcDn8Dzmkz28EcQPmbCTEvKk61romXVTg9JZ7b2ZiDUyu1NDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmInHzevYUfwKsrD8nw4qWbkVCPGYZTzEIuQ5HLVMYMAIgWiCRkAqYyFX+1Q04yVqPXZEpUwD/jXUybx6fexZMpfI="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"vojtajina","email":"vojta.jina@gmail.com"},"maintainers":[{"name":"vojtajina","email":"vojta.jina@gmail.com"}]},"1.0.0":{"name":"karma-html2js-preprocessor","version":"1.0.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":[{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Andres Rios","email":"rianby64@gmail.com"},{"name":"Jochen Ulrich","email":"jochenulrich@t-online.de"},{"name":"Richard McIntyre","email":"richard.mackstar@gmail.com"}],"gitHead":"94aba24deb37f70b70c7d9a1a50d276cc1c8716f","bugs":{"url":"https://github.com/karma-runner/karma-html2js-preprocessor/issues"},"homepage":"https://github.com/karma-runner/karma-html2js-preprocessor#readme","_id":"karma-html2js-preprocessor@1.0.0","_shasum":"219d39ef056ef5dc43c32e6a79c789a68ae42dbc","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"zzo","email":"mark@zzo.com"},"dist":{"shasum":"219d39ef056ef5dc43c32e6a79c789a68ae42dbc","tarball":"https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-1.0.0.tgz","integrity":"sha512-IezLDmrJ4BS1n6hPFln4pKXMhKLBrWtFe72PK4FuNjk4NTdMDQP+53WXQuDKtPTYDWM+xfx5AypReoMMJCwtIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTY6civ7k1IwX3DC/986BsBMmx8doWLmxzxUOJE91NugIgHgdn0TKIkyI29Gn/79He/u4xRhbP0nW39dKtRlW9AZ0="}]},"maintainers":[{"name":"vojtajina","email":"vojta.jina@gmail.com"},{"name":"zzo","email":"mark@zzo.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/karma-html2js-preprocessor-1.0.0.tgz_1462297527648_0.3636759330984205"}},"1.1.0":{"name":"karma-html2js-preprocessor","version":"1.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":"~1.0.1","grunt-simple-mocha":"~0.4","grunt-contrib-jshint":"~1.0","chai":"~3.5","mocha":"~3.0","grunt-npm":"~0.0.2","grunt-bump":"~0.8.0","grunt-auto-release":"~0.0.6"},"peerDependencies":{"karma":">=0.9"},"license":"MIT","contributors":[{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Mark Ethan Trostler","email":"mark@zzo.com"},{"name":"Andres Rios","email":"rianby64@gmail.com"},{"name":"Larry Davis","email":"lazdnet@gmail.com"},{"name":"Jochen Ulrich","email":"jochenulrich@t-online.de"},{"name":"Richard McIntyre","email":"richard.mackstar@gmail.com"}],"gitHead":"fef0474b5b5c6cd5c5be23ac941a765099fe24bf","bugs":{"url":"https://github.com/karma-runner/karma-html2js-preprocessor/issues"},"homepage":"https://github.com/karma-runner/karma-html2js-preprocessor#readme","_id":"karma-html2js-preprocessor@1.1.0","_shasum":"fc09edf04bbe2bb6eee9ba1968f826b7388020bd","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"},"dist":{"shasum":"fc09edf04bbe2bb6eee9ba1968f826b7388020bd","tarball":"https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-1.1.0.tgz","integrity":"sha512-SiaPXNxIQjzBnxbi0mOT24zCzjFWBGaxWM/DqnEhp4WbI5kNpiZ35Jb/h7etrob+wiDSuDkltCuxE/fMSayqeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBfXmtmlVez6lT7fpqc6nefQZsIlJK/fTgp1biartKUwIhAInbEJuRsG1PPwWThmmlUQv496OuKG0yj9C7IlyToFUk"}]},"maintainers":[{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"},{"name":"vojtajina","email":"vojta.jina+npm@gmail.com"},{"name":"zzo","email":"mark@zzo.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/karma-html2js-preprocessor-1.1.0.tgz_1474448096722_0.34560999530367553"}}},"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\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\n\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    html2JsPreprocessor: {\n      // strip this from the file path\n      stripPrefix: 'public/',\n\n      // prepend this to the file path\n      prependPrefix: 'served/',\n\n      // or define a custom transform function\n      processPath: function(filePath) {\n        // Drop the file extension\n        return filePath.replace(/\\.html$/, '');\n      }\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<div>something</div>\n```\n... will be served as `template.html.js`:\n```js\nwindow.__html__ = window.__html__ || {};\nwindow.__html__['template.html'] = '<div>something</div>';\n```\n\nSee the [end2end test](https://github.com/karma-runner/integration-tests/blob/master/html2js/test.js) for a complete example.\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n","maintainers":[{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"},{"name":"vojtajina","email":"vojta.jina+npm@gmail.com"},{"name":"zzo","email":"mark@zzo.com"}],"time":{"modified":"2022-06-19T07:58:38.946Z","created":"2013-04-26T18:09:28.221Z","0.0.1":"2013-04-26T18:09:29.313Z","0.0.2":"2013-07-05T22:55:59.493Z","0.1.0":"2013-08-06T09:29:17.284Z","1.0.0":"2016-05-03T17:45:29.890Z","1.1.0":"2016-09-21T08:54:59.052Z"},"author":{"name":"Vojta Jina","email":"vojta.jina@gmail.com"},"repository":{"type":"git","url":"git://github.com/karma-runner/karma-html2js-preprocessor.git"},"users":{"mswanson1524":true,"samhwang1990":true,"bhupendraky":true,"wayn":true,"dwqs":true},"keywords":["karma-plugin","karma-preprocessor","html2js","html"],"contributors":[{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Mark Ethan Trostler","email":"mark@zzo.com"},{"name":"Andres Rios","email":"rianby64@gmail.com"},{"name":"Larry Davis","email":"lazdnet@gmail.com"},{"name":"Jochen Ulrich","email":"jochenulrich@t-online.de"},{"name":"Richard McIntyre","email":"richard.mackstar@gmail.com"}],"bugs":{"url":"https://github.com/karma-runner/karma-html2js-preprocessor/issues"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/karma-runner/karma-html2js-preprocessor#readme"}