You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/07/25 00:32:16 UTC

docs commit: Adding watching for CSS.

Repository: cordova-docs
Updated Branches:
  refs/heads/cordova-website 2a421b994 -> 76e114052


Adding watching for CSS.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/76e11405
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/76e11405
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/76e11405

Branch: refs/heads/cordova-website
Commit: 76e11405217d67914871534b29fcaae3b5600905
Parents: 2a421b9
Author: Dmitry Blotsky <dm...@gmail.com>
Authored: Fri Jul 24 15:32:13 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Fri Jul 24 15:32:13 2015 -0700

----------------------------------------------------------------------
 gulpfile.js | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/76e11405/gulpfile.js
----------------------------------------------------------------------
diff --git a/gulpfile.js b/gulpfile.js
index 26833f9..97f818f 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -20,7 +20,7 @@ var BIN_DIR     = path.join("tools", "bin");
 var DATA_DIR    = path.join(SOURCE_DIR, "_data");
 var DOCS_DIR    = path.join(SOURCE_DIR, "docs");
 var CSS_SRC_DIR = path.join(SOURCE_DIR, "static", "css-src");
-var CSS_DIR     = path.join(SOURCE_DIR, "static", "css");
+var CSS_OUT_DIR = path.join(SOURCE_DIR, "static", "css");
 var BUILD_DIR   = "public";
 
 // helpers
@@ -41,20 +41,10 @@ function bin(name) {
 }
 
 // tasks
-gulp.task("default", function () {
-    gulp.run("lr-server", "scripts", "styles", "html");
-
-    gulp.watch("app/src/**", function(event) {
-        gulp.run("scripts");
-    })
-
-    gulp.watch("app/css/**", function(event) {
+gulp.task("watch", function () {
+    gulp.watch(path.join(CSS_SRC_DIR, "**", "*"), function(event) {
         gulp.run("styles");
-    })
-
-    gulp.watch("app/**/*.html", function(event) {
-        gulp.run("html");
-    })
+    });
 });
 
 gulp.task("build", ["defaults", "languages", "toc", "styles"], function (done) {
@@ -83,14 +73,14 @@ gulp.task("styles", function() {
 
     gulp.src(path.join(CSS_SRC_DIR, "**", "*.less"))
         .pipe(less())
-        .pipe(gulp.dest(CSS_DIR));
+        .pipe(gulp.dest(CSS_OUT_DIR));
 
     gulp.src(path.join(CSS_SRC_DIR, "**", "*.css"))
-        .pipe(gulp.dest(CSS_DIR));
+        .pipe(gulp.dest(CSS_OUT_DIR));
 
     gulp.src(path.join(CSS_SRC_DIR, "**", "*.scss"))
         .pipe(sass().on("error", sass.logError))
-        .pipe(gulp.dest(CSS_DIR));
+        .pipe(gulp.dest(CSS_OUT_DIR));
 });
 
 // convenience tasks
@@ -102,6 +92,6 @@ gulp.task("clean", function () {
     fse.remove(BUILD_DIR);
     fse.remove(path.join(DATA_DIR, "toc", "*.yml"));
     fse.remove(path.join(DATA_DIR, "languages.yml"));
-    fse.remove(path.join(CSS_DIR));
+    fse.remove(path.join(CSS_OUT_DIR));
     fse.remove("_defaults.yml");
 });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org