npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sjs-nodejs

v2.0.0

Published

npm helper to bootstrap sbt and link Scala.js (Scala 3) to JavaScript

Readme

sjs-nodejs

npm helper to bootstrap sbt and link Scala.js (Scala 3) projects to JavaScript. Scala.js compiles through sbt; this package downloads sbt into node_modules and exposes npm scripts for common link and run tasks.

Published on npm: sjs-nodejs

Requirements: Node.js 18+

Recommended versions (v2.x)

| Tool | Version | |------------|---------| | sbt | 1.10.7 | | Scala | 3.5.2 | | Scala.js | 1.21.0 |

Install

In your Scala.js project:

npm install sjs-nodejs

Use locally

To try changes in this repo from another Scala.js project without publishing to npm.

Option 1: npm link

In this repository:

cd /path/to/sjs-nodejs
npm install
npm link

In your Scala.js app:

cd /path/to/your-scalajs-app
npm link sjs-nodejs

Your app’s node_modules/sjs-nodejs now points at your local clone. Re-run npm link sjs-nodejs after pulling changes if behavior looks stale.

To unlink later:

cd /path/to/your-scalajs-app
npm unlink sjs-nodejs
npm install sjs-nodejs   # restore the published package, if needed

Option 2: install from a path

In your Scala.js app:

npm install /path/to/sjs-nodejs
# or, relative path:
npm install ../sjs-nodejs

package.json will record a file: dependency (for example "sjs-nodejs": "file:../sjs-nodejs").

Scripts in the consuming project

Whichever option you use, add the same scripts to your app’s package.json so npm can find sbt and this package:

{
  "scripts": {
    "sbtInit": "node node_modules/sjs-nodejs/index.js",
    "sjsBuild": "npm run sbtInit && node_modules/sbt/bin/sbt fastLinkJS",
    "sjsBuildFull": "npm run sbtInit && node_modules/sbt/bin/sbt fullLinkJS",
    "sjs": "node_modules/sbt/bin/sbt run"
  }
}

Then from your app directory:

npm run sjsBuild

npm scripts

Add these to your project's package.json (or rely on the same script names if you copy them from this package):

| Script | Command | Description | |----------------|----------------------|--------------------------------------| | sbtInit | downloads & unpacks sbt | Run once (also run by build scripts) | | sjsBuild | fastLinkJS | Fast development link | | sjsBuildFull | fullLinkJS | Full optimizations for production | | sjs | run | Run the Scala.js app via sbt |

Example:

npm run sjsBuild      # fast link
npm run sjsBuildFull  # optimized link
npm run sjs           # run

sbt setup (Scala 3)

project/plugins.sbt

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.21.0")

build.sbt

lazy val root = project
  .in(file("."))
  .enablePlugins(ScalaJSPlugin)
  .settings(
    scalaVersion := "3.5.2",
    scalaJSUseMainModuleInitializer := true,
  )

project/build.properties

sbt.version=1.10.7

Breaking changes in v2.0.0

  • Targets Scala 3 and Scala.js 1.x (not Scala 2.12 / Scala.js 0.6).
  • Build tasks renamed: fastOptJSfastLinkJS, fullOptJSfullLinkJS.
  • Bundled sbt upgraded from 1.0.1 to 1.10.7.

Example project

https://github.com/devasthali-os/introv.scalajs

Publishing

Maintainers: see docs/publishing.md for logging in to npm, pre-publish checks, npm publish, and verification on npmjs.com.

Repository

https://github.com/devasthali-os/sjs-nodejs