
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
DIY asset server. Serves HTML, CSS and JS as streams. Sets proper
Content-Type
encodings and buffers where possible for sub-milisecond response
times in production and development.
$ npm install bankai
const browserify = require('browserify')
const bankai = require('bankai')
const http = require('http')
const path = require('path')
const client = path.join(__dirname, 'client.js')
const assets = bankai()
const js = assets.js(browserify, client)
const html = assets.html()
const css = assets.css()
http.createServer((req, res) => {
switch req.url {
case '/': return html(req, res).pipe(res)
case '/bundle.js': return js(req, res).pipe(res)
case '/bundle.css': return css(req, res).pipe(res)
default: return res.statusCode = 404 && res.end('404 not found')
}
}).listen(8080)
false
. Disable livereload scripts, cache output and
optimize all bundles.Return an html
stream. Takes the following options:
js
entry point. Defaults to /bundle.js
css
entry point. Defaults to /bundle.css
Return a css
stream using sheetify.
. Takes the following options:
process.cwd()
Return a js
stream. src
is the bundle entry file. opts
are passed
directly to browserify
$ node ./bin/ --help
DIY asset server
Usage
$ bankai <command> [options]
Commands
start Start a bankai server
Options
-e, --entry=<id> Resolve <id> from cwd and use as entry module [default: .]
Entry module is expected to export `() -> app`
-p, --port=<n> Bind bankai to <n> [default: 1337]
-o, --optimize Optimize the page and all assets served by bankai [default: false]
-b, --browse=<app> Browse the page served by bankai with <app> [default: false]
--html.entry=<uri> Serve client js at <uri> [default: bundle.js]
--html.css=<uri> Serve client css at <uri> [default: bundle.css]
--html.favicon Disable favicon [default: true]
--html.title Title to use for page
--html.lang Lang attribute to use [default: en]
--css.use sheetify plugins to use
--js.<opt>=<value> Pass key <opt> with <value> to browserify
Examples
$ bankai start
Started bankai for index.js on http://localhost:1337
$ bankai start --entry=basic
Started bankai fro basic/index.js on http://localhost:1337
$ bankai start --port=3000
Started bankai for index.js on http://localhost:3000
$ bankai start --open
Started bankai for index.js on http://localhost:1337
Opening http://localhost:1337 with default browser
$ bankai start --open Safari
Started bankai for index.js on http://localhost:1337
Opening http://localhost:1337 with system browser
$ bankai start --html.title bankai
Started bankai for index.js on http://localhost:1337
$ bankai start --css.use sheetify-cssnext
Started bankai for index.js on http://localhost:1337
$ bankai start --js.fullPaths=false
Projects showing exemplary usage are provided. Install root project dependencies,
example project dependencies and execute npm start
to start an example.
FAQs
The easiest way to compile JavaScript, HTML and CSS
The npm package bankai receives a total of 51 weekly downloads. As such, bankai popularity was classified as not popular.
We found that bankai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 28 open source maintainers 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.