pulsar/build/tasks/output-long-paths-task.coffee

19 lines
663 B
CoffeeScript
Raw Normal View History

path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'output-long-paths', 'Log long paths in the built application', ->
shellAppDir = grunt.config.get('atom.shellAppDir')
longPaths = []
grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) ->
2014-07-08 03:03:03 +04:00
if relativePath
2014-07-08 03:05:01 +04:00
fullPath = path.join(relativePath, fileName)
2014-07-08 03:03:03 +04:00
else
fullPath = fileName
2015-01-28 23:09:43 +03:00
longPaths.push(fullPath) if fullPath.length >= 175
longPaths.sort (longPath1, longPath2) -> longPath2.length - longPath1.length
longPaths.forEach (longPath) ->
grunt.log.error "#{longPath.length} character path: #{longPath}"