New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jetpp-wasm

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jetpp-wasm

[![Build Status](https://travis-ci.com/vincentdchan/jetpack.js.svg?branch=master)](https://travis-ci.com/vincentdchan/jetpack.js) [![npm version](https://img.shields.io/npm/v/jetpp.svg)](https://www.npmjs.com/package/jetpp)

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Jetpack.js

Build Status npm version

| 中文版 | WASM Online Demo

jetpack.js is an extremely fast js bundler and minifier written in C++.

Features

Parser

  • Can be used standalone
  • Implemented in C++ with excellent performance
  • Full support for ECMAScript 2017(ECMA-262 8th Edition)
  • JSON output of sensible syntax tree format as standardized by ESTree project
  • Experimental support for JSX, a syntax extension for React
  • Syntax node location (index-based and line-column)
  • Friendly error message

Bundler

  • Module resolution.
  • Bundle a ES project into a single file.
  • Scope hoisting.
  • Constant folding.
  • Minify the code.
  • Sourcemap generation

Installation & Usage

Binary Distribution

Download the binary from the release page.

Usage:

jetpack-cli --help

Node.js CLI

npm install -g jetpp

Use command line to bundle a js module.

jetpp main.js --out bundle.js

Help command:

$ jetpp --help

Jetpack command line
Usage:
  Jetpack [OPTION...] positional parameters

      --tolerant            tolerant parsing error
      --jsx                 support jsx syntax
      --library             bundle as library, do not bundle node_modules
      --help                produce help message
      --analyze-module arg  analyze a module and print result
      --no-trace            do not trace ref file when analyze module
      --minify              minify the code
      --out arg             output filename of bundle
      --sourcemap           generate sourcemaps

Node.js Program


const jetpp = require('jetpp');

console.log(jetpp.minify('let hello = "world";'));

WebAssembly User

WASM gives you the power of running Jetpack.js in the browser environment.

Install the WASM version

yarn add jetpp-wasm

Include Jetpack.js in your project


import loadJetpack from 'jetpp-wasm';

async function main(code) {
    const jetpack = await loadJetpack();
    console.log(jetpack.minify(code));  // minify
    console.log(jetpack.parse(code));  // parse
}

Platform

jetpack.js supports all popular system including:

  • macOS x64/arm64
  • Windows 64bit
  • Linux 64bit
  • WebAssembly

Build Dependencies

  • jemalloc 5.2.1
  • cxxopts
  • fmt
  • nlohmann_json
  • robin-hood-hashing 3.11.1
  • xxHash
  • boost(Header-only) 1.76

Keywords

parser

FAQs

Package last updated on 13 Sep 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