A utility for transpiling entire directories with Babel, part of the Ethical web framework. Currently at version 0.0.0 and still in pre-release. It provides a simple API to transpile all files in a directory using Babel configuration, handling recursive directory traversal and output mirroring. Different from standalone Babel CLI in that it's designed as a programmatic utility within the Ethical ecosystem, with promise-based API and tight integration with Ethical's file system utilities.
npm install ethical-utility-babel-directory-transpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to transpile all JavaScript files from a source directory to an output directory with Babel presets and plugins.
Pin to exact version and test upgrades carefully.
Use @babel/preset-env for Babel 7, or babel-preset-env for Babel 6.
Set extensions: ['.js', '.ts'] when transpiling TypeScript files (but note Babel will strip types only if preset-typescript is used).
Monitor the repository for updates.
Manually remove or clean the output directory before each build.
npm install @babel/core
Use import { transpileDirectory } from 'ethical-utility-babel-directory-transpiler'Add required presets/plugins, e.g., @babel/preset-env for modern JS
Ensure the source directory exists before calling transpileDirectory
No dependency data recorded yet.