https://github.com/pgilad/gulp-angular-htmlify
Change your HTML ng-attributes to data-ng-attributes for HTML5 validation
https://github.com/pgilad/gulp-angular-htmlify
Last synced: 10 months ago
JSON representation
Change your HTML ng-attributes to data-ng-attributes for HTML5 validation
- Host: GitHub
- URL: https://github.com/pgilad/gulp-angular-htmlify
- Owner: pgilad
- License: mit
- Created: 2014-04-04T23:02:08.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-22T17:28:16.000Z (about 11 years ago)
- Last Synced: 2025-05-06T21:07:12.831Z (about 1 year ago)
- Language: JavaScript
- Size: 333 KB
- Stars: 33
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# [gulp](https://github.com/wearefractal/gulp)-angular-htmlify
> Change your ng-attributes to data-ng-attributes for HTML5 validation using [angular-html5](https://github.com/pgilad/angular-html5)
[](https://npmjs.org/package/gulp-angular-htmlify)
[](https://npmjs.org/package/gulp-angular-htmlify)
[](https://travis-ci.org/pgilad/gulp-angular-htmlify)
*Issues with the output should be reported on the angular-html5 [issue tracker](https://github.com/pgilad/angular-html5/issues).*
## Install
Install with [npm](https://npmjs.org/package/gulp-angular-htmlify)
```sh
npm install --save-dev gulp-angular-htmlify
```
## Usage
```js
var gulp = require('gulp');
var htmlify = require('gulp-angular-htmlify');
//simple usage
gulp.task('htmlify', function() {
gulp.src('public/**/*.html')
.pipe(htmlify())
.pipe(gulp.dest('build/'));
});
//using jade as a pre-processer
gulp.task('htmlify', function() {
gulp.src('partials/**/*.jade')
.pipe(jade())
.pipe(htmlify())
.pipe(gulp.dest('build/'));
});
//Also transforming ui-attributes to data-ui-attributes
gulp.task('htmlify', function() {
gulp.src('public/**/*.html')
.pipe(htmlify({
customPrefixes: ['ui-']
}))
.pipe(gulp.dest('build/'));
});
```
## Options
See the `angular-html5` [options](https://github.com/pgilad/angular-html5#api)
### Additional Options
#### verbose
Type: `Boolean`
Default: `false`
Whether to log files that had ng-directives detected and replaced. (Useful for debugging).
Example usage:
```js
//...
.pipe(htmlify({
verbose: true
}))
// --> [gulp] Found and replaced ng-directives in index.html
//...
```
## License
MIT @[Gilad Peleg](http://giladpeleg.com)