start-babel

raw JSON →
3.0.0 verified Sat Apr 25 auth: no javascript maintenance

Babel task for the Start task runner. Current stable version is 3.0.0 (released 2017-01-07). It integrates Babel transpilation into Start pipelines, supporting SourceMaps and configurable Babel options. Key differentiator: it operates on `[{ path, data, map }]` streams, making it compatible with Start's file-based flow. For newer Node versions, Babel 7+, or non-Start setups, consider using core Babel APIs or other runners like Gulp or Webpack.

error Error: Cannot find module 'start'
cause start (task runner) is required as a peer dependency and not installed.
fix
Install start: npm install --save-dev start
error TypeError: (0 , _startBabel.default) is not a function
cause Using named import `import { babel }` instead of default import.
fix
Use import babel from 'start-babel' instead of import { babel }.
error TypeError: startBabel is not a function
cause Namespace import used without calling `.default`.
fix
Use import babel from 'start-babel' or call startBabel.default(options).
error Error: Input data must be an array of objects with { path, data, map }
cause Using an older task (e.g., start-read prior to v2) that emits raw buffers.
fix
Update all tasks to versions that emit the required object format, or patch the data.
error Error: unknown: Unexpected token (1:0)
cause Babel cannot parse the file; often due to missing Babel presets/plugins.
fix
Install and configure Babel presets (e.g., babel-preset-env) in a .babelrc or babel.config.js.
breaking Input data format changed in v2.0.0: now expects `[{ path, data, map }]` instead of raw file buffers.
fix Ensure upstream tasks (e.g., start-read) provide objects with `path`, `data`, `map` properties.
breaking Dropped Node < 4 in v3.0.0; also switched to `babel-preset-start` and removed `babel-runtime` dependency.
fix Use Node >= 4. If you need babel-runtime, add it as a direct dependency.
deprecated This package is not actively maintained; last release was 2017. Babel 7+ and new Start versions may cause incompatibility.
fix Consider migrating to direct Babel usage or an actively maintained build tool.
gotcha ESM-only since v3.0.0; CommonJS require may fail if not transpiled or if Node version lacks ESM support.
fix Use ES module import syntax, or use a bundler/transpiler that understands ESM.
gotcha Default Babel options set `{ ast: false }`. If you need AST in output, you must explicitly override.
fix Pass `ast: true` in the options object to babel() if you require the AST.
npm install start-babel
yarn add start-babel
pnpm add start-babel

Shows a basic build pipeline using start-babel: clean target, read source files, transpile with source maps, write output.

import Start from 'start';
import reporter from 'start-pretty-reporter';
import files from 'start-files';
import clean from 'start-clean';
import read from 'start-read';
import babel from 'start-babel';
import write from 'start-write';

const start = Start(reporter());

export const build = () => start(
  files('build/'),
  clean(),
  files('src/**/*.js'),
  read(),
  babel({ sourceMaps: true }),
  write('build/')
);