cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [08/11] git commit: Adding in grunt preprocess to remove the livereload script when its going to production
Date Wed, 16 Apr 2014 00:31:12 GMT
Adding in grunt preprocess to remove the livereload script when its going to production


Project: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/commit/518e10e2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/tree/518e10e2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/diff/518e10e2

Branch: refs/heads/master
Commit: 518e10e214c134a83d673d3c73f7ea73318a80de
Parents: 552c64e
Author: Josh Bavari <josh@raisemore.com>
Authored: Tue Apr 8 16:43:00 2014 -0500
Committer: Josh Bavari <josh@raisemore.com>
Committed: Tue Apr 8 16:43:00 2014 -0500

----------------------------------------------------------------------
 Gruntfile.js           | 14 ++++++++++++++
 attachments/index.html |  4 ++++
 package.json           |  3 ++-
 3 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/518e10e2/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 537aad6..8372351 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -83,6 +83,18 @@ module.exports = function(grunt) {
                 },
             }
         }
+    },
+    preprocess: {
+      livereloadout: {
+        options: {
+          context: {
+            LIVERELOAD: true
+          }
+        },
+        files: {
+          'attachments/index.html' : 'attachments/index.html'
+        }
+      }
     }
   });
   
@@ -101,12 +113,14 @@ module.exports = function(grunt) {
   grunt.registerTask('cloudant', function (target) {
       grunt.task.run([
           'less',
+          'preprocess:livereloadout',
           'shell:cloudant'   
       ]);
   });
   grunt.registerTask('iriscouch', function (target) {
       grunt.task.run([
           'less',
+          'preprocess:livereloadout',
           'shell:iriscouch'   
       ]);
   });

http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/518e10e2/attachments/index.html
----------------------------------------------------------------------
diff --git a/attachments/index.html b/attachments/index.html
index f9b774a..094c1d4 100644
--- a/attachments/index.html
+++ b/attachments/index.html
@@ -15,6 +15,10 @@
   <link href="css/styles.css" rel="stylesheet" type="text/css">
   <link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
 
+  <!-- @ifndef LIVERELOAD -->
+   <script src="http://localhost:35729/livereload.js"></script>
+  <!-- @endif -->
+
 </head>
 
 <body ng-app="registry">

http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/518e10e2/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 908cc88..987d898 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
     "load-grunt-tasks": "~0.2.1",
     "grunt-contrib-less": "~0.9.0",
     "grunt-connect-proxy": "^0.1.8",
-    "grunt-contrib-connect": "^0.7.1"
+    "grunt-contrib-connect": "^0.7.1",
+    "grunt-preprocess": "~4.0.0"
   }
 }


Mime
View raw message