From a108c283cfdbad6dfae503a419b2c41e9a490105 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 7 Jul 2014 15:42:40 -0700 Subject: [PATCH] Add grunt task to log long paths in built app --- build/tasks/output-long-paths-task.coffee | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 build/tasks/output-long-paths-task.coffee diff --git a/build/tasks/output-long-paths-task.coffee b/build/tasks/output-long-paths-task.coffee new file mode 100644 index 000000000..a47660404 --- /dev/null +++ b/build/tasks/output-long-paths-task.coffee @@ -0,0 +1,15 @@ +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) -> + fullPath = path.join(relativePath, fileName) + longPaths.push(fullPath) if fullPath.length >= 200 + + longPaths.sort (longPath1, longPath2) -> longPath2.length - longPath1.length + + longPaths.forEach (longPath) -> + grunt.log.error "#{longPath.length} character path: #{longPath}"