grunt-angular-templates
Advanced tools
Comparing version 0.5.4 to 0.5.5
{ | ||
"name": "grunt-angular-templates", | ||
"description": "Grunt build task to concatenate & register your AngularJS templates in the $templateCache", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"homepage": "https://github.com/ericclemmons/grunt-angular-templates", | ||
@@ -6,0 +6,0 @@ "author": { |
# grunt-angular-templates | ||
[![Build Status](https://travis-ci.org/ericclemmons/grunt-angular-templates.png)](https://travis-ci.org/ericclemmons/grunt-angular-templates) | ||
[![Dependencies](https://david-dm.org/ericclemmons/grunt-angular-templates.png)](https://david-dm.org/ericclemmons/grunt-angular-templates) | ||
[![devDependencies](https://david-dm.org/ericclemmons/grunt-angular-templates/dev-status.png)](https://david-dm.org/ericclemmons/grunt-angular-templates#info=devDependencies&view=table) | ||
[![Build Status](https://travis-ci.org/ericclemmons/grunt-angular-templates.svg)](https://travis-ci.org/ericclemmons/grunt-angular-templates) | ||
[![Dependencies](https://david-dm.org/ericclemmons/grunt-angular-templates.svg)](https://david-dm.org/ericclemmons/grunt-angular-templates) | ||
[![devDependencies](https://david-dm.org/ericclemmons/grunt-angular-templates/dev-status.svg)](https://david-dm.org/ericclemmons/grunt-angular-templates#info=devDependencies&view=table) | ||
@@ -51,3 +51,3 @@ > Speed up your AngularJS app by automatically minifying, combining, | ||
```js | ||
grunt.loadTasks('grunt-angular-templates'); | ||
grunt.loadNpmTasks('grunt-angular-templates'); | ||
``` | ||
@@ -149,2 +149,9 @@ | ||
### append | ||
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. | ||
This is just a useful alternative to creating a temporary `dest` file and concatting it to your application. | ||
### standalone | ||
@@ -356,2 +363,3 @@ | ||
- v0.5.5 – Add `append` option to concat, not overwrite the `dest`. ([#89](https://github.com/ericclemmons/grunt-angular-templates/pull/89)) | ||
- v0.5.4 – Specifying an invalid `usemin` option still creates file ([#84](https://github.com/ericclemmons/grunt-angular-templates/pull/84)) | ||
@@ -358,0 +366,0 @@ - v0.5.3 – Fix bug with Underscore templates ([#79](https://github.com/ericclemmons/grunt-angular-templates/pull/79)) |
@@ -13,2 +13,3 @@ /* | ||
var Appender = require('./lib/appender'); | ||
var fs = require('fs'); | ||
@@ -33,2 +34,3 @@ module.exports = function(grunt) { | ||
usemin: null, | ||
append: false | ||
}); | ||
@@ -52,4 +54,11 @@ | ||
grunt.file.write(file.dest, compiled.join('\n')); | ||
grunt.log.writeln('File ' + file.dest.cyan + ' created.'); | ||
if (options.append){ | ||
fs.appendFileSync(file.dest, compiled.join('\n')); | ||
grunt.log.writeln('File ' + file.dest.cyan + ' updated.'); | ||
} | ||
else{ | ||
grunt.file.write(file.dest, compiled.join('\n')); | ||
grunt.log.writeln('File ' + file.dest.cyan + ' created.'); | ||
} | ||
@@ -56,0 +65,0 @@ if (options.usemin) { |
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
52311
1049
415
2