Registry / web-framework / tracesquire

tracesquire

JSON →
library0.0.1jsnpmunverified

A minimal Node.js require hook that uses Google's Traceur compiler to transpile ES6 (ECMAScript 2015) files on-the-fly. Version 0.0.1 is a very early release with no active development. Unlike Babel or TypeScript, Traceur is now largely obsolete as a standalone transpiler. tracesquire offers a quick way to experiment with ES6 features without a build step, but is not suitable for production. The package has no dependencies.

npm install tracesquire
INSTALL
IMPORT
SIG · TRACESQUIRE
T
tracesquire
web-frameworkjavascriptv0.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.

tracesquire
import tracesquire from 'tracesquire';
const tracesquire = require('tracesquire');
The package is ESM-only, no CommonJS export.
register
import { register } from 'tracesquire';
const register = require('tracesquire').register;
Named export, must be imported as ESM.
Traceur
import { Traceur } from 'tracesquire';
const Traceur = require('tracesquire').Traceur;
Direct access to the underlying Traceur compiler is not recommended; use register instead.

Shows how to register the require hook for .es6 files and import an ES6 module using tracesquire.

import { register } from 'tracesquire'; // Register .es6 files to be transpiled register({ extensions: ['.es6'] }); // Now require any ES6 file import './app.es6'; // app.es6: // let greeting = 'Hello'; // export default greeting;
Debug
Known issues
deprecatedPackage is unmaintained and uses the obsolete Traceur compiler. Use Babel or TypeScript instead.
fix
Migrate to @babel/register or ts-node.
affects: *
breakingESM-only: Package does not export a CommonJS require() compatible interface.
fix
Use import syntax or configure your project for ESM.
affects: >=0.0.1
gotchaOnly transpiles files matching registered extensions. Default is no extension.
fix
Explicitly pass extensions option to register().
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'tracesquire'
Package not installed or not in node_modules.
fix
Run 'npm install tracesquire'.
SyntaxError: Unexpected token import
Using ES module syntax (import/export) but tracesquire is not registered for that file type.
fix
Ensure the file uses one of the registered extensions (e.g., .es6) or add the .js extension to register().
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
5
Resources
tracesquire — npm install tracesquire · libregistry