Loading grunt/config/cleanBuiltApp.js +2 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ module.exports = function(grunt) { 'leaflet/dist/images/*.png' ], cleanSrcFileExceptions: [ 'App.js', '*View.js', '_Edition.js', '*Form.html', '404.js', 'ActivateAccount.js', 'NoSupportBrowser.js' 'App.js', '*[A-Za-z0-9]View.js', '_Edition.js', '*Form.html', '404.js', 'ActivateAccount.js', 'NoSupportBrowser.js' ] }); }; grunt/task/cleanBuiltApp.js +26 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ module.exports = function(grunt) { }; // TODO desaparecerá cuando todo vaya por src/ var getCleanAppFilesCmds = function() { var oldGetCleanAppFilesCmds = function() { var fileExtension = '.js', strippedSuffix = 'consoleStripped' + fileExtension, Loading @@ -91,6 +91,21 @@ module.exports = function(grunt) { return cleanAppFilesCmd; }; // TODO desaparecerá cuando todo vaya por src/ var getCleanAppFilesCmds = function(fileExceptions) { var appDir = path.join(destPath, 'app', '/'), cleanAppFilesCmd = 'find ' + appDir + ' -type f'; for (var i = 0; i < fileExceptions.length; i++) { cleanAppFilesCmd += ' \! -name "' + fileExceptions[i] + '"'; } cleanAppFilesCmd += ' -delete'; return cleanAppFilesCmd; }; var getCleanSrcFilesCmds = function(fileExceptions) { var srcDir = path.join(destPath, 'src', '/'), Loading @@ -105,6 +120,13 @@ module.exports = function(grunt) { return cleanSrcFilesCmd; }; getCleanEmptyDirectoriesCmds = function() { var cleanEmptyDirsCmd = 'find ' + destPath + ' -type d -empty -delete'; return cleanEmptyDirsCmd; }; grunt.config('shell.cleanBuiltApp', { options: { stdout: true Loading @@ -119,8 +141,9 @@ module.exports = function(grunt) { getCleanDirectoriesCmd(cleanBuiltAppConfig.directoriesToClean), getCleanRecursiveDirectoriesCmd(cleanBuiltAppConfig.recursiveDirectoriesToClean), keepAndRestoreCmds.restoreFilesCmds, getCleanAppFilesCmds(), getCleanSrcFilesCmds(cleanBuiltAppConfig.cleanSrcFileExceptions) getCleanAppFilesCmds(cleanBuiltAppConfig.cleanSrcFileExceptions), getCleanSrcFilesCmds(cleanBuiltAppConfig.cleanSrcFileExceptions), getCleanEmptyDirectoriesCmds() ].join('; '); } }); Loading Loading
grunt/config/cleanBuiltApp.js +2 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ module.exports = function(grunt) { 'leaflet/dist/images/*.png' ], cleanSrcFileExceptions: [ 'App.js', '*View.js', '_Edition.js', '*Form.html', '404.js', 'ActivateAccount.js', 'NoSupportBrowser.js' 'App.js', '*[A-Za-z0-9]View.js', '_Edition.js', '*Form.html', '404.js', 'ActivateAccount.js', 'NoSupportBrowser.js' ] }); };
grunt/task/cleanBuiltApp.js +26 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ module.exports = function(grunt) { }; // TODO desaparecerá cuando todo vaya por src/ var getCleanAppFilesCmds = function() { var oldGetCleanAppFilesCmds = function() { var fileExtension = '.js', strippedSuffix = 'consoleStripped' + fileExtension, Loading @@ -91,6 +91,21 @@ module.exports = function(grunt) { return cleanAppFilesCmd; }; // TODO desaparecerá cuando todo vaya por src/ var getCleanAppFilesCmds = function(fileExceptions) { var appDir = path.join(destPath, 'app', '/'), cleanAppFilesCmd = 'find ' + appDir + ' -type f'; for (var i = 0; i < fileExceptions.length; i++) { cleanAppFilesCmd += ' \! -name "' + fileExceptions[i] + '"'; } cleanAppFilesCmd += ' -delete'; return cleanAppFilesCmd; }; var getCleanSrcFilesCmds = function(fileExceptions) { var srcDir = path.join(destPath, 'src', '/'), Loading @@ -105,6 +120,13 @@ module.exports = function(grunt) { return cleanSrcFilesCmd; }; getCleanEmptyDirectoriesCmds = function() { var cleanEmptyDirsCmd = 'find ' + destPath + ' -type d -empty -delete'; return cleanEmptyDirsCmd; }; grunt.config('shell.cleanBuiltApp', { options: { stdout: true Loading @@ -119,8 +141,9 @@ module.exports = function(grunt) { getCleanDirectoriesCmd(cleanBuiltAppConfig.directoriesToClean), getCleanRecursiveDirectoriesCmd(cleanBuiltAppConfig.recursiveDirectoriesToClean), keepAndRestoreCmds.restoreFilesCmds, getCleanAppFilesCmds(), getCleanSrcFilesCmds(cleanBuiltAppConfig.cleanSrcFileExceptions) getCleanAppFilesCmds(cleanBuiltAppConfig.cleanSrcFileExceptions), getCleanSrcFilesCmds(cleanBuiltAppConfig.cleanSrcFileExceptions), getCleanEmptyDirectoriesCmds() ].join('; '); } }); Loading