2.3.6 • Published 16 days ago

np-pack-cli v2.3.6

Weekly downloads
3
License
ISC
Repository
github
Last release
16 days ago

自用 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);
2.3.6

16 days ago

2.3.2

7 months ago

2.3.1

7 months ago

2.3.4

6 months ago

2.3.3

7 months ago

2.3.5

5 months ago

2.3.0

8 months ago

2.2.5

12 months ago

2.2.7

12 months ago

2.2.8

12 months ago

2.2.1

1 year ago

2.2.0

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.2.4

1 year ago

2.0.8

2 years ago

2.1.0

2 years ago

2.0.5

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.0.0-alpha.22

2 years ago

2.0.0-alpha.3

2 years ago

2.0.0-alpha.21

2 years ago

2.0.0-alpha.4

2 years ago

2.0.0-alpha.20

2 years ago

2.0.0-alpha.1

2 years ago

2.0.0-alpha.2

2 years ago

2.0.0-alpha.25

2 years ago

2.0.0-alpha.24

2 years ago

2.0.0-alpha.23

2 years ago

1.1.1

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago