gulp-ng-html2js
Advanced tools
Comparing version
var _ = require("lodash"); | ||
var gutil = require("gulp-util"); | ||
var replaceExtension = require('replace-ext'); | ||
var map = require("map-stream"); | ||
@@ -55,3 +55,3 @@ | ||
} | ||
file.path = gutil.replaceExtension(file.path, extension); | ||
file.path = replaceExtension(file.path, extension); | ||
} | ||
@@ -58,0 +58,0 @@ |
{ | ||
"name": "gulp-ng-html2js", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A Gulp plugin which generates AngularJS modules, which pre-load your HTML code into the $templateCache. This way AngularJS doesn't need to request the actual HTML files anymore.", | ||
@@ -28,10 +28,11 @@ "keywords": [ | ||
"dependencies": { | ||
"gulp-util": "*", | ||
"lodash": "^3.3.0", | ||
"map-stream": "*" | ||
"lodash": "^4.17.11", | ||
"map-stream": "*", | ||
"replace-ext": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"event-stream": "~3.0.20", | ||
"mocha": "~1.14.0", | ||
"should": "~2.1.0", | ||
"event-stream": "~3.0.20" | ||
"vinyl": "^2.1.0" | ||
}, | ||
@@ -38,0 +39,0 @@ "engines": { |
@@ -0,0 +0,0 @@ angular.module('fixtures/example.html', []).run(['$templateCache', function($templateCache) { |
@@ -0,0 +0,0 @@ (function(module) { |
@@ -0,0 +0,0 @@ (function(module) { |
@@ -0,0 +0,0 @@ angular.module('myAwesomePartials').run(['$templateCache', function($templateCache) { |
@@ -0,0 +0,0 @@ angular.module('/partials/fixtures/example.html', []).run(['$templateCache', function($templateCache) { |
@@ -0,0 +0,0 @@ angular.module('rename.html', []).run(['$templateCache', function($templateCache) { |
@@ -0,0 +0,0 @@ angular.module('example.html', []).run(['$templateCache', function($templateCache) { |
@@ -9,3 +9,3 @@ /*global describe, it*/ | ||
var should = require("should"); | ||
var gutil = require("gulp-util"); | ||
var Vinyl = require("vinyl"); | ||
var ngHtml2Js = require("../"); | ||
@@ -16,3 +16,3 @@ | ||
it("should generate the angular module", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/example.js", | ||
@@ -29,3 +29,3 @@ cwd: "test/", | ||
it("commonjs", function(done){ | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithExportCommon.js", | ||
@@ -45,3 +45,3 @@ cwd: "test/", | ||
it("should use common, options.moduleName && options.declareModule when provided", function(done){ | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithExportCommonModuleNameNoGenerate.js", | ||
@@ -63,3 +63,3 @@ cwd: "test/", | ||
it("system", function(done){ | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithExportSystem.js", | ||
@@ -79,3 +79,3 @@ cwd: "test/", | ||
it("should use system, options.moduleName && options.declareModule when provided", function(done){ | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithExportSystemModuleNameNoGenerate.js", | ||
@@ -98,3 +98,3 @@ cwd: "test/", | ||
it("should use options.moduleName when provided", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithModuleName.js", | ||
@@ -114,3 +114,3 @@ cwd: "test/", | ||
it("should use options.moduleName (function) when provided", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithModuleName.js", | ||
@@ -133,3 +133,3 @@ cwd: "test/", | ||
it("should use options.moduleName && options.declareModule when provided", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithModuleNameNoGenerate.js", | ||
@@ -150,3 +150,3 @@ cwd: "test/", | ||
it("should add options.prefix to the url in the generated file", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithPrefix.js", | ||
@@ -166,3 +166,3 @@ cwd: "test/", | ||
it("should subtract options.stripPrefix from the url in the generated file", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithStripPrefix.js", | ||
@@ -182,3 +182,3 @@ cwd: "test/", | ||
it("should allow a custom function to rename the generated file", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithRename.js", | ||
@@ -200,3 +200,3 @@ cwd: "test/", | ||
it("should allow using a custom template", function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/expected/exampleWithCustomTemplate.js", | ||
@@ -217,3 +217,3 @@ cwd: "test/", | ||
function testBufferedFile(params, expectedFile, done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: "test/fixtures/example.html", | ||
@@ -243,3 +243,3 @@ cwd: "test/", | ||
it("should pass on files which are null", function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: "test/fixtures/example.html", | ||
@@ -263,3 +263,3 @@ cwd: "test/", | ||
it("should error on stream", function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: "test/fixtures/example.html", | ||
@@ -266,0 +266,0 @@ cwd: "test/", |
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
37260
0.47%1
-50%4
33.33%22
-4.35%2
100%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated