You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/07/06 06:44:26 UTC

[3/7] camel git commit: Revert "CAMEL-11492 New Camel website"

Revert "CAMEL-11492 New Camel website"

This reverts commit f8b992e3c130adf08104fdd91a932a293bc6a274.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f3e26257
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f3e26257
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f3e26257

Branch: refs/heads/master
Commit: f3e2625753e45e1964068638b5516e0b6a15c549
Parents: 34614ca
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Jul 6 08:43:45 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Jul 6 08:43:45 2017 +0200

----------------------------------------------------------------------
 camel-website/gulpfile.js | 36 ++++++++++++------------------------
 1 file changed, 12 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f3e26257/camel-website/gulpfile.js
----------------------------------------------------------------------
diff --git a/camel-website/gulpfile.js b/camel-website/gulpfile.js
index 5b36839..75b7ed5 100644
--- a/camel-website/gulpfile.js
+++ b/camel-website/gulpfile.js
@@ -21,23 +21,16 @@ const replace = require('gulp-replace');
 
 const version = process.env.npm_package_version.replace(/-.*/, '');
 
-gulp.task('docs', ['components-readme', 'components']);
-
-const components = (path) => gulp.src(path || '../components/**/src/main/docs/*.adoc')
-  .pipe(rename({dirname: ''}))
-  .pipe(gulp.dest(`content/components/${version}`));
-
-gulp.task('components', () => {
-  return components();
-});
-
-const componentReadme = () => gulp.src('../components/readme.adoc')
-  .pipe(replace(/link:.*\/(.*).adoc(\[.*)/g, `link:components/${version}/$1$2`))
-  .pipe(rename('components.adoc'))
-  .pipe(gulp.dest('content'));
-
-gulp.task('components-readme', () => {
-  return componentReadme();
+gulp.task('docs', ['component-doc']);
+
+gulp.task('component-doc', () => {
+  gulp.src('../components/readme.adoc')
+    .pipe(replace(/link:.*\/(.*).adoc(\[.*)/g, `link:components/${version}/$1$2`))
+    .pipe(rename('components.adoc'))
+    .pipe(gulp.dest('content'));
+  gulp.src('../components/**/src/main/docs/*.adoc')
+    .pipe(rename({dirname: ''}))
+    .pipe(gulp.dest(`content/components/${version}`));
 });
 
 gulp.task('asciidoctor-shim', () => {
@@ -50,11 +43,6 @@ gulp.task('asciidoctor-shim', () => {
 gulp.task('default', ['docs', 'asciidoctor-shim']);
 
 gulp.task('watch', () => {
-  gulp.watch(['../components/**/*.adoc', '!../components/readme.adoc'], (event) => {
-    components(event.path);
-  });
-
-  gulp.watch('../components/readme.adoc', (event) => {
-    componentReadme();
-  });
+  gulp.watch('../**/*.adoc', ['docs']);
 });
+