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.1.0 to 1.1.1

2

lib/index.js

@@ -43,3 +43,3 @@ var fs = require('fs'),

content = fs.readFileSync(file, 'utf-8');
src = ngHtml2Js(fileName, content, opts.module, 'ngModule') + '\nmodule.exports = ngModule;';
src = 'var angular = require(\'angular\');\n' + ngHtml2Js(fileName, content, opts.module, 'ngModule') + '\nmodule.exports = ngModule;';
} catch (error) {

@@ -46,0 +46,0 @@ this.emit('error', error);

{
"name": "browserify-ng-html2js",
"version": "1.1.0",
"version": "1.1.1",
"description": "Browserify transform to compile angular templates into angular modules",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -5,2 +5,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./template.html":2}],2:[function(require,module,exports){
var angular = require('angular');
var ngModule = angular.module('/fixtures/template.html', []);

@@ -15,2 +16,2 @@ ngModule.run(['$templateCache', function($templateCache) {

module.exports = ngModule;
},{}]},{},[1]);
},{"angular":"angular"}]},{},[1]);

@@ -5,2 +5,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./template.html":2}],2:[function(require,module,exports){
var angular = require('angular');
var ngModule = angular.module('/app.templates/template.html', []);

@@ -15,2 +16,2 @@ ngModule.run(['$templateCache', function($templateCache) {

module.exports = ngModule;
},{}]},{},[1]);
},{"angular":"angular"}]},{},[1]);

@@ -5,2 +5,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./template.html":2}],2:[function(require,module,exports){
var angular = require('angular');
var ngModule = angular.module('template.html', []);

@@ -15,2 +16,2 @@ ngModule.run(['$templateCache', function($templateCache) {

module.exports = ngModule;
},{}]},{},[1]);
},{"angular":"angular"}]},{},[1]);

@@ -5,2 +5,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./template.html":2}],2:[function(require,module,exports){
var angular = require('angular');
var ngModule;

@@ -21,2 +22,2 @@ try {

module.exports = ngModule;
},{}]},{},[1]);
},{"angular":"angular"}]},{},[1]);

@@ -16,2 +16,3 @@ var browserify = require('browserify'),

browserify(__dirname + '/fixtures/app.js')
.external('angular')
.transform(ngHtml2Js({

@@ -32,2 +33,3 @@ baseDir: '/test'

browserify(__dirname + '/fixtures/app.js')
.external('angular')
.transform(ngHtml2Js({

@@ -49,2 +51,3 @@ baseDir: '/test'

browserify(__dirname + '/fixtures/app.js')
.external('angular')
.transform(ngHtml2Js({

@@ -65,3 +68,3 @@ module: 'templates'

var output = fs.readFileSync(__dirname + '/fixtures/output.js', 'utf-8');
exec('browserify -t [./lib/index.js --module templates] ./test/fixtures/app.js', function (error, stdout, stderr) {
exec('browserify -t [./lib/index.js --module templates] --external angular ./test/fixtures/app.js', function (error, stdout, stderr) {
expect(output).to.equal(stdout);

@@ -75,2 +78,3 @@ done();

browserify(__dirname + '/fixtures/app.js')
.external('angular')
.transform(ngHtml2Js())

@@ -90,2 +94,3 @@ .bundle(function(err, bundle) {

browserify(__dirname + '/fixtures/app.js')
.external('angular')
.transform(ngHtml2Js({

@@ -92,0 +97,0 @@ prefix: '/app.templates/'

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