Bundless
Experimental bundle-free JavaScript dependency server/loader.
Bundless is an experimental, HTTP/2-based alternative to browserify and
webpack. Its goal is to deliver all JavaScript dependencies to the client
without creating aggregate files ("bundles"), managing complex configurations
or migrating to alternative package managers.
Installation
npm install bundless --save
Usage
All you need to do is to create an instance of Bundless server:
var bundless = require('bundless');
var configuration = {...};
bundless(configuration).listen(3000, 'localhost', function (err) {
console.log("Bundless listening at " + this.address().address + ":" + this.address().port);
});
configuration
is an optional argument, which can be a subset of the following
data structure:
var defaultConfiguration = {
rootDir: process.cwd(),
srcDir: 'dist',
srcMount: '/modules',
libMount: '/lib',
nodeMount: '/$node',
systemMount: '/$system'
ssl: require('spdy-keys')
};
You'll most likely override srcDir
and perhaps rootDir
. Remaining
properties give you extra control over your server topology.
This example will run server on https://localhost:3000
.
In your .html file/template, include the following:
<body>
...
<script src="https://localhost:3000/$system" type="text/javascript"></script>
<script type="text/javascript">
System.import('your/own/main/package');
</script>
Contributing
Bundless is currently in a wild, alpha, development-and-research stage.
We'll be happy for any comments, opinions, insights, thoughts, pull-requests,
suggestions and bits of wisdom from the community.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
See LICENSE.md