Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

luisfarzati/express-babelify-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-babelify-middleware

NPM version NPM downloads Dependencies status MIT license Donations

Browserify + Babelify middleware for super-fast ES6+ development.

About

This is a thin wrapper of browserify-middleware which lets you serve browserified files on the fly, quickly and setupless. There are other Babel-related middlewares but they all rely on gulp, watch, or similar approaches. I wanted to begin coding right away and worry about the build later.

Install

npm install express-babelify-middleware

Usage

babelify(entries, [browserifyOptions], [babelifyOptions])

import babelify from 'express-babelify-middleware'
import express from 'express'

var app = express()

app.use('/app.js', babelify('public/app.js'))

app.use(express.static('public'))

Depending your project structure, notice that you may need to put babelify before the static middleware.

Credits

Thanks to ForbesLindesay for his browserify-middleware.

License

MIT

About

Start developing ES6 in the browser right away, without any build setup

Resources

License

Stars

Watchers

Forks

Packages

No packages published