grunt-collect-dependencies
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "grunt-collect-dependencies", | ||
"description": "Collect AngularJS app dependencies into a JSON file", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"homepage": "https://github.com/ukupat/grunt-collect-dependencies", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -18,2 +18,3 @@ /* | ||
}); | ||
formatOptionPaths(); | ||
collectModuleDependenciesFor(options.appPath); | ||
@@ -32,2 +33,7 @@ | ||
function formatOptionPaths() { | ||
options.src = path.join(options.src); | ||
options.dist = path.join(options.dist); | ||
} | ||
function collectModuleDependenciesFor(app) { | ||
@@ -119,7 +125,7 @@ var appContent = grunt.file.read(getAppFullPath(app)); | ||
for (var i = 0; i < modules.length; i++) { | ||
dependencies.js.push(getPath(modules[i]) + '**/Module.js'); | ||
dependencies.html.push(getPath(modules[i]) + '**/*.html'); | ||
dependencies.js.push(path.join(getPath(modules[i]) + '**/Module.js').replace(/\\/g, '/')); | ||
dependencies.html.push(path.join(getPath(modules[i]) + '**/*.html').replace(/\\/g, '/')); | ||
} | ||
for (i = 0; i < modules.length; i++) { | ||
dependencies.js.push(getPath(modules[i]) + '**/*.js'); | ||
dependencies.js.push(path.join(getPath(modules[i]) + '**/*.js').replace(/\\/g, '/')); | ||
} | ||
@@ -142,3 +148,3 @@ dependencies = addAppFilesTo(dependencies); | ||
if (modulePath === null) { | ||
return findup(path.join(options.basePath, options.src) + '/*/' + path.join(module, 'Module.js'), {nocase: true}); | ||
return findup(path.join(options.basePath, options.src, '/*/', module, 'Module.js'), {nocase: true}); | ||
} | ||
@@ -149,6 +155,6 @@ return modulePath; | ||
function addAppFilesTo(dependencies) { | ||
dependencies.js.push(path.join(options.appPath, options.appFile)); | ||
dependencies.js.push(path.join(options.appPath, '**/Module.js')); | ||
dependencies.js.push(path.join(options.appPath, '**/*.js')); | ||
dependencies.html.push(path.join(options.appPath, '**/*.html')); | ||
dependencies.js.push(path.join(options.appPath, options.appFile).replace(/\\/g, '/')); | ||
dependencies.js.push(path.join(options.appPath, '**/Module.js').replace(/\\/g, '/')); | ||
dependencies.js.push(path.join(options.appPath, '**/*.js').replace(/\\/g, '/')); | ||
dependencies.html.push(path.join(options.appPath, '**/*.html').replace(/\\/g, '/')); | ||
@@ -161,2 +167,2 @@ return dependencies; | ||
} | ||
}; | ||
}; |
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
10667
205