You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by an...@apache.org on 2015/09/06 04:59:03 UTC

[4/4] incubator-apex-site git commit: add less file and less gulp task

add less file and less gulp task


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/commit/b45e77a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/tree/b45e77a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/diff/b45e77a1

Branch: refs/heads/master
Commit: b45e77a1b5ae4a4497c176c14565e75f17ca1f72
Parents: b2cea66
Author: Andy Perlitch <an...@gmail.com>
Authored: Sat Sep 5 19:58:20 2015 -0700
Committer: Andy Perlitch <an...@gmail.com>
Committed: Sat Sep 5 19:58:24 2015 -0700

----------------------------------------------------------------------
 gulpfile.js        | 17 +++++++++++++++++
 package.json       |  1 +
 src/less/main.less |  1 +
 3 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/b45e77a1/gulpfile.js
----------------------------------------------------------------------
diff --git a/gulpfile.js b/gulpfile.js
index b7b1639..003e067 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -4,6 +4,8 @@
 var gulp = require('gulp');
 var marked = require('gulp-marked');
 var handlebars = require('gulp-compile-handlebars');
+var less = require('gulp-less');
+var path = require('path');
 
 // Constants
 var TEMP_PARTIAL_LOCATION = './.tmp/partials/';
@@ -55,3 +57,18 @@ gulp.task('html', ['md2html'], function() {
     .pipe(gulp.dest(BUILD_LOCATION));
 
 });
+
+// Creates the built css files
+gulp.task('less', function () {
+  return gulp.src('./src/less/main.less')
+    .pipe(less({
+      paths: [
+        path.join(__dirname, 'src', 'less'),
+        path.join(__dirname, 'bower_components', 'bootstrap', 'less')
+      ]
+    }))
+    .pipe(gulp.dest(path.join(BUILD_LOCATION, 'css')));
+});
+
+gulp.task('default', ['less', 'html']);
+

http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/b45e77a1/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index edf53fb..6e9157e 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
   "dependencies": {
     "gulp": "^3.9.0",
     "gulp-compile-handlebars": "^0.5.0",
+    "gulp-less": "^3.0.3",
     "gulp-marked": "^1.0.0",
     "handlebars": "^4.0.2"
   }

http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/b45e77a1/src/less/main.less
----------------------------------------------------------------------
diff --git a/src/less/main.less b/src/less/main.less
new file mode 100644
index 0000000..c1460f3
--- /dev/null
+++ b/src/less/main.less
@@ -0,0 +1 @@
+@import "../../bower_components/bootstrap/less/bootstrap.less";
\ No newline at end of file