Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
feat(task): allow grund variables in options.scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAngel authored and m7r committed Jun 29, 2015
1 parent 7037751 commit 4c17f08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/grunt-ngdocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ module.exports = function(grunt) {
var gruntScriptsFolder = 'grunt-scripts';
var gruntStylesFolder = 'grunt-styles';

// If the options.script is an array of arrays ( useful when working with variables, for example: ['<%= vendor_files %>','<%= app_files %>'] )
// convert to a single array with _.flatten ( http://underscorejs.org/#flatten )
options.scripts = _.flatten(options.scripts);
options.scripts = _.map(options.scripts, function(file) {
if (file === 'angular.js') {
return 'js/angular.min.js';
Expand Down

0 comments on commit 4c17f08

Please sign in to comment.