browserify-ng-html2js
Advanced tools
Comparing version 1.0.0 to 1.0.1
# Changelog | ||
# 1.0.1 | ||
* Template path is printed correctly on windows when using baseDir option | ||
## 1.0.0 | ||
* Stable | ||
## 0.3.3 | ||
@@ -4,0 +12,0 @@ |
@@ -39,3 +39,3 @@ var fs = require('fs'), | ||
try { | ||
fileName = opts.baseDir ? file.replace(path.join(appDir, opts.baseDir), '') : file.match(fileMatching)[1]; | ||
fileName = opts.baseDir ? file.replace(path.join(appDir, opts.baseDir), '').replace(/\\/g, '/') : file.match(fileMatching)[1]; | ||
content = fs.readFileSync(file, 'utf-8'); | ||
@@ -42,0 +42,0 @@ src = ngHtml2Js(fileName, content, opts.module, 'ngModule') + '\nmodule.exports = ngModule;'; |
{ | ||
"name": "browserify-ng-html2js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Browserify transform to compile angular templates into angular modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -29,2 +29,17 @@ var browserify = require('browserify'), | ||
it('should put path in unix-like format even for windows-users', function(done) { | ||
browserify(__dirname + '/fixtures/app.js') | ||
.transform(ngHtml2Js({ | ||
baseDir: '/test' | ||
})) | ||
.bundle(function(err, bundle) { | ||
if (err) { | ||
done(err) | ||
} else { | ||
expect(/\/fixtures\/template\.html/.test(bundle.toString())).to.be.true(); | ||
done(); | ||
}; | ||
}); | ||
}); | ||
it('should compile html to a browserify wrapped angular module', function(done) { | ||
@@ -31,0 +46,0 @@ var output = fs.readFileSync(__dirname + '/fixtures/output.js', 'utf-8'); |
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
12059
160