Registry / devops / tolk
library2.0.0jsnpmunverified

Tolk is a file reader that automatically transpiles files with available transpilers, inlines sourcemaps, and autoprefixes CSS. It uses a zero-dependency approach for transpilers, requiring users to install them separately (e.g., node-sass, babel). The current stable version is 2.0.0. It supports multiple precompilers including LiveScript, Babel, CoffeeScript, Less, Stylus, and more. Key differentiator: no bundled transpiler dependencies, allowing users to choose and install only what they need.

npm install tolk
INSTALL
IMPORT
SIG · TOLK
T
tolk
devopsjavascriptv2.0.0
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
const tolk = require('tolk');
import tolk from 'tolk';
Package uses CommonJS; no ES module export.
read
tolk.read('file.scss').then(...)
tolk.readFile('file.scss')
Method is `read`, not `readFile`.
read
tolk.read('file.jsx').done(...)
tolk.read('file.jsx', callback)
Returns a promise-like object with `.done()` method; does not accept Node-style callbacks.

Reads a SCSS file, transpiles with installed transpiler, and logs the resulting CSS.

const tolk = require('tolk'); const path = require('path'); // Ensure you have a transpiler installed, e.g., node-sass // npm install node-sass --save-dev tolk.read(path.join(__dirname, 'styles.scss')).then(compiled => { console.log(compiled.result); // Compiled CSS }).catch(err => { console.error('Transpilation failed:', err.message); });
tolk --version
Debug
Known issues
gotchaNo built-in transpilers: you must install them separately.
fix
Install required transpilers, e.g., `npm install babel` for ES6/JSX support.
affects: >=1.0.0
breakingPromise interface: uses `.done()` instead of standard `.then()` and `.catch()`.
fix
Use `.done(success, fail)` or replace with `.then(success, fail)` after wrapping.
affects: >=1.0.0
deprecatedPackage has not been updated since 2016; no support for modern tooling.
fix
Consider alternatives like gulp-sass or webpack loaders.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: tolk.read(...).done is not a function
Tolk returns a promise-like object with `.done()` method; if you try to use `.then()`, it may fail if not chained correctly.
fix
Use `.done()` instead of `.then()`, or call `.then()` on the returned object.
Error: Cannot find module 'tolk'
Tolk is not installed, or installed globally instead of locally.
fix
Run `npm install tolk` in your project directory.
Error: No transpiler found for file extension '.jsx'
Required transpiler (e.g., babel) is not installed.
fix
Install the transpiler: `npm install babel`.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
tolk — npm install tolk · libregistry