Socket
Socket
Sign inDemoInstall

glslify-brunch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glslify-brunch

Run glsl files through glslify in brunch


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

glslify-brunch

Run glsl files through glslify in brunch.

Installation

Install the plugin via npm with npm install --save glslify-brunch

Or manually:

  • Add "glslify-brunch": "x.y.z" to package.json and run npm install
  • If you want to use the git version, add: "glslify-brunch": "git+ssh://git@github.com:bmatcuk/glslify-brunch.git"

Configuration

In your brunch-config.coffee, you can add glslify transform options:

exports.config =
  ...
  plugins:
    glslify:
      transform: ...

Transform options are passed unmolested straight into glslify, so see the glslify documentation for the format of the options.

You can also configure how glslify-brunch converts your GLSL into javascript. The default depends on your modules.wrapper setting in your brunch-config.coffee file:

  • If modules.wrapper = 'commonjs' (the default brunch setting), the output will be:

    module.exports = "...glsl...";
    
  • If modules.wrapper = 'amd', the output will be:

    define([], function() {
      return "...glsl...";
    });
    
  • Otherwise, the output will be:

    <base filename>Glsl = "...glsl...";
    

    Where <base filename> of /path/to/file.ext would be file.

If you'd like to change this behavior, you can set the wrapper option:

exports.config =
  ...
  plugins:
    glslify:
      wrapper: function(path, data) { return "...whatever..."; }

Make sure to JSON.stringify(data)

Keywords

FAQs

Package last updated on 23 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc