# glslify-bundle

> Bundle a glslify-deps dependency tree into a GLSL source string

Latest version **5.1.1** (published 2018-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install glslify-bundle
pnpm add glslify-bundle
yarn add glslify-bundle
bun add glslify-bundle
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.1 |
| Published | 2018-10-23 |
| First published | 2014-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Hugh Kennedy |
| Maintainers | archmoj, bpostlethwaite, chrisdickinson, dfcreative, erkaman, gre, hughsk, mattdesl, mikkoh, mikolalysenko, rezaali, rreusser, substack, tatumcreative, thibauts, vorg, wwwtyro, yoshuawuyts |
| Keywords | ecosystem:stackgl, glslify, glsl, shader, bundle, module, system, tool, webgl |

## Links

- npm: https://www.npmjs.com/package/glslify-bundle
- Repository: https://github.com/stackgl/glslify-bundle
- Issues: https://github.com/stackgl/glslify-bundle/issues
- npm.io page: https://npm.io/package/glslify-bundle

## Dependencies (10)

- [shallow-copy](https://npm.io/package/shallow-copy.md) 0.0.1
- [murmurhash-js](https://npm.io/package/murmurhash-js.md) ^1.0.0
- [glsl-tokenizer](https://npm.io/package/glsl-tokenizer.md) ^2.0.2
- [glsl-token-depth](https://npm.io/package/glsl-token-depth.md) ^1.1.1
- [glsl-token-scope](https://npm.io/package/glsl-token-scope.md) ^1.1.1
- [glsl-token-string](https://npm.io/package/glsl-token-string.md) ^1.0.1
- [glsl-token-defines](https://npm.io/package/glsl-token-defines.md) ^1.0.0
- [glsl-token-descope](https://npm.io/package/glsl-token-descope.md) ^1.0.2
- [glsl-inject-defines](https://npm.io/package/glsl-inject-defines.md) ^1.0.1
- [glsl-token-whitespace-trim](https://npm.io/package/glsl-token-whitespace-trim.md) ^1.0.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 5.1.1 (latest) — 2018-10-23
- 5.1.0 — 2018-10-22
- 5.0.0 — 2015-12-14
- 4.0.1 — 2015-12-14
- 4.0.0 — 2015-12-06
- 3.1.0 — 2015-11-24
- 3.0.0 — 2015-11-24
- 2.0.4 — 2015-06-24
- 2.0.3 — 2015-04-05
- 1.0.3 — 2015-04-05
- 2.0.2 — 2015-03-14
- 2.0.1 — 2015-03-11
- 2.0.0 — 2015-03-09
- 1.0.2 — 2014-06-29
- 1.0.1 — 2014-06-29
- … 1 more at https://npm.io/package/glslify-bundle/versions

## README

# glslify-bundle

[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

Bundle a [glslify-deps](http://github.com/stackgl/glslify-deps) dependency tree into
a GLSL source string.

This has been separated from *glslify-deps* such that you can prebundle a dependency
tree server-side, but then still modify shader file contents in a browser.

## Usage

[![NPM](https://nodei.co/npm/glslify-bundle.png)](https://nodei.co/npm/glslify-bundle/)

### `source = bundle(deps)`

Takes the output object from [glslify-deps](http://github.com/stackgl/glslify-deps)
and returns a bundled GLSL string.

``` javascript
var bundle = require('glslify-bundle')
var deps   = require('glslify-deps')
var path   = require('path')

var file = path.join(__dirname, 'index.glsl')

deps().add(file, function(err, tree) {
  if (err) throw err

  var glsl = bundle(tree)

  console.log(glsl)
})
```

## Contributing

See [stackgl/contributing](https://github.com/stackgl/contributing) for details.

## License

MIT. See [LICENSE.md](http://github.com/stackgl/glslify-bundle/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/glslify-bundle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
