Skip to content

A webpack loader to convert .ink files into compiled story JSON, using the official inklecate binaries.

Notifications You must be signed in to change notification settings

furkleindustries/inklecate-loader

Repository files navigation

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, include inklecate compiler options here */
  },
}

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!',
  ...
];

About

A webpack loader to convert .ink files into compiled story JSON, using the official inklecate binaries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published