forked from FerencKun/angular-datatable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
72 lines (72 loc) · 3.87 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
"name": "karma-ng-html2js-preprocessor",
"version": "0.1.0",
"description": "A Karma plugin. Compile AngularJS templates to JavaScript on the fly.",
"main": "lib/index.js",
"scripts": {
"test": "grunt test"
},
"repository": {
"type": "git",
"url": "git://github.com/karma-runner/karma-ng-html2js-preprocessor.git"
},
"keywords": [
"karma-plugin",
"karma-preprocessor",
"angularjs",
"angular",
"html2js"
],
"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": "friedel.ziegelmayer@gmail.com"
},
{
"name": "Lukasz Bandzarewicz",
"email": "lucassus@gmail.com"
},
{
"name": "Robin Roestenburg",
"email": "robin@roestenburg.io"
},
{
"name": "Lucas Galfasó",
"email": "lgalfaso@gmail.com"
},
{
"name": "Friedel Ziegelmayer",
"email": "dignifiedquire@gmail.com"
},
{
"name": "BrianLenzo",
"email": "brian.lenzo@gmail.com"
}
],
"readme": "# karma-ng-html2js-preprocessor [![Build Status](https://travis-ci.org/karma-runner/karma-ng-html2js-preprocessor.png?branch=master)](https://travis-ci.org/karma-runner/karma-ng-html2js-preprocessor)\n\n> Preprocessor for converting HTML files to [AngularJS](http://angularjs.org/) templates.\n\n*Note:* If you are looking for a general preprocessor that is not tight to Angular, check out [karma-html2js-preprocessor](https://github.com/karma-runner/karma-html2js-preprocessor).\n\n## Installation\n\nThe easiest way is to keep `karma-ng-html2js-preprocessor` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-ng-html2js-preprocessor\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-ng-html2js-preprocessor --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n preprocessors: {\n '**/*.html': ['ng-html2js']\n },\n\n files: [\n '*.js',\n '*.html'\n ],\n\n ngHtml2JsPreprocessor: {\n // strip this from the file path\n stripPrefix: 'public/',\n // prepend this to the\n prependPrefix: 'served/',\n\n // or define a custom transform function\n cacheIdFromPath: function(filepath) {\n return cacheId;\n },\n\n // setting this option will create only a single module that contains templates\n // from all the files, so you can load them all with module('foo')\n moduleName: 'foo'\n }\n });\n};\n```\n\n## How does it work ?\n\nThis preprocessor converts HTML files into JS strings and generates Angular modules. These modules, when loaded, puts these HTML files into the `$templateCache` and therefore Angular won't try to fetch them from the server.\n\nFor instance this `template.html`...\n```html\n<div>something</div>\n```\n... will be served as `template.html.js`:\n```js\nangular.module('template.html', []).config(function($templateCache) {\n $templateCache.put('template.html', '<div>something</div>');\n});\n```\n\nSee the [ng-directive-testing](https://github.com/vojtajina/ng-directive-testing) 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",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/karma-runner/karma-ng-html2js-preprocessor/issues"
},
"_id": "karma-ng-html2js-preprocessor@0.1.0",
"_from": "karma-ng-html2js-preprocessor@"
}