camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [3/7] camel git commit: Revert "CAMEL-11492 New Camel website"
Date Thu, 06 Jul 2017 06:44:26 GMT
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 <ancosen@gmail.com>
Authored: Thu Jul 6 08:43:45 2017 +0200
Committer: Andrea Cosentino <ancosen@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']);
 });
+


Mime
View raw message