Registry / devops / js-transpiler

js-transpiler

JSON →
library0.0.5jsnpmunverified

A simple Gulp-based automation script for transpiling ES6 JavaScript to ES5 using Babel, with optional linting via ESLint (airbnb-base config). Copies JS files from source to destination, transpiles files that have an `/* eslint-env es6 */` header. Version 0.0.5, last release 2017. No longer actively maintained. Key differentiators: minimal configuration, RequireJS AMD module support, and file-level ES6 detection. Alternatives: direct use of Babel CLI or Webpack.

npm install js-transpiler
INSTALL
IMPORT
SIG · JS-TRANSPILER
J
js-transpiler
devopsjavascriptv0.0.5
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 transpiler = require('js-transpiler');
import transpiler from 'js-transpiler';
CommonJS only; no ESM support.
run
const { run } = require('js-transpiler');
Also available as default.run or as named export.
default
import * as transpiler from 'js-transpiler'; transpiler.run(...)
import transpiler from 'js-transpiler';
Default import does not work; use namespace import in TypeScript.

Basic example: copies all JS files from src to dist, transpiling those with /* eslint-env es6 */ header using Babel presets 'env', no linting.

const transpiler = require('js-transpiler'); transpiler.run({ path: { src: './src/**/*.js', dest: './dist' }, useBabel: true, babelrc: { presets: ['env'] }, useLint: false }); // Then run: gulp
Debug
Known issues
deprecatedPackage unmaintained since 2017. Not compatible with modern Babel (>=7) or ESLint (>=6).
fix
Use Babel CLI directly or update to a maintained alternative.
affects: >=0.0.0
gotchaOnly transpiles files with `/* eslint-env es6 */` comment (first line). Other files are copied as-is.
fix
Ensure all ES6 files start with the magic comment, or set `es6Pattern` option to a RegExp that matches.
affects: >=0.0.0
breakingRequires Node >=7, but not tested on Node 10+. May fail due to deprecated Babel 6 APIs.
fix
Upgrade package or use Node 8/9 LTS.
affects: >=0.0.0
gotchaBabel presets and plugins must be installed globally or locally; no automatic installation.
fix
Run `npm install babel-preset-env` (or desired preset) before use.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-preset-env'
Missing Babel preset dependency.
fix
Run `npm install --save-dev babel-preset-env`.
TypeError: gulp.src(...).pipe is not a function
Gulp v4 breaking change (stream-based instead of callback).
fix
Use Gulp v3 (`npm install gulp@^3.9.1`) or switch to another tool.
Error: ESLint configuration is invalid
Outdated eslint-config-airbnb-base version or missing plugins.
fix
Install compatible eslint and plugins: `npm install eslint@^4.0.0 eslint-config-airbnb-base@^12.0.0`.
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies
gulprequiredOrchestrates file copying, transpilation, and linting tasks
babel-corerequiredRequired for ES6 to ES5 transpilation
eslintoptionalOptional linting capability
eslint-config-airbnb-baseoptionalLinting rules used when lint is enabled
Agent activity
4 hits · last 30 days
node
4
Resources
js-transpiler — npm install js-transpiler · libregistry