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

np-pack-cli

Package Overview
Dependencies
Maintainers
0
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

np-pack-cli

latest
Source
npmnpm
Version
2.5.1
Version published
Maintainers
0
Created
Source

自用 pack

js/ts/vue/images/wasm

Examples:
 pack ./somePath/index.ts
 pack ./somePath/index.ts --html
 pack ./somePath/index.ts -o ./dist/file.html
 pack ./somePath/index.ts -o ./dist/[name].[chunkhash].js
 pack ./somePath/index.ts -o ./dist/[name].[chunkhash].js --analyze


Usage: pack [options]

Options:
  -s, --source <src>         source file path
  -o, --output <output>      output file path (default: "./.temp/[name].[chunkhash].js")
  -w, --watch                watch (default: false)
  --polyfill                 use polyfill (default: false)
  --html [port]              preview in html without output. default port: 9999 (default: false)
  --analyze                  use webpack-bundle-analyzer (default: false)
  --target <target>          target (default: "web")
  --mode <mode>              mode (default: "development")
  --alias <alias>            resolve.alias (default: "")
  --extensions <extensions>  extensions with url-loader, --extensions .wav,.mp3  (default: ".wav,.mp3")
  --files <files>            extensions with file-loader, --files .node  (default: ".node")
  --raw <raw>                extensions with raw-loader, --raw .txt,.md  (default: ".txt,.md")
  --sourcemap <sourcemap>    sourcemap, default@development:cheap-module-eval-source-map; @production:'' (default:"auto")
  -h, --help                 output usage information

asm(ts)/wasm

asm-loader: ts to wasm wasm-loader: wasm buffer to promise

add.asm

export function add(a: i32, b: i32): i32 {
  return a + b;
}

entry.js

import mod from './add.asm';
//import mod from './add.wasm';
mod().then(({ exports: { add } }) => {
  console.log(add(3, 4));
});

or

import { get } from './fib.asm';

const fib = await get('fib');
fib?.(40);

FAQs

Package last updated on 11 Feb 2025

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