GithubHelp home page GithubHelp logo

sindresorhus / gulp-esnext Goto Github PK

View Code? Open in Web Editor NEW
24.0 5.0 4.0 20 KB

[DEPRECATED] Transform next-generation JavaScript to today's JavaScript

License: MIT License

JavaScript 100.00%
gulp-plugin esnext javascript nodejs transpiler

gulp-esnext's Introduction

Deprecated

Deprecated because the esnext project is no longer maintained.


gulp-esnext Build Status

Transform next-generation JavaScript to today's JavaScript with esnext

Issues with the output should be reported on the esnext issue tracker.

Install

$ npm install --save-dev gulp-esnext

Usage

var gulp = require('gulp');
var esnext = require('gulp-esnext');

gulp.task('default', function () {
	return gulp.src('src/app.js')
		.pipe(esnext())
		.pipe(gulp.dest('dist'));
});

API

esnext(options)

options

Options are passed through to esnext.

Source Maps

Use gulp-sourcemaps like this:

var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var esnext = require('gulp-esnext');
var concat = require('gulp-concat');

gulp.task('default', function () {
	return gulp.src('src/**/*.js')
		.pipe(sourcemaps.init())
		.pipe(esnext())
		.pipe(concat('all.js'))
		.pipe(sourcemaps.write('.'))
		.pipe(gulp.dest('dist'));
});

License

MIT ยฉ Sindre Sorhus

gulp-esnext's People

Contributors

christophehurpeau avatar mathiasbynens avatar shinnn avatar sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gulp-esnext's Issues

can't install

When I run "npm install gulp-esnext --save-dev" I get errors when it tries to install esprima. Everything else installs fine up to that point.

npm ERR! git clone git://github.com/esnext/esprima Cloning into bare repository
'C:\Users\volkmam\AppData\Roaming\npm-cache_git-remotes\git-github-com-esnext-esprima-2c9f7b2b'...
npm ERR! git clone git://github.com/esnext/esprima
npm ERR! git clone git://github.com/esnext/esprima fatal: unable to connect to github.com:
npm ERR! git clone git://github.com/esnext/esprima github.com[0: 192.30.252.131]: errno=No error
npm ERR! Error: Command failed: fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.131]: errno=No error

The `fixture.js.map` test is never reached

gulp-esnext/test.js

Lines 9 to 18 in 5b99457

stream.on('data', function (file) {
if (/\.map$/.test(file.path)) {
assert(/\"version":3/.test(file.contents.toString()));
assert.equal(file.relative, 'fixture.js.map');
return;
}
assert(/function/.test(file.contents.toString()));
assert.equal(file.relative, 'fixture.js');
})

Error: no writecb in Transform class

I'm not sure what this error means but a quick google led me to rvagg/through2#1 โ€” which seems to suggest it's a problem with either your dependencies or your error handling. I'm thinking error handling because it only happens when esnext has an error (which isn't actually logged, but I can generally solve with some guesswork and the jshint output)

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: no writecb in Transform class
    at afterTransform (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:95:33)
    at TransformState.afterTransform (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
    at DestroyableTransform._transform (/Users/plejeck/Code/kana/node_modules/gulp-esnext/index.js:40:4)
    at DestroyableTransform.Transform._read (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (/Users/plejeck/Code/kana/node_modules/gulp-esnext/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (/Users/plejeck/Code/kana/node_modules/gulp-if/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/Users/plejeck/Code/kana/node_modules/gulp-if/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.