Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaitai-io/kaitai_struct_loader
Webpack loader for kaitai-struct .ksy definitions
https://github.com/kaitai-io/kaitai_struct_loader
binary kaitai-struct webpack-loader webpack2
Last synced: 2 days ago
JSON representation
Webpack loader for kaitai-struct .ksy definitions
- Host: GitHub
- URL: https://github.com/kaitai-io/kaitai_struct_loader
- Owner: kaitai-io
- License: mit
- Created: 2017-07-21T18:13:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T09:00:51.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T21:42:17.960Z (9 days ago)
- Topics: binary, kaitai-struct, webpack-loader, webpack2
- Language: JavaScript
- Size: 452 KB
- Stars: 7
- Watchers: 7
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kaitai - Repository - io/kaitai_struct_loader/issues)) (Runtimes / CI)
README
# Kaitai Struct loader for webpack
[![npm](https://img.shields.io/npm/v/kaitai-struct-loader)](https://www.npmjs.com/package/kaitai-struct-loader)
This [webpack loader](https://webpack.js.org/concepts/loaders/) adds support for [Kaitai Struct](https://kaitai.io) .ksy definitions.
## Installation
```sh
yarn add --dev kaitai-struct-loader
```## Usage
file.js
```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](https://formats.kaitai.io/doom_wad/).*webpack.config.js
```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](https://github.com/kaitai-io/kaitai_struct/issues/332) for more info) |