ahsi
v0.0.16
Published
Crash Javascript library example program.
Maintainers
Readme
Ahsi
An hello world to show how to write a program using the Crash JavaScript and the Crash Bash libraries together to write a program which runs both in node.js and in a browser console.
# In the terminal
ahsi \
-p \
"node" \
"hello" \
"mars"
# In the browser
ahsi \
-p \
"browser" \
"hello" \
"venus"When run in the browser the program
input parameters (in this case
target_message and target_planet)
are retrieved from the url.
The Crash Javascript library
dynamically calls either the
fs node module or the
happy-opfs
so file system functions seamlessly
work on browsers and Node.js.
Depending on how your Node.js installation
is configured,
node-run
may need to be used to run the javascript
files directly.
Upon installation manual can be accessed with
$ man \
"ahsi"How does it work
At build time the 'ahsi' node module is bundled
with its dependencies into ahsi.js by
webpack \
--mode \
"production"it can be run in a browser by
accessing the index.html file
after running a web server on
the directory.
So for example on localhost:3000 with Serve:
$ serve \
"$(pwd)"This library is being used by most of Human Instrumentality Project (HIP) JavaScript programs.
Installation
The program in this source repo can be installed from source without any extra dependencies using GNU Make
$ make \
all
# make \
install-npmIf you do not wish to install browser compatibility you can simply run instead
# make \
installThe node module can also be installed from the NPM Registry
npm \
install \
"ahsi"or from the uncensorable Ur user repository and application store. The source code is published on the Ethereum Virtual Machine File System so it can't possibly be taken down.
To install it from there just type
ur \
ahsiA censorable HTTP Github mirror of the recipe published there is hosted on ahsi-ur. Be aware it could go offline any time.
License
Ahsi is released by Pellegrino Prevete under the terms of the GNU Affero General Public License version 3.
