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

grunt-angular-templates

Package Overview
Dependencies
Maintainers
4
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-angular-templates - npm Package Compare versions

Comparing version 0.5.7 to 0.5.8

test/expected/relative_url_expand_three_two.js

9

Gruntfile.js

@@ -219,2 +219,11 @@ /*

// URLs should match path, sans the `cwd`
relative_url_expand: {
expand: true,
cwd: 'test/fixtures',
src: ['three/**/*.html'],
dest: 'tmp',
ext: '.js'
},
// Customize URLs to not have an extension

@@ -221,0 +230,0 @@ custom_url: {

2

package.json
{
"name": "grunt-angular-templates",
"description": "Grunt build task to concatenate & register your AngularJS templates in the $templateCache",
"version": "0.5.7",
"version": "0.5.8",
"homepage": "https://github.com/ericclemmons/grunt-angular-templates",

@@ -6,0 +6,0 @@ "author": {

@@ -150,3 +150,4 @@ # grunt-angular-templates

Normally grunt-angular-templates creates a new file at `dest`.
> Boolean to indicate the templates should be appended to dest instead of replacing it.
Normally grunt-angular-templates creates a new file at `dest`.
This option makes it append the compiled templates to the `dest` file rather than replace its contents.

@@ -215,3 +216,3 @@ This is just a useful alternative to creating a temporary `dest` file and concatting it to your application.

app: {
src: [ '**.js', '<%= ngtemplates.app.dest %>' ]
src: [ '**.js', '<%= ngtemplates.app.dest %>' ],
dest: [ 'app.js' ]

@@ -351,3 +352,3 @@ }

bootstrap: function(module, script) {
return 'define(module, [], function() { return { init: ' + script + ' }; });';
return 'define(' + module + ', [], function() { return { init: ' + script + ' }; });';
}

@@ -364,2 +365,3 @@ }

- v0.5.8 - Fixes `cwd` being part of the $templateCache string when `expand:true` ([#134](https://github.com/ericclemmons/grunt-angular-templates/pull/134)), Added verbose logging for minify ([#136](https://github.com/ericclemmons/grunt-angular-templates/pull/136))
- v0.5.7 – Improve error messages ([#100](https://github.com/ericclemmons/grunt-angular-templates/pull/100))

@@ -366,0 +368,0 @@ - v0.5.6 – Updated `html-minifier` to correct whitespace issues. ([96](https://github.com/ericclemmons/grunt-angular-templates/pull/96))

@@ -43,3 +43,6 @@ /*

var compiler = new Compiler(grunt, options, file.cwd);
var expanded = file.orig.expand;
var cwd = file.orig.expand ? file.orig.cwd : file.cwd;
var compiler = new Compiler(grunt, options, cwd, expanded);
var appender = new Appender(grunt);

@@ -46,0 +49,0 @@ var modules = compiler.modules(file.src);

@@ -21,3 +21,3 @@ /*

*/
var Compiler = function(grunt, options, cwd) {
var Compiler = function(grunt, options, cwd, expanded) {

@@ -48,2 +48,6 @@ /**

if(cwd && expanded){
url = url.replace(cwd, '').replace(/^\//,'');
}
// Append formatted URL

@@ -121,2 +125,3 @@ path += Url.format( Url.parse( url.replace(/\\/g, '/') ) );

try {
grunt.verbose.writeln('Minifying file: ' +source);
source = minify(source, options.htmlmin);

@@ -171,3 +176,3 @@ } catch (err) {

this.path = function(file) {
if (cwd) {
if (cwd && !expanded) {
return cwd + '/' + file;

@@ -174,0 +179,0 @@ }

@@ -168,2 +168,18 @@ 'use strict';

relative_url_expand: function(test) {
test.expect(2);
var actual = grunt.file.read('tmp/three/three.js');
var expected = grunt.file.read('test/expected/relative_url_expand_three.js');
test.equal(expected, actual);
actual = grunt.file.read('tmp/three/three_two.js');
expected = grunt.file.read('test/expected/relative_url_expand_three_two.js');
test.equal(expected, actual);
test.done();
},
custom_url: function(test) {

@@ -170,0 +186,0 @@ test.expect(1);

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