nwlink 0.0.3 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1 +1,28 @@
1
- # Hello
1
+ # nwlink
2
+
3
+ The `nwlink` command-line tool allows you to communicate with your NumWorks calculator from the command line.
4
+
5
+ Simply install it with `npm install -g nwlink`, the run `nwlink --help` to get a list of possible commands.
6
+
7
+ ### About binutils
8
+
9
+ The `ld.wasm` and `objcopy.wasm` files are distributed under the GNU GPL license, version 2. They are built from the unmodified sources of binutils version 2.38. To regenerate them, install emscripten 3.1.9-asserts and binutils 2.38, then run the following commands:
10
+
11
+ ```sh
12
+ source emsdk/emsdk_env.sh
13
+ rm -rf build
14
+ mkdir build
15
+ cd build
16
+ SFLAGS="-Os -flto -sENVIRONMENT=web -sMODULARIZE -sEXPORTED_RUNTIME_METHODS=['FS']"
17
+ emconfigure ../configure \
18
+ --host=wasm32 \
19
+ --target=arm-none-eabi \
20
+ --disable-libstdcxx \
21
+ --enable-compressed-debug-sections=none \
22
+ --disable-nls \
23
+ --disable-largefile \
24
+ CFLAGS="$SFLAGS" CXXFLAGS="$SFLAGS"
25
+ emmake make
26
+ ```
27
+
28
+ Note that these two web assembly modules can be re-used separately, and the rest of the code communicates with them using command-line arguments. They are therefore included here as a [mere aggregate](https://www.gnu.org/licenses/gpl-faq.html#MereAggregation) and the GNU GPL license subsequently does *not* apply to the rest of the provided files.
package/bin/nwlink CHANGED
@@ -1,7 +1,3 @@
1
1
  #!/usr/bin/env node
2
- const program = require('../index.js')
3
-
4
- program.parseAsync(process.argv).catch(error => {
5
- console.error(error.stack)
6
- process.exit(1)
7
- })
2
+ const cli = require('../dist/index.js')
3
+ cli(process.argv)