# serve-esnext

> Seamlessly run ES.Next code in the browser

Latest version **0.0.2** (published 2016-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install serve-esnext
pnpm add serve-esnext
yarn add serve-esnext
bun add serve-esnext
```

Provides the command `serve-esnext`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2016-07-22 |
| First published | 2016-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vinson Chuong |
| Maintainers | vinsonchuong |
| Keywords | esnext, es6, es2015, server |

## Links

- npm: https://www.npmjs.com/package/serve-esnext
- Repository: https://github.com/vinsonchuong/serve-esnext
- Issues: https://github.com/vinsonchuong/serve-esnext/issues
- npm.io page: https://npm.io/package/serve-esnext

## Dependencies (13)

- [parse5](https://npm.io/package/parse5.md) ^2.1.5
- [express](https://npm.io/package/express.md) ^4.14.0
- [systemjs](https://npm.io/package/systemjs.md) ^0.19.31
- [babel-core](https://npm.io/package/babel-core.md) ^6.10.4
- [esnext-async](https://npm.io/package/esnext-async.md) ^0.0.6
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.5
- [systemjs-builder](https://npm.io/package/systemjs-builder.md) ^0.15.23
- [directory-helpers](https://npm.io/package/directory-helpers.md) ^0.1.1
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.9.0
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.5.0
- [babel-plugin-transform-runtime](https://npm.io/package/babel-plugin-transform-runtime.md) ^6.9.0
- [babel-plugin-transform-decorators-legacy](https://npm.io/package/babel-plugin-transform-decorators-legacy.md) ^1.3.4
- [babel-plugin-transform-es2015-modules-systemjs](https://npm.io/package/babel-plugin-transform-es2015-modules-systemjs.md) ^6.9.0

## Recent versions

- 0.0.2 (latest) — 2016-07-22
- 0.0.1 — 2016-07-21

## README

# serve-esnext
[![Build Status](https://travis-ci.org/vinsonchuong/serve-esnext.svg?branch=master)](https://travis-ci.org/vinsonchuong/serve-esnext)

Seamlessly run ES.Next code in the browser.

Currently, when starting a new JavaScript web application project, a
significant amount of time is spent coordinating different libraries to
compile ES.Next into ES5 and load it into the browser. External dependencies
have to be declared and configured via configuration files committed to the
codebase.

The WHATWG is developing the
[JavaScript Loader Standard](https://github.com/whatwg/loader), which defines
how browsers should handle the `import` and `export` keywords.

`serve-esnext` coordinates and configures the necessary libraries to implement
the JavaScript Loader Standard without requiring additional configuration.

## Installing
`serve-esnext` is available as an
[npm package](https://www.npmjs.com/package/serve-esnext).

## Usage
In `package.json`, run `serve-esnext` as follows:

```json
{
  "name": "project",
  "private": true,
  "scripts": {
    "start": "serve-esnext"
  }
}
```

`serve-esnext` assumes the following project directory structure:

```text
package.json
src
  index.html
  index.js
```

The `index.html` should import `index.js` as follows:

```html
<!doctype html>
<meta charset="utf-8">
<script type="module" src="project/index.js"></script>
```

From the command line, run:

```bash
npm start
```

The application can be accessed from `http://localhost:8080`.

`serve-esnext` can also be run as an `express` middleware as follows:

```js
import * as path from 'path';
import express from 'express';
import serveEsnext from 'serve-esnext';

express()
  .use(serveEsnext)
  .use(express.static(path.resolve()))
  .listen(8080);
```

## Development
### Getting Started
The application requires the following external dependencies:
* Node.js

The rest of the dependencies are handled through:
```bash
npm install
```

Run tests with:
```bash
npm test
```

---
_Source: https://npm.io/package/serve-esnext · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
