From c0a8ccb9c4a21babac9731dc879d50e1be863b7f Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Mon, 4 Nov 2019 12:37:18 +0000 Subject: [PATCH 1/3] readme: made readme more friendlier-ish while initially just meant for code-server, I think nbin has reached maturity that we can call it a competitor to the likes of pkg and nexe Signed-off-by: Ayane Satomi --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 524aac5..f1da52a 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,7 @@ [![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](#) [![Discord](https://discordapp.com/api/guilds/463752820026376202/widget.png)](https://discord.gg/zxSwN8Z) -Fast and robust node.js binary compiler. - -**WARNING:** This project was created for [code-server](https://github.com/cdr/code-server) and may provide limited support. - -Why was this made? Why not use `pkg` or `nexe`? +nbin is a in-house binary compiler made initially for code-server but can be used by other projects as well. Unlike contemporaries like `nbin` and `nexe` we support the following that is normally not supported by them: - Support for native node modules. - No magic. The user specifies all customization. An example of this is overriding the filesystem. @@ -40,7 +36,7 @@ const output = bin.bundle(); ### Forks -`child_process`.`fork` works as expected. `nbin` will treat the compiled binary as the original node binary when the `process.send` function is available. +`child_process.fork()` works as expected. `nbin` will treat the compiled binary as the original node binary when the `process.send()` function is available. ### Webpack @@ -66,4 +62,4 @@ You can pass [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_o NODE_OPTIONS="--inspect-brk" ./path/to/bin ``` -Gzip'd JavaScript files are supported to reduce bundle size. +We also support compressed JavaScript to reduce your bundle's size, preferrably gzip. \ No newline at end of file From 28fe263e29f327cdab2166feecf375e2e84d18c2 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Mon, 13 Jan 2020 18:14:56 +0800 Subject: [PATCH 2/3] ci: add Alpine build steps Signed-off-by: Ayane Satomi --- .drone.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.drone.yml b/.drone.yml index c167623..e8097b1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,6 +23,14 @@ steps: - yarn - ARCH=amd64 ./scripts/ci.bash +- name: build-alpine + image: node:12-alpine + commands: + - apk add build-base ccache + - yarn + - ARCH=amd64 ./scripts/ci.bash + + - name: rebuild-cache image: codercom/drone-volume-cache:amd64 volumes: @@ -69,6 +77,13 @@ steps: - yarn - ARCH=arm64 ./scripts/ci.bash +- name: build-alpine + image: node:12-alpine + commands: + - apk add build-base ccache + - yarn + - ARCH=amd64 ./scripts/ci.bash + - name: rebuild-cache image: codercom/drone-volume-cache:arm64 volumes: From 2d75fe972aaa68e15a1ef8c100b8d9bcdbd3aaa2 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Mon, 13 Jan 2020 18:16:29 +0800 Subject: [PATCH 3/3] readme: fix conflicts Signed-off-by: Ayane Satomi --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index e8b18ad..df014e8 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,10 @@ const output = bin.bundle(); ### Forks -<<<<<<< HEAD -`child_process.fork()` works as expected. `nbin` will treat the compiled binary as the original node binary when the `process.send()` function is available. -======= To use the compiled binary as the original Node binary set the `NBIN_BYPASS` environment variable. This can be especially useful when forking processes (or spawning with the binary). You might want to simply immediately set this to any truthy value as soon as your code loads. ->>>>>>> afff57d3ac36c0284b14b9d4cba89f2e0e38d334 ### Webpack @@ -77,9 +73,6 @@ You can pass NODE_OPTIONS="--inspect-brk" ./path/to/bin ``` -<<<<<<< HEAD -We also support compressed JavaScript to reduce your bundle's size, preferrably gzip. -======= Gzip'd JavaScript files are supported to reduce bundle size. ## Development @@ -100,4 +93,3 @@ We patch Node to make it capable of reading files within the binary. To generate a new patch, **stage all the changes** you want to be included in the patch in the Node source, then run `yarn patch:generate` in this directory. ->>>>>>> afff57d3ac36c0284b14b9d4cba89f2e0e38d334