js-parcel

Another simple javascript module bundle maker.

Usage no npm install needed!

<script type="module">
  import jsParcel from 'https://cdn.skypack.dev/js-parcel';
</script>

README

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