Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
gulp-angular-htmlify
Advanced tools
Readme
Change your ng-attributes to data-ng-attributes for html5 validation
Ever tried to run an Angular html page into w3c validator? Yeah it's a mess.
The solution everyone recommends is to add data
to all your ng
directives.
Now with gulp
this can be easily made part of your build flow, similar to how
ng-min is to creating minfiable Angular syntax.
Turn this:
<html ng-app="myApp">
...
<body ng-controller="MainCtrl">
</body>
</html>
Into this:
<html data-ng-app="myApp">
...
<body data-ng-controller="MainCtrl">
</body>
</html>
Install with npm
npm install --save-dev gulp-angular-htmlify
var gulp = require('gulp');
var htmlify = require('gulp-angular-htmlify');
gulp.task('htmlify', function() {
gulp.src('public/**/*.html')
.pipe(htmlify())
.pipe(gulp.dest('build/'));
});
params is an object that contains the following settings:
Type: Boolean
Whether to log files that had ng-directives detected and replaced. (Useful for debugging).
Defaults to false.
Example usage:
//...
.pipe(htmlify({
verbose:true
}))
// --> [gulp] Found and replaced ng-directives in index.html
//...
MIT ©2014 Gilad Peleg
FAQs
Change your ng-attributes to data-ng-attributes for HTML5 validation
We found that gulp-angular-htmlify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).