0.1.0 • Published 8 years ago

js-parcel v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

js-parcel

One simple JavaScript require() module bundler, just take care JavaScript, no others.

Installation

npm install js-parcel

Usage

API

You can use js-pancel as a converter to take care content of js files.

const parcel = require('js-parcel')

parcel
  .transform(file, source, { sourcemap: true })
  // require file to resolve path, but using source to transform
  .then((content) => { ... })

Or as a bundler

const parcel = require('js-parcel')

parcel.bundle({
  'bundle.js': './app.js'
})

Only support inline-source-map now.

Example

cd example
npm install
npm run build
open index.html
# Then you can check the bundle.js and output of console.

Development

Thanks

License

MIT