chrisdickinson/glslify-stream — pull request #1 by hughsk (2013-10-06 09:09:40+00:00)
Title: Allow for piping input, add pragmas for module code.

@chrisdickinson understand you're probably not keen on maintaining this set of modules - would be good to hear your thoughts. I'd be happy to either maintain the repo or fork the project if that's the case :)

The first change is to optionally enable piping text into glslify-stream instead of reading the file directly. A second boolean argument is added to the function such that:

``` javascript
require('glslify-stream')('path', true)
```

Will not read the file and return a through stream
for writing to.

The second is to add pragmas to specify module start/end points.

node_modules begin with:
``` glsl
#pragma glslify_file start module
```
And other external files:
``` glsl
#pragma glslify_file start
```
Both types of files end with:
``` glsl
#pragma glslify_file end
```

These two changes make it possible to add browserify-style transform streams to glslify, in that they can be piped
in a chain and ignore module code.