js-parcel

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i js-parcel

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • teabyii