Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] nodejs build style
@ 2020-07-30  9:19 selfisekai
  2020-08-03 20:08 ` Chocimier
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: selfisekai @ 2020-07-30  9:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

There is a new pull request by selfisekai against master on the void-packages repository

https://github.com/selfisekai/void-packages node-build-style
https://github.com/void-linux/void-packages/pull/23947

nodejs build style


A patch file from https://github.com/void-linux/void-packages/pull/23947.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-node-build-style-23947.patch --]
[-- Type: text/x-diff, Size: 1355 bytes --]

From cf172217b1ea17856a70f669733a411fe0daf6f1 Mon Sep 17 00:00:00 2001
From: selfisekai <laura@selfisekai.rocks>
Date: Thu, 30 Jul 2020 11:19:10 +0200
Subject: [PATCH] nodejs build style

---
 common/build-style/nodejs.sh | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 common/build-style/nodejs.sh

diff --git a/common/build-style/nodejs.sh b/common/build-style/nodejs.sh
new file mode 100644
index 00000000000..c9e749d3342
--- /dev/null
+++ b/common/build-style/nodejs.sh
@@ -0,0 +1,37 @@
+#
+# This helper is for templates for Node.js packages (including Electron.js)
+#
+
+do_configure() {
+    if [ -f "yarn.lock" ]; then
+        : ${nodejs_packager:=yarn}
+    else
+        : ${nodejs_packager:=npm}
+    fi
+
+    $nodejs_packager install
+}
+
+do_build() {
+    if [ -f "yarn.lock" ]; then
+        : ${nodejs_packager:=yarn}
+    else
+        : ${nodejs_packager:=npm}
+    fi
+
+    : ${nodejs_build_script:=build}
+
+    $nodejs_packager run $nodejs_build_script
+}
+
+do_install() {
+    if [ -f "yarn.lock" ]; then
+        : ${nodejs_packager:=yarn}
+    else
+        : ${nodejs_packager:=npm}
+    fi
+
+    : ${nodejs_install_script:=pack}  # name suggested by https://github.com/electron-userland/electron-builder#quick-setup-guide
+
+    $nodejs_packager run $nodejs_install_script
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-04-03 23:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
2020-08-03 20:08 ` Chocimier
2020-08-16 23:37 ` fosslinux
2020-09-04 16:02 ` Anachron
2020-11-05 18:04 ` [PR PATCH] [Updated] " selfisekai
2020-11-15 23:41 ` fosslinux
2020-12-30  7:19 ` the-maldridge
2021-01-02 20:15 ` [PR PATCH] [Updated] " selfisekai
2021-01-02 20:20 ` selfisekai
2021-01-02 21:59 ` fosslinux
2021-01-02 22:20 ` [PR REVIEW] " the-maldridge
2021-01-03  3:41 ` [PR PATCH] [Updated] " selfisekai
2021-01-29  3:00 ` [PR REVIEW] " ericonr
2021-01-29  3:00 ` ericonr
2021-01-29  3:00 ` ericonr
2021-01-29  3:01 ` ericonr
2021-01-29  5:03 ` fosslinux
2021-01-29  5:18 ` ericonr
2021-04-03 23:14 ` [PR PATCH] [Closed]: " selfisekai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).