Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
basisjs-tools
Advanced tools
Developer tools for basis.js framework.
With npm
$ npm install basisjs-tools
After that basis
should be available in command line.
NOTE: If you are on Windows make sure path/to/nodejs/node_modules/.bin
is presented in PATH
Basis tries to find and use basis.config
file by default. It attempts to find basis.config
at the current working directory. If it is not found there, then it moves to the parent directory, and so on, until the root of the tree is reached.
If basis.config
found, it's content parses as json
. This file should contains a javascript object, where key is command name and value is setting for this command. Actually file can contains empty object, and it's not required specify setting for all commands.
basis.config
file and it's directory using as relative point for path resolving, for cases when other is not defined. Most properties treats as corresponding command flags, and could be overridden by flags in command line.
Any command's flag could be put in config, as it's long name. If name contains -
(dash) it should be camelize, i.e. --css-pack
becomes cssPack
. If flag contains '-no-', it must be ignored, i.e. --js-no-single-file
becomes jsSingleFile
.
You can disable basis.config
usage by -n (--no-config) flag or specify your own file with -c (--config-file) argument.
Config file useful to set up command's defaults values.
Example of basis.config
at /path/to/config
:
{
"build": {
"file": "app.html",
"output": "build"
},
"server": {
"port": 8123
}
}
With this basis.config
no difference at what directory you run basis build
- /path/to/config/app.html
will be built and result will be at /path/to/config/output
directory. But you still able to override settings, for example, if you run basis build -o temp
at /path/to/config/foo/bar
- /path/to/config/app.html
will be built and result will be at /path/to/config/foo/bar/output
.
Use basis --help
for more help.
Basis works with many various paths, and often it is relative paths. There are two general rules for relative path resolving.
if path defined in config file (basis.config
) it resolves to config file directory
if path defined in command line it resolves to current working directory
Server is a lightweight http server, which allow you run basis.js
apps locally. Use follow command to launch server:
$ basis server
After that current folder become a base for path resolving (you can change it using --base
flag). You also can set listening port with --port
flag.
Server caches files you access for and inject it into html page (via window.__resources__
) when send it to client. This approach speeds up loading of page with many files.
Also it watches for files changes and send new file content to client if neccessary (using socket.io
and basis.js
infrastructure). When you use server
you don't need to refresh page when you change .tmpl
, .css
or l10n (.json
) files.
For more help use:
$ basis server --help
Builder makes a build version of your app. Use follow command on certain path:
$ basis build
Builder search for index
file (index.html
in current folder by default, but use can use --file
flag to specify file) and use it as start point. It scan files and search for linked files, processing it and put result in build
folder. As a result you get all used by application files in one folder.
Optionally builder may merge, optimize, pack etc. Use --help
option to get more info:
$ basis build --help
Dual licensed under the MIT or GPL Version 2 licenses.
FAQs
Developer tools for basis.js framework
We found that basisjs-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.