From: selfisekai <selfisekai@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] nodejs build style
Date: Thu, 05 Nov 2020 19:04:55 +0100 [thread overview]
Message-ID: <20201105180455.np-2IlQJ3chrT93IBN1ky5OWcMVgh8iJr6cKF6N-T9M@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23947@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
There is an updated 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
intended mostly for (bleh) electron packages
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: 2413 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 1/2] 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
+}
From 90627422b037395cb64b2dbca67363248f767585 Mon Sep 17 00:00:00 2001
From: selfisekai <laura@selfisekai.rocks>
Date: Thu, 5 Nov 2020 19:04:58 +0100
Subject: [PATCH 2/2] node build_style: set NODE_ENV
---
common/build-style/nodejs.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/common/build-style/nodejs.sh b/common/build-style/nodejs.sh
index c9e749d3342..98268b33de0 100644
--- a/common/build-style/nodejs.sh
+++ b/common/build-style/nodejs.sh
@@ -3,6 +3,7 @@
#
do_configure() {
+ : ${NODE_ENV:=production}
if [ -f "yarn.lock" ]; then
: ${nodejs_packager:=yarn}
else
@@ -13,6 +14,7 @@ do_configure() {
}
do_build() {
+ : ${NODE_ENV:=production}
if [ -f "yarn.lock" ]; then
: ${nodejs_packager:=yarn}
else
@@ -24,7 +26,9 @@ do_build() {
$nodejs_packager run $nodejs_build_script
}
+# it's really likely that it won't suit anybody's needs but whatever
do_install() {
+ : ${NODE_ENV:=production}
if [ -f "yarn.lock" ]; then
: ${nodejs_packager:=yarn}
else
next prev parent reply other threads:[~2020-11-05 18:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 9:19 [PR PATCH] " selfisekai
2020-08-03 20:08 ` Chocimier
2020-08-16 23:37 ` fosslinux
2020-09-04 16:02 ` Anachron
2020-11-05 18:04 ` selfisekai [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201105180455.np-2IlQJ3chrT93IBN1ky5OWcMVgh8iJr6cKF6N-T9M@z \
--to=selfisekai@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).