You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/01/07 20:28:23 UTC

[camel-website] 02/02: CAMEL-11500: cleanup the build

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch pnp
in repository https://gitbox.apache.org/repos/asf/camel-website.git

commit 3a6298189cadd736ed75a4f5e76548f91d1ef19e
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon Jan 7 21:21:07 2019 +0100

    CAMEL-11500: cleanup the build
    
    Now by default `yarn` runs the build of the website. For Jenkins we now
    use `--cwd` to make the build a bit simpler.
---
 .vscode/launch.json          | 40 ++++++++++++++++++++++++++++++++++++++++
 Jenkinsfile                  | 12 ++----------
 antora-ui-camel/package.json |  3 +++
 package.json                 |  5 +----
 yarn.lock                    |  2 +-
 5 files changed, 47 insertions(+), 15 deletions(-)

diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..49c0cc7
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,40 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "node",
+            "protocol": "inspector",
+            "request": "launch",
+            "name": "(theme) yarn gulp build",
+            "cwd": "/home/zregvart/tmp/camel-website/antora-ui-camel",
+            "program": "/home/zregvart/.cache/yarn/v4/npm-gulp-4.0.0-95766c601dade4a77ed3e7b2b6dc03881b596366/node_modules/gulp/bin/gulp.js",
+            //"program": "/home/zregvart/tmp/camel-website/antora-ui-camel/node_modules/gulp/bin/gulp.js",
+            "runtimeArgs": [
+                "--require",
+                "/home/zregvart/tmp/camel-website/antora-ui-camel/.pnp.js"
+            ],
+            "args": [
+                "build"
+            ],
+        },
+        {
+            "type": "node",
+            "protocol": "inspector",
+            "request": "launch",
+            "name": "(site) yarn gulp critical",
+            "cwd": "/home/zregvart/tmp/camel-website",
+            "program": "/home/zregvart/.cache/yarn/v4/npm-gulp-4.0.0-95766c601dade4a77ed3e7b2b6dc03881b596366/node_modules/gulp/bin/gulp.js",
+            //"program": "/home/zregvart/tmp/camel-website/antora-ui-camel/node_modules/gulp/bin/gulp.js",
+            "runtimeArgs": [
+                "--require",
+                "/home/zregvart/tmp/camel-website/.pnp.js"
+            ],
+            "args": [
+                "critical"
+            ],
+        }
+    ]
+}
\ No newline at end of file
diff --git a/Jenkinsfile b/Jenkinsfile
index 1d514f9..5a89c71 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -49,8 +49,7 @@ pipeline {
             }
 
             steps {
-                sh "cd $WORKSPACE/camel-website/antora-ui-camel && yarn --non-interactive --frozen-lockfile install"
-                sh "cd $WORKSPACE/camel-website/antora-ui-camel && yarn --non-interactive gulp"
+                sh "yarn --cwd $WORKSPACE/camel-website/antora-ui-camel --non-interactive --frozen-lockfile"
             }
         }
 
@@ -64,8 +63,7 @@ pipeline {
             }
 
             steps {
-                sh "cd $WORKSPACE/camel-website && yarn --non-interactive --frozen-lockfile install"
-                sh "cd $WORKSPACE/camel-website && yarn --non-interactive build"
+                sh "yarn --cwd $WORKSPACE/camel-website --non-interactive --frozen-lockfile"
             }
         }
 
@@ -87,10 +85,4 @@ pipeline {
             }
        }
     }
-
-    post {
-        always {
-            cleanWs()
-        }
-    }
 }
diff --git a/antora-ui-camel/package.json b/antora-ui-camel/package.json
index e784905..a823402 100644
--- a/antora-ui-camel/package.json
+++ b/antora-ui-camel/package.json
@@ -10,6 +10,9 @@
   "engines": {
     "node": ">= 8.0.0"
   },
+  "scripts": {
+    "install": "gulp"
+  },
   "devDependencies": {
     "autoprefixer": "~9.4",
     "browserify": "~16.2",
diff --git a/package.json b/package.json
index 974aaeb..bfc0a84 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
     "website": "hugo --minify",
     "critical": "gulp critical",
     "minify": "gulp minify",
-    "build": "run-s documentation website minify critical"
+    "install": "run-s documentation website minify critical"
   },
   "devDependencies": {
     "@antora/cli": "^2.0.0",
@@ -18,9 +18,6 @@
     "npm-run-all": "^4.1.5",
     "opal-runtime": "1.0.11"
   },
-  "resolutions": {
-    "resolve": "~1.9"
-  },
   "installConfig": {
     "pnp": true
   }
diff --git a/yarn.lock b/yarn.lock
index 9af9ed6..4e31c2f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4715,7 +4715,7 @@ resolve-url@^0.2.1:
   resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
   integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
 
-resolve@^1.1.6, resolve@^1.1.7, resolve@^1.4.0, resolve@^1.8.1, resolve@~1.9:
+resolve@^1.1.6, resolve@^1.1.7, resolve@^1.4.0, resolve@^1.8.1:
   version "1.9.0"
   resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06"
   integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==