Repository: incubator-milagro-mfa-js-client
Updated Branches:
  refs/heads/master 8383bbd89 -> a1f8b9057


Create an build script for Milagro Pin Pad

using build.sh an user can install all dependencies and build the Pin
Pad and mobile app with just one command


Project: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/commit/fc678e55
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/tree/fc678e55
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/diff/fc678e55

Branch: refs/heads/master
Commit: fc678e552dcef23be822503569f0a89489db6713
Parents: 47af029
Author: Pavlin Angelov <[email protected]>
Authored: Wed May 11 16:22:00 2016 +0300
Committer: simmol <[email protected]>
Committed: Fri May 13 12:01:30 2016 +0300

----------------------------------------------------------------------
 README.md |  8 ++++++++
 build.sh  | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/blob/fc678e55/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 67e71b0..383e3e5 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,14 @@ The PIN Pad is a JavaScript software component that should 
be integrated into th
 
 The Mobile App is a JavaScript application, much similar to the PIN Pad. The 
Mobile App also carries out the operations needed to register and authenticate 
an end-user, but the user is authenticated to a browser session, rather than to 
a session on the mobile device.
 
+##Building automatically the PIN Pad
+You can run the following script to install all dependencies for you and build 
both the PIN PAD and Mobile App
+```
+    > ./build.sh
+```
+It is building with default Milagro theme.
+The built apps should be placed in `<work-dir>/build/out/browser` and 
`<work-dir>/build/out/mobile`.
+
 ##Building the PIN Pad
 
 1. NOTE: You might have to update your package distribution system. For Ubuntu 
you would need to do: `sudo apt-get update`

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-client/blob/fc678e55/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..e6d99e6
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+BASE_DIR=$(pwd)
+
+function install_needed_tools {
+    # update package manager cache
+    sudo apt-get update
+
+    # install node package manager npm
+    sudo apt-get install npm curl git
+
+    sudo npm config set prefix /usr/local
+
+    sudo npm install -g n
+    sudo n 0.10.33
+
+    # Install grunt
+    sudo npm install -g grunt-cli
+
+    # Install handlebars
+    sudo npm install -g [email protected]
+
+    # install bower
+    sudo npm install -g bower
+}
+
+function build_mpin {
+    APP_TYPE=$1
+    cd "$BASE_DIR/$APP_TYPE"
+
+    # Install required modules for Node
+    sudo npm install
+
+    # Create settings.json
+    cp settings.json_build settings.json
+
+    # Build the app
+    grunt build
+}
+
+install_needed_tools
+
+# Build browser mpin
+build_mpin browser
+
+# Build mobile mpin
+build_mpin mobile

Reply via email to