Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

ipjs

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipjs

Universal JavaScript build and packaging system


Version published
Weekly downloads
72
increased by414.29%
Maintainers
1
Weekly downloads
 
Created
Source

Universal JavaScript Build and Packaging

This is a toolchain for the next phase of JavaScript development. It enables developers to write JavaScript modules in ESM that work universally across many environments (Node.js import, Node.js require, Browser, Deno, etc).

You start by just writing a standard ESM module. You'll need to include "type": "module" in your package.json, as well as a "main" entry point or an export map.

npx ipjs build

This will build a package in the dist directory that has different versions of your files compiled for different environments and a new package.json file that exposes all of these files to the correct Node.js and compiler entry points.

That's it ;)

You can also compile your tests.

npx ipjs build --tests

Note: You'll need to use "named self imports", import mymodule from "mymodule", in your tests so that we can compile different CJS versions of those tests for Node.js and the browser.

You can publish to by either running npm publish in the dist directory or using:

npx ipjs publish

Requirements

There's a few Node.js and ESM features you need to stick to using and a few you need to avoid. Some are because there just isn't a very good way to provide consistent representations and some are because we need some more explicit information about your library in order to detect the dependency tree and built it successfully.

Do not use mixed default default and named exports/imports

Only export individual files in export map (no directories or pattern matching)

FAQs

Package last updated on 29 Jan 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc