UNPKG

1.47 kBMarkdownView Raw
1# gulp-ng-html2js [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]
2
3> ng-html2js plugin for [gulp](https://github.com/wearefractal/gulp)
4
5## Usage
6
7First, install `gulp-ng-html2js` as a development dependency:
8
9```shell
10npm install --save-dev gulp-ng-html2js
11```
12
13Then, add it to your `gulpfile.js`:
14
15```javascript
16var ngHtml2Js = require("gulp-ng-html2js");
17
18gulp.src("./partials/*.html")
19 .pipe(ngHtml2Js({
20 moduleName: "MyAwesomePartials",
21 prefix: "/partials"
22 }))
23 .pipe(gulp.dest("./dist/partials"));
24```
25
26## API
27
28### ngHtml2Js(options)
29
30#### options.moduleName
31Type: `String`
32
33The name of the generated AngularJS module. Uses the file url if omitted.
34
35#### options.prefix
36Type: `String`
37
38The prefix which should be prepended to the file path to generate the file url.
39
40#### options.stripPrefix
41Type: `String`
42
43The prefix which should be subtracted from the file path to generate the file url.
44
45
46## License
47
48[MIT License](http://en.wikipedia.org/wiki/MIT_License)
49
50[npm-url]: https://npmjs.org/package/gulp-ng-html2js
51[npm-image]: https://badge.fury.io/js/gulp-ng-html2js.png
52
53[travis-url]: http://travis-ci.org/marklagendijk/gulp-ng-html2js
54[travis-image]: https://secure.travis-ci.org/marklagendijk/gulp-ng-html2js.png?branch=master
55
56[depstat-url]: https://david-dm.org/marklagendijk/gulp-ng-html2js
57[depstat-image]: https://david-dm.org/marklagendijk/gulp-ng-html2js.png