https://github.com/stealjs/steal-bundler
Bundle assets into your dist folder with StealTools
https://github.com/stealjs/steal-bundler
Last synced: 6 months ago
JSON representation
Bundle assets into your dist folder with StealTools
- Host: GitHub
- URL: https://github.com/stealjs/steal-bundler
- Owner: stealjs
- License: mit
- Created: 2015-07-29T17:32:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-05-23T12:04:20.000Z (about 5 years ago)
- Last Synced: 2024-10-29T23:42:41.319Z (7 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/steal-bundler
- Size: 101 KB
- Stars: 2
- Watchers: 14
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://travis-ci.org/stealjs/steal-bundler)
[](http://badge.fury.io/js/steal-bundler)# steal-bundler
For StealTools projects, steal-bundler provides an easy way to bundle static assets along with your CSS and JavaScript, so that your dist folder can be sent to a CDN.
steal-bundler infers static assets from your project and copies them for you automatically (can be turned off if undesired).
## Use
```js
var stealTools = require("steal-tools");
var bundleAssets = require("steal-bundler");stealTools.build({
config: __dirname + "/package.json!npm"
}).then(function(buildResult){bundleAssets(buildResult, {
glob: "images/**/*"
});});
```## API
### bundleAssets(bundleResult, [options]) -> Promise
Calling `require("steal-bundler")` will return a function that when called will bundle assets and pack them into a destination folder.
#### buildResult
The [BuildResult](http://stealjs.com/docs/steal-tools.BuildResult.html) obtained from calling `stealTools.build`.
#### options
An optional object for specifying additional options. They are:
- __infer__: By default steal-bundler will infer your static assets in your project by reading your CSS and JavaScript. Set this to `false` if you want to manually specify static assets.
- __glob__: A string or array of strings, of [minimatch globs](https://github.com/isaacs/minimatch) specifying files to be copied.## License
MIT