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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
@ 2020-08-03 20:08 ` Chocimier
  2020-08-16 23:37 ` fosslinux
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Chocimier @ 2020-08-03 20:08 UTC (permalink / raw)
  To: ml

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

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-668217287

Comment:
I do not want it as long as it install precompiled binaries, i. e. until #21758 is done and build style uses that.

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

* Re: nodejs build style
  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
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fosslinux @ 2020-08-16 23:37 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-674593020

Comment:
Can we revisit this?

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

* Re: nodejs build style
  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
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Anachron @ 2020-09-04 16:02 UTC (permalink / raw)
  To: ml

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

New comment by Anachron on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-687239959

Comment:
We should export NODE_ENV=production, no?

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

* Re: [PR PATCH] [Updated] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (2 preceding siblings ...)
  2020-09-04 16:02 ` Anachron
@ 2020-11-05 18:04 ` selfisekai
  2020-11-15 23:41 ` fosslinux
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: selfisekai @ 2020-11-05 18:04 UTC (permalink / raw)
  To: ml

[-- 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

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (3 preceding siblings ...)
  2020-11-05 18:04 ` [PR PATCH] [Updated] " selfisekai
@ 2020-11-15 23:41 ` fosslinux
  2020-12-30  7:19 ` the-maldridge
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fosslinux @ 2020-11-15 23:41 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-727658542

Comment:
Ping

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (4 preceding siblings ...)
  2020-11-15 23:41 ` fosslinux
@ 2020-12-30  7:19 ` the-maldridge
  2021-01-02 20:15 ` [PR PATCH] [Updated] " selfisekai
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: the-maldridge @ 2020-12-30  7:19 UTC (permalink / raw)
  To: ml

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

New comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-752356796

Comment:
Looks good to me.  Needs docs to explain the new template variables that are supported by this build style and then it can be merged.  Ideally templates that can benefit from this style would be moved over to it as well.

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

* Re: [PR PATCH] [Updated] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (5 preceding siblings ...)
  2020-12-30  7:19 ` the-maldridge
@ 2021-01-02 20:15 ` selfisekai
  2021-01-02 20:20 ` selfisekai
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: selfisekai @ 2021-01-02 20:15 UTC (permalink / raw)
  To: ml

[-- 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: 3787 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/3] 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/3] 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

From d86eefe22f4c8e00881f64f7c1d1dd2b1078255a Mon Sep 17 00:00:00 2001
From: Laura Liberda <laura@selfisekai.rocks>
Date: Sat, 2 Jan 2021 21:14:42 +0100
Subject: [PATCH 3/3] docs: nodejs build style basic information

---
 Manual.md | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Manual.md b/Manual.md
index 4f954b840be..937bdfd7c41 100644
--- a/Manual.md
+++ b/Manual.md
@@ -915,6 +915,15 @@ depend on additional packages. This build style does not install
 dependencies to the root directory, and only checks if a binary package is
 available in repositories.
 
+- `nodejs` For apps made in Node.js that get built with npm or yarn
+(including Electron.js apps). The variable `nodejs_build_script` must be set
+to the package.json script that builds the app files (default: `build`).
+The variable `nodejs_install_script` must be set to app installing script,
+which most probably doesn't even exist and you should redefine `do_install`
+in your build script. The variable `nodejs_packager` is set to `yarn`
+if the `yarn.lock` file exists, else it's set to `npm`, but you can overwrite it.
+`NODE_ENV` is set to `production` by default.
+
 - `R-cran` For packages that are available on The Comprehensive R Archive
 Network (CRAN). The build style requires the `pkgname` to start with
 `R-cran-` and any dashes (`-`) in the CRAN-given version to be replaced

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (6 preceding siblings ...)
  2021-01-02 20:15 ` [PR PATCH] [Updated] " selfisekai
@ 2021-01-02 20:20 ` selfisekai
  2021-01-02 21:59 ` fosslinux
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: selfisekai @ 2021-01-02 20:20 UTC (permalink / raw)
  To: ml

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

New comment by selfisekai on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-753524920

Comment:
@the-maldridge I did some simple docs and merged all the changes from master (force-pushed, because I did `git pull --rebase` and the PR included like 10k commits from master), you can check it now.

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (7 preceding siblings ...)
  2021-01-02 20:20 ` selfisekai
@ 2021-01-02 21:59 ` fosslinux
  2021-01-02 22:20 ` [PR REVIEW] " the-maldridge
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fosslinux @ 2021-01-02 21:59 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-753535010

Comment:
You need to rebase, not merge.

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

* Re: [PR REVIEW] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (8 preceding siblings ...)
  2021-01-02 21:59 ` fosslinux
@ 2021-01-02 22:20 ` the-maldridge
  2021-01-03  3:41 ` [PR PATCH] [Updated] " selfisekai
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: the-maldridge @ 2021-01-02 22:20 UTC (permalink / raw)
  To: ml

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

New review comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#discussion_r550927280

Comment:
I think the explanation of variables could be better formatted as a list.  Look at the python section starting on line 1504. 

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

* Re: [PR PATCH] [Updated] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (9 preceding siblings ...)
  2021-01-02 22:20 ` [PR REVIEW] " the-maldridge
@ 2021-01-03  3:41 ` selfisekai
  2021-01-29  3:00 ` [PR REVIEW] " ericonr
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: selfisekai @ 2021-01-03  3:41 UTC (permalink / raw)
  To: ml

