From a8c5f027ff1a383b6f57b566126103e333cef4aa Mon Sep 17 00:00:00 2001 From: Ishan Narula Date: Tue, 30 Apr 2019 15:16:22 -0700 Subject: [PATCH] Created a feature to allow users to get rid of the default tables and data included with the app designer. To run, users need to invoke "grunt wipe-data" --- Gruntfile.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 7802093aa..cb34846c7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -281,6 +281,34 @@ module.exports = function (grunt) { 'wipe the device', ["adbpull-props", "remove-folders", "adbpush-props", "setup"]); + grunt.registerTask( + 'wipe-data', + 'Get rid of the default tables and data included with app-designer', + function() { + // wiping entire data/tables folder + console.log('Wiping folder \"app/data/tables\"') + grunt.file.delete('app/data/tables'); + grunt.file.mkdir('app/data/tables') + + // wiping entire config/tables folder + console.log('Wiping folder \"app/config/tables\"') + grunt.file.delete('app/config/tables'); + grunt.file.mkdir('app/config/tables'); + + // wiping certain files in config/assets + console.log('Wiping files in \"app/config/assets\"') + grunt.file.delete('app/config/assets/css'); + grunt.file.delete('app/config/assets/csv'); + grunt.file.delete('app/config/assets/img'); + grunt.file.delete('app/config/assets/js'); + grunt.file.delete('app/config/assets/libs'); + grunt.file.delete('app/config/assets/tables.georowlevelaccessdemo.init'); + grunt.file.delete('app/config/assets/tables.init'); + grunt.file.delete('app/config/assets/tables.largeDataSet500.init'); + grunt.file.delete('app/config/assets/tables.largeDataSet3000.init'); + grunt.file.delete('app/config/assets/tables.rowlevelaccessdemo.init'); + grunt.file.delete('app/config/assets/tables.simpledemo.init'); + }); grunt.registerTask( 'adbpull-debug',