Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goto-bus-stop/ascjsify
fast browserify transform for ES modules, and nothing else--using @WebReflection `ascjs`
https://github.com/goto-bus-stop/ascjsify
browserify browserify-transform es-modules
Last synced: 2 days ago
JSON representation
fast browserify transform for ES modules, and nothing else--using @WebReflection `ascjs`
- Host: GitHub
- URL: https://github.com/goto-bus-stop/ascjsify
- Owner: goto-bus-stop
- License: other
- Created: 2017-11-15T09:48:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-15T09:52:25.000Z (almost 7 years ago)
- Last Synced: 2024-09-18T02:54:35.538Z (15 days ago)
- Topics: browserify, browserify-transform, es-modules
- Language: JavaScript
- Size: 3.91 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ascjsify
fast browserify transform for ES modules, and nothing else--using [@WebReflection](https://github.com/webreflection) [`ascjs`](https://github.com/webreflection/ascjs)
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url][npm-image]: https://img.shields.io/npm/v/ascjsify.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/ascjsify
[travis-image]: https://img.shields.io/travis/goto-bus-stop/ascjsify.svg?style=flat-square
[travis-url]: https://travis-ci.org/goto-bus-stop/ascjsify
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard## Install
```
npm install ascjsify
```## Usage
```bash
browserify app.js -t ascjsify
browserify app.js -g ascjsify # global
``````js
var ascjsify = require('ascjsify')
var b = browserify()
b.transform(ascjsify, { global: true })
````global: true` is optional, but useful if dependencies may be using ES modules already.
`ascjsify` only runs on files that look like they may contain `import` or `export` statements, so it won't slow everything down when run globally.### Input
```js
import { EventEmitter } from 'events'
export default new EventEmitter()
```### Output
```js
const { EventEmitter } = require('events')
Object.defineProperty(exports, '__esModule', {value: true}).default = new EventEmitter()
```## License
[Apache-2.0](LICENSE.md)