Registry / web-framework / babel-preset-jsy

babel-preset-jsy

JSON →
library0.15.3jsnpmunverified

Babel preset for JSY, an indentation-based (offside) JavaScript syntax dialect that uses Python-like indentation instead of braces. This preset builds on babel-preset-env and supports Babel 6.x. It compiles JSY into standard JavaScript with automatic transpilation based on environment. The latest version is 0.15.3, with maintenance updates as needed. Unlike other indentation-based syntaxes such as CoffeeScript or LiveScript, JSY aims to stay close to standard JavaScript semantics while providing clean, whitespace-sensitive code. Current status is maintenance as JSY has limited adoption.

npm install babel-preset-jsy
INSTALL
IMPORT
SIG · BABEL-PRESET-JSY
B
babel-preset-jsy
web-frameworkjavascriptv0.15.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

jsy
module.exports = { presets: ['jsy/lean'] }
import { jsy } from 'babel-preset-jsy'
This is a Babel preset, not a JavaScript module. Use the preset name in Babel configuration as a string. 'jsy/lean' refers to a preset file inside the package.
babel-preset-jsy
const presets = ['babel-preset-jsy']
require('babel-preset-jsy')
In Babel 6, presets are specified as strings in .babelrc or babel config. Doing 'require' returns an object, but Babel expects a function.
jsy/lean
const presets = ['jsy/lean']
The 'jsy/lean' preset is a variant that only transforms JSY syntax without additional polyfills or env targets.

Configures Babel with the jsy/lean preset and shows a sample JSY code snippet using indentation instead of braces.

// Install: npm install --save-dev babel-preset-jsy // .babelrc configuration: { "presets": ["jsy/lean"] } // Example JSY code (file.jsy) // Indentation-based syntax const add = (a, b) => a + b for (let i = 0; i < 10; i++) console.log(i) if (true) console.log('true') else console.log('false') // Compile with: babel file.jsy
Debug
Known issues
deprecatedThis package is designed for Babel 6.x and may not work with Babel 7+.
fix
For Babel 7, consider using babel-plugin-jsy directly or look for updated presets.
affects: >=0.0.0
breakingVersion 0.10.0 changed the preset name from 'jsy' to 'jsy/lean'.
fix
Update your .babelrc: change "presets": ["jsy"] to "presets": ["jsy/lean"].
affects: >=0.10.0 <0.11.0
gotchaJSY syntax may conflict with standard JavaScript when used in mixed codebases.
fix
Use file extensions like .jsy or configure Babel to only transform JSY files if possible.
affects: >=0.0.0
gotchaCannot use both JSY and standard JavaScript in the same file without explicit transformation.
fix
Use babel-plugin-jsy with proper configuration to handle mixed syntax, or separate files.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Requires Babel "^6.0.0-0" but was loaded with "7.x.x".
Using babel-preset-jsy with Babel 7 or later.
fix
Upgrade to a Babel 7 compatible preset or downgrade Babel to version 6.
Error: Cannot find module 'babel-preset-jsy/lean'
Incorrect path in preset configuration.
fix
Change preset to 'babel-preset-jsy/lean' or 'jsy/lean' depending on your setup.
SyntaxError: Unexpected token (1:6) - using indentation
Babel not configured to use the JSY preset.
fix
Add 'jsy/lean' to presets in your Babel config.
Upgrade
Version history
0.15.3latest on npm
Audit
Dependencies
babel-preset-envrequiredCore dependency for automatic target environment transpilation
babel-plugin-jsyrequiredPlugin that transforms JSY indentation-based syntax to standard JavaScript
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
babel-preset-jsy — npm install babel-preset-jsy · libregistry