Enhancement of mobile files generation. Created a dist folder with all compressed files

This commit is contained in:
Gustavo Maximiliano Cortez 2014-11-22 17:36:19 -03:00
commit cdca0fb014
6 changed files with 44 additions and 33 deletions

1
.gitignore vendored
View file

@ -75,6 +75,7 @@ shell/scripts/build
dist/darwin
dist/linux
dist/windows
dist/web
dist/*.dmg
dist/*.tar.gz
dist/*.exe

View file

@ -200,6 +200,30 @@ module.exports = function(grunt) {
}
},
},
copy: {
dist: {
files: [
{
src: [
'index.html',
'init.js',
'config.js',
'css/vendors.min.css',
'css/copay.min.css',
'js/copayBundle.js',
'js/copayMain.js',
'lib/vendors.js',
'lib/angularjs-all.js',
'font/**',
'img/**',
'sound/**',
'views/**'
],
dest: 'dist/web/'
}
],
},
},
jsdoc: {
dist: {
src: ['js/models/*.js', 'js/plugins/*.js'],
@ -215,6 +239,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('prod', ['shell:prod', 'nggettext_compile', 'concat', 'cssmin', 'uglify']);
grunt.registerTask('translate', ['nggettext_extract']);
grunt.registerTask('docs', ['jsdoc']);

View file

@ -8,12 +8,6 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="Send Bitcoins">
<data android:scheme="bitcoin"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:clearTaskOnLaunch="true" android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
@ -33,7 +27,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<provider android:authorities="com.bitpay.copay.plugin.emailcomposer.attachmentprovider" android:name="de.appplant.cordova.plugin.emailcomposer.AttachmentProvider" />
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.CAMERA" />

View file

@ -67,39 +67,26 @@ if [ ! -d $PROJECT ]; then
fi
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
checkOK
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
checkOK
cordova plugin add https://github.com/VersoSolutions/CordovaClipboard
checkOK
cordova plugin add de.appplant.cordova.plugin.email-composer && cordova prepare
checkOK
cordova plugin add https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git && cordova prepare
checkOK
cordova plugin add org.apache.cordova.splashscreen
checkOK
cordova plugin add org.apache.cordova.statusbar
checkOK
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=bitcoin
checkOK
fi
echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"
cd $BUILDDIR/..
grunt
grunt dist
checkOK
echo "${OpenColor}${Green}* Coping files...${CloseColor}"
cd $BUILDDIR/..
cp -af {css,font,img,js,lib,sound,views,config.js,version.js,init.js} $PROJECT/www
cp -af dist/web/** $PROJECT/www
checkOK
sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' charset='utf-8' src='cordova.js'><\/script>/g" index.html > $PROJECT/www/index.html
@ -115,11 +102,8 @@ checkOK
cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
checkOK
cp android/config.xml $PROJECT/platforms/android/res/xml/config.xml
checkOK
cp android/project.properties $PROJECT/platforms/android/project.properties
checkOK
#cp android/project.properties $PROJECT/platforms/android/project.properties
#checkOK
cp -R android/res/* $PROJECT/platforms/android/res
checkOK

View file

@ -1,5 +1,8 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.bitpay.copay" version="0.6.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" android-versionCode="16">
<widget id="com.bitpay.copay"
version="0.8.2"
android-versionCode="17"
ios-CFBundleVersion="0.8.2">
<name>Copay</name>
<description>
A secure bitcoin wallet for friends and companies.
@ -9,8 +12,12 @@
</author>
<content src="index.html" />
<access origin="*" />
<preference name="DisallowOverscroll" value="true"/>
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
<preference name="SplashScreen" value="copayscreen" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="backgroundColor" value="0x2C3E50" />
<preference name="BackgroundColor" value="0x2C3E50" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#3C4E60" />
<preference name="StatusBarStyle" value="lightcontent" />
</widget>

View file

@ -43,6 +43,7 @@
"verify": "gpg --verify browser-extensions/firefox/copay.xpi.sig browser-extensions/firefox/copay.xpi; gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip"
},
"devDependencies": {
"angular-gravatar": "*",
"async": "^0.9.0",
"bitcore": "^0.1.36",
"blanket": "^1.1.6",
@ -61,6 +62,7 @@
"grunt-browserify": "^2.0.8",
"grunt-cli": "^0.1.13",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-watch": "^0.5.3",
@ -81,14 +83,13 @@
"mocha": "^1.18.2",
"mocha-lcov-reporter": "^0.0.1",
"mock-fs": "^2.3.1",
"sjcl": "*",
"node-cryptojs-aes": "^0.4.0",
"request": "^2.40.0",
"shelljs": "^0.3.0",
"sinon": "^1.10.3",
"sjcl": "*",
"socket.io-client": "^1.0.6",
"travis-cov": "^0.2.5",
"uglifyify": "^1.2.3",
"angular-gravatar": "*"
"uglifyify": "^1.2.3"
}
}