browserify-ng-html2js
Advanced tools
Comparing version 0.3.1 to 0.3.2
# Changelog | ||
## Version 0.3.0 | ||
## 0.3.2 | ||
* The angular modules exported as a commonJS module | ||
* Support for Windows | ||
## 0.3.1 | ||
* Simpler `module.exports` logic | ||
## 0.3.0 | ||
* The angular module is exported as a commonJS module | ||
* CLI Support | ||
## Version 0.2.0 | ||
## 0.2.0 | ||
* Extension can be specified | ||
## Version 0.1.0 | ||
## 0.1.0 | ||
* Transforms html templates into angular template modules |
var fs = require('fs'), | ||
path = require('path'), | ||
through = require('through'), | ||
@@ -23,2 +24,4 @@ ngHtml2Js = require('ng-html2js'); | ||
var fileMatching = new RegExp("^.*\\" + path.sep + "(.*)$"); | ||
return function (file) { | ||
@@ -34,3 +37,3 @@ if (!isExtension(file, opts.extension)) return through(); | ||
try { | ||
fileName = file.match(/^.*\/(.*)$/)[1]; | ||
fileName = file.match(fileMatching)[1]; | ||
content = fs.readFileSync(file, 'utf-8'); | ||
@@ -37,0 +40,0 @@ src = ngHtml2Js(fileName, content, opts.module, 'ngModule') + '\nmodule.exports = ngModule;'; |
{ | ||
"name": "browserify-ng-html2js", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Browserify transform to compile angular templates into angular modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9663
114