Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 745 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 745 Bytes

inklecate-loader

Introduction

A tiny loader for webpack which asynchronously calls the inklecate package, compiling Ink source into JavaScript.

Installation

npm i -D inklecate-loader

Usage

{
  test: /\.ink$/,
  use: require.resolve('inklecate-loader'),
  options: {
    /* Optional, defaults to true. false calls the inklecate binaries. */
    wasm: true,
  },
}

Output

/* The story object, to be passed to inkjs or etc. */
export const storyContent = { ... };

/* The original source code. */
export const text = '...';

/* Any warnings output by the compiler. */
export const compilerOutput = [
  'WARNING: Foo bar baz!',
  ...
];