kaitai-struct-loader

0.9.0 • Public • Published

Kaitai Struct loader for webpack

This webpack loader adds support for Kaitai Struct .ksy definitions.

Installation

yarn add --dev kaitai-struct-loader

Usage

file.js

import KaitaiStream from 'kaitai-struct/KaitaiStream';
import DoomWAD from './game/doom_wad.ksy';
 
const stream = new KaitaiStream(arrayBuffer);
const data = new DoomWAD(stream);

The specification of the Doom .wad format can be found in the format gallery.

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.ksy$/,
        use: [{
          loader: 'kaitai-struct-loader',
          // options: { debug: true },
        }],
      },
    ]
  }
}

Options

Name Type Default Description
debug {boolean} false Compile .ksy files in --debug mode
(see #332 for more info)

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i kaitai-struct-loader

    Weekly Downloads

    6

    Version

    0.9.0

    License

    MIT

    Unpacked Size

    5.02 kB

    Total Files

    8

    Last publish

    Collaborators

    • kaitai-bot
    • generalmimon
    • greycat_na_kor
    • koczkatamas
    • ccl