Registry / web-framework / babel-plugin-twine

babel-plugin-twine

JSON →
library1.0.1jsnpmunverified

Babel plugin for transpiling Twine markup (interactive fiction/storytelling format) into React components. Version 1.0.1. This plugin integrates with Babel to process .twine or custom twine files in your build pipeline, emitting JSX. No other babel twine plugins exist; it is experimental with minimal documentation. Not actively maintained; last update unknown.

npm install babel-plugin-twine
INSTALL
IMPORT
SIG · BABEL-PLUGIN-TWINE
B
babel-plugin-twine
web-frameworkjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import twinePlugin from 'babel-plugin-twine'
const twinePlugin = require('babel-plugin-twine')
Package lacks type definitions; likely CommonJS but ES import may work depending on bundler. Use require for safety.
babel config usage
module.exports = { plugins: ['twine'] }
module.exports = { plugins: ['babel-plugin-twine'] }
Babel resolves plugin names without the babel-plugin- prefix.
with custom options
module.exports = { plugins: [['twine', { option: true }]] }
module.exports = { plugins: ['twine', { option: true }] }
Options must be in an array: ['plugin', options].

Shows how to install and configure the babel plugin in a Babel config file.

// Install: npm install babel-plugin-twine --save-dev // In your babel config (e.g., babel.config.js): module.exports = { plugins: ['twine'] }; // Then in your code, import a twine file (assuming custom loader or webpack): import story from './story.twine'; // The plugin transforms the twine markup into React components. // Note: This example assumes a custom loader; twine files are not standard JS.
Debug
Known issues
deprecatedPackage is archived or unmaintained; no updates since initial release.
fix
Consider forking or using an alternative like t3js or custom twine parser.
affects: >=1.0.0
breakingRequires specific Babel version compatibility; may break with Babel 7+.
fix
Check peer dependencies; likely works with Babel 6 only.
affects: >=1.0.0
gotchaNo TypeScript definitions or webpack loader included; integration requires manual setup.
fix
Create a custom webpack loader for .twine files.
affects: >=1.0.0
Errors
Common errors & fixes
Module not found: Can't resolve 'babel-plugin-twine'
Package not installed correctly or missing from node_modules.
fix
Run npm install babel-plugin-twine --save-dev or check package.json.
Error: Cannot find module 'babel-plugin-twine' from '/path/to/project'
Babel cannot locate the plugin; it's not in node_modules or name mismatch.
fix
Ensure npm install completed. Use 'twine' (without babel-plugin- prefix) in plugins array.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
babel-plugin-twine — npm install babel-plugin-twine · libregistry