mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Replace report-licenses with generate-license task. Output plain text.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
module.exports = (grunt) ->
|
||||
grunt.registerTask 'report-licenses', 'Report the licenses of all dependencies', ->
|
||||
grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', ->
|
||||
legalEagle = require 'legal-eagle'
|
||||
done = @async()
|
||||
|
||||
@@ -21,12 +21,13 @@ getSummaryText = (summary) ->
|
||||
names = keys(summary).sort()
|
||||
for name in names
|
||||
{license, source, sourceText} = summary[name]
|
||||
text += "## #{name}\n\n"
|
||||
text += "* License: #{license}\n"
|
||||
text += "* License Source: #{source}\n" if source?
|
||||
|
||||
text += "-------------------------------------------------------------------------\n\n"
|
||||
text += "Package: #{name}\n"
|
||||
text += "License: #{license}\n"
|
||||
text += "License Source: #{source}\n" if source?
|
||||
if sourceText?
|
||||
text += "* Source Text:\n"
|
||||
for line in sourceText.split('\n')
|
||||
text += "> #{line}\n"
|
||||
text += "Source Text:\n\n"
|
||||
text += sourceText
|
||||
text += '\n'
|
||||
text
|
||||
Reference in New Issue
Block a user