Gathering detailed insights and metrics for gulp-ng-template-strings
Gathering detailed insights and metrics for gulp-ng-template-strings
Gathering detailed insights and metrics for gulp-ng-template-strings
Gathering detailed insights and metrics for gulp-ng-template-strings
📦 Inline angular templates into directive definition objects
npm install gulp-ng-template-strings
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
63 Commits
1 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Sep 09, 2017
Latest Version
0.0.4
Package Id
gulp-ng-template-strings@0.0.4
Size
5.27 kB
NPM Version
2.14.4
Node Version
4.1.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Inline angular templates into directive definition objects
npm i --save-dev gulp-ng-template-strings
Pass the plugin js files containing templateUrl
properties to have them
replaced with template
properties.
gulpfile.js
1var gulp = require('gulp'); 2var ngTemplateStrings = require('gulp-ng-template-strings'); 3 4gulp.task('default', function() { 5 return gulp.src('src/**/*.js') 6 .pipe(ngTemplateStrings()) 7 .pipe(gulp.dest('dist')); 8});
Input files
src/tab.js
1function tabDirective() { 2 return { 3 templateUrl: 'templates/tab.html' 4 }; 5}
templates/tab.html
1<ul> 2 <li>Tab</li> 3</ul>
Output file
dist/tab.js
1function tabDirective() { 2 return { 3 templateUrl: '<ul><li>Tab</li></ul>' 4 }; 5}
All options can be passed on stream creation.
1ngTemplateStrings(options)
cwd
By default the plugin looks for files based of the file.cwd
of each file
passed through. This option overrides that for all files passed to a stream.
1ngTemplateStrings({cwd: 'root/of/templatesUrls/'})
minify
Your html strings will be minified with html-minifier. You can override our default configuration by passing a minify object in the settings object.
1ngTemplateStrings({minify: {collapseWhitespace: false}})
By default we use the following options:
1{ 2 removeComments: true, // remove html comments 3 removeCommentsFromCDATA: true, // removes comments from inline JS & CSS 4 collapseWhitespace: true, // collapse whitespace in text nodes 5 caseSensitive: true // preserve case in attributes 6 // all other options use html-minifier's default, false. 7}
You can also disable minification altogether by passing:
1ngTemplateStrings({minify: false})
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More