diff --git a/Gruntfile.js b/Gruntfile.js index 097f9689c..d0c634215 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -238,6 +238,7 @@ module.exports = function(grunt) { grunt.registerTask('default', ['shell:dev', 'nggettext_compile', 'concat', 'cssmin']); grunt.registerTask('dist', ['shell:prod', 'nggettext_compile', 'concat', 'cssmin', 'uglify', 'copy:dist']); + grunt.registerTask('dist-dbg', ['shell:dev', 'nggettext_compile', 'concat', 'cssmin', 'copy:dist']); grunt.registerTask('prod', ['shell:prod', 'nggettext_compile', 'concat', 'cssmin', 'uglify']); grunt.registerTask('translate', ['nggettext_extract']); grunt.registerTask('docs', ['jsdoc']); diff --git a/cordova/build.sh b/cordova/build.sh index a638ea1e4..ba05ebf7b 100755 --- a/cordova/build.sh +++ b/cordova/build.sh @@ -24,18 +24,24 @@ VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js` SKIPIOS=false CLEAR=false +DBGJS=false # Check Args -if [[ $1 = "--android" || $2 = "--android" ]] +if [[ $1 = "--android" || $2 = "--android" || $3 = "--android" ]] then SKIPIOS=true fi -if [[ $1 = "--clear" || $2 = "--clear" ]] +if [[ $1 = "--clear" || $2 = "--clear" || $3 = "--clear" ]] then CLEAR=true fi +if [[ $1 = "--dbgjs" || $2 = "--dbgjs" || $3 = "--dbgjs" ]] +then + DBGJS=true +fi + echo "${OpenColor}${Green}* Checking dependencies...${CloseColor}" command -v cordova >/dev/null 2>&1 || { echo >&2 "Cordova is not present, please install it: sudo npm -g cordova."; exit 1; } @@ -88,10 +94,18 @@ if [ ! -d $PROJECT ]; then fi -echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}" -cd $BUILDDIR/.. -grunt dist -checkOK +if $DBGJS +then + echo "${OpenColor}${Green}* Generating copay bundle (debug js)...${CloseColor}" + cd $BUILDDIR/.. + grunt dist-dbg + checkOK +else + echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}" + cd $BUILDDIR/.. + grunt dist + checkOK +fi echo "${OpenColor}${Green}* Coping files...${CloseColor}" cd $BUILDDIR/..