[-- 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: 4348 bytes --]

From 135796b8cfb80c0449d5d42e57134e9a6881dee2 Mon Sep 17 00:00:00 2001
From: selfisekai <laura@selfisekai.rocks>
Date: Thu, 30 Jul 2020 11:19:10 +0200
Subject: [PATCH 1/3] 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 e02f50d0f5f80e97adccff6034c7ab8eb2d3f8f4 Mon Sep 17 00:00:00 2001
From: selfisekai <laura@selfisekai.rocks>
Date: Thu, 5 Nov 2020 19:04:58 +0100
Subject: [PATCH 2/3] 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

From 35ec9daad070692ef6fb121dcacd33b14c3bc937 Mon Sep 17 00:00:00 2001
From: Laura Liberda <laura@selfisekai.rocks>
Date: Sat, 2 Jan 2021 21:14:42 +0100
Subject: [PATCH 3/3] docs: nodejs build style basic information

---
 Manual.md | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Manual.md b/Manual.md
index 4f954b840be..b08e3686b37 100644
--- a/Manual.md
+++ b/Manual.md
@@ -915,6 +915,9 @@ depend on additional packages. This build style does not install
 dependencies to the root directory, and only checks if a binary package is
 available in repositories.
 
+- `nodejs` For apps made in Node.js that get built with npm or yarn
+(including Electron.js apps).
+
 - `R-cran` For packages that are available on The Comprehensive R Archive
 Network (CRAN). The build style requires the `pkgname` to start with
 `R-cran-` and any dashes (`-`) in the CRAN-given version to be replaced
@@ -1616,6 +1619,23 @@ The following variables influence how Haskell packages are built:
 - `make_build_args`: This is passed as-is to `stack build ...`, so
   you can add your `--flag ...` parameters there.
 
+<a id="pkgs_nodejs"></a>
+### Node.js packages
+
+Node.js packages should be built with the `nodejs` build style, if possible.
+The `nodejs` build style takes care of downloading yarn/npm dependencies
+and running builds via package.json scripts.
+
+The following template variables influence how Node.js packages are built:
+- `nodejs_build_script`: the package.json script that builds the app files
+	(default: `build`).
+- `nodejs_install_script`: app installing script, which most probably 
+	doesn't even exist and you should redefine `do_install`
+	in your build script. 
+- `nodejs_packager`: whether the build script should use yarn or npm.
+	Set to `yarn` if the `yarn.lock` file exists, else it's set to `npm`
+- `NODE_ENV`: set to `production` by default
+
 <a id="pkgs_font"></a>
 ### Font packages
 

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

* Re: [PR REVIEW] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (10 preceding siblings ...)
  2021-01-03  3:41 ` [PR PATCH] [Updated] " selfisekai
@ 2021-01-29  3:00 ` ericonr
  2021-01-29  3:00 ` ericonr
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-01-29  3:00 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#discussion_r566547982

Comment:
```suggestion
- `nodejs_install_script`: app installing script, which is unlikely to exist.
Most of the time, you will have to define your own `do_install`.
```

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

* Re: [PR REVIEW] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (11 preceding siblings ...)
  2021-01-29  3:00 ` [PR REVIEW] " ericonr
@ 2021-01-29  3:00 ` ericonr
  2021-01-29  3:00 ` ericonr
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-01-29  3:00 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#discussion_r566548402

Comment:
it should be exported in the build style, otherwise just setting it won't affect the build.

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

* Re: [PR REVIEW] nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (12 preceding siblings ...)
  2021-01-29  3:00 ` ericonr
@ 2021-01-29  3:00 ` ericonr
  2021-01-29  3:01 ` ericonr
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-01-29  3:00 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#discussion_r566547659

Comment:
This needs to go on the table of contents at the start of the document.

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (13 preceding siblings ...)
  2021-01-29  3:00 ` ericonr
@ 2021-01-29  3:01 ` ericonr
  2021-01-29  5:03 ` fosslinux
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-01-29  3:01 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-769541793

Comment:
To be honest, though, I'm not sure I entirely see the value in this... #23948 seems to have successfully completed CI even without having the build style there.

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (14 preceding siblings ...)
  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
  17 siblings, 0 replies; 19+ messages in thread
From: fosslinux @ 2021-01-29  5:03 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-769576677

Comment:
@ericonr uh, there is a nodejs build style commit in that pr...

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

* Re: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (15 preceding siblings ...)
  2021-01-29  5:03 ` fosslinux
@ 2021-01-29  5:18 ` ericonr
  2021-04-03 23:14 ` [PR PATCH] [Closed]: " selfisekai
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-01-29  5:18 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/23947#issuecomment-769581341

Comment:
well, oops. Still, the template defines its own `do_build` and `do_install`.

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

* Re: [PR PATCH] [Closed]: nodejs build style
  2020-07-30  9:19 [PR PATCH] nodejs build style selfisekai
                   ` (16 preceding siblings ...)
  2021-01-29  5:18 ` ericonr
@ 2021-04-03 23:14 ` selfisekai
  17 siblings, 0 replies; 19+ messages in thread
From: selfisekai @ 2021-04-03 23:14 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

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

Description:
intended mostly for (bleh) electron packages

^ 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).