https://github.com/allnulled/htmlbundler
Like simplebundler but using a *.js list file instead of a directory.
https://github.com/allnulled/htmlbundler
Last synced: 7 months ago
JSON representation
Like simplebundler but using a *.js list file instead of a directory.
- Host: GitHub
- URL: https://github.com/allnulled/htmlbundler
- Owner: allnulled
- Created: 2024-12-23T06:39:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T16:10:57.000Z (over 1 year ago)
- Last Synced: 2025-01-22T17:23:52.381Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/@allnulled/htmlbundler
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# htmlbundler
Pack JS universal modules from CLI or API from a list of files. But no webpack or shit. Simple.
## Install
```sh
npm i -g @allnulled/htmlbundler
```
## Usage by CLI
```sh
htmlbundler
--list bundlelist.js
--output dist/file.js
--ignore file4.js file7.js file9.js
--id MyCoolAPI
--module false
--wrap true
```
## Usage by API
```js
require(__dirname + "/htmlbundler.js").bundle({
list: "bundlelist.js",
output: "test/example1/dist/app.js",
module: true,
id: "Lib1",
ignore: [],
wrap: true,
}).bundle({
list: "bundlelist.js",
output: "test/example2/dist/app.js",
module: true,
id: "Lib2",
ignore: ["only-browser.js"],
wrap: true,
});
```
Use `wrap: false` or `--wrap 0` to not pack the files as `.js`, but simple concatenation.