Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teabyii/js-parcel
One simple JavaScript require() module bundler, just take care JavaScript, no others.
https://github.com/teabyii/js-parcel
Last synced: about 1 month ago
JSON representation
One simple JavaScript require() module bundler, just take care JavaScript, no others.
- Host: GitHub
- URL: https://github.com/teabyii/js-parcel
- Owner: teabyii
- Created: 2016-07-19T09:54:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-22T11:08:36.000Z (over 8 years ago)
- Last Synced: 2024-11-23T23:11:53.540Z (about 1 month ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# js-parcel
One simple JavaScript require() module bundler, just take care JavaScript, no others.
## Installation
```shell
npm install js-parcel
```## Usage
### API
You can use **js-pancel** as a converter to take care content of js files.
```js
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
```js
const parcel = require('js-parcel')parcel.bundle({
'bundle.js': './app.js'
})
```> Only support inline-source-map now.
### Example
```shell
cd example
npm install
npm run build
open index.html
# Then you can check the bundle.js and output of console.
```## Development
## Thanks
- [node-browserify](https://github.com/substack/node-browserify)
- [webpack](https://github.com/webpack/webpack)## License
MIT