Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserify-ng-html2js

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-ng-html2js - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

CHANGELOG.md
# 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 @@

2

lib/index.js

@@ -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');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc