Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #5 from azakus/dry-readmanifest
Browse files Browse the repository at this point in the history
Use shared readManifest implementation in tools
  • Loading branch information
rafaelw committed Oct 23, 2013
2 parents 1888fc6 + 534f442 commit e208882
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,7 @@

module.exports = function(grunt) {

// recursive module builder
var path = require('path');
function readManifest(filename, modules) {
modules = modules || [];
var lines = grunt.file.readJSON(filename);
var dir = path.dirname(filename);
lines.forEach(function(line) {
var fullpath = path.join(dir, line);
if (line.slice(-5) == '.json') {
// recurse
readManifest(fullpath, modules);
} else {
modules.push(fullpath);
}
});
return modules;
}

var readManifest = require('../tools/loader/readManifest.js');
grunt.initConfig({
karma: {
options: {
Expand Down

0 comments on commit e208882

Please sign in to comment.