New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-inline-webgl-constants

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-inline-webgl-constants

Babel plugin for replacing long gl constants with the shorter corresponding numbers

1.0.3
latest
Source
npm
Version published
Weekly downloads
42
82.61%
Maintainers
3
Weekly downloads
 
Created
Source

babel-plugin-inline-webgl-constants

Replaces gl.<constant> or GL.<constant> references with the corresponding OpenGL constant value.

When used on luma.gl applications, also removes any import of the GL namespace.

Example

in
const max = gl.MAX_VERTEX_ATTRIBS;
out
const max = 34921;
in
import GL from '@luma.gl/constants';
...
const max = GL.MAX_VERTEX_ATTRIBS;
out
...
const max = 34921;

Installation

$ npm install --save-dev babel-plugin-inline-webgl-constants

Usage

.babelrc

{
  "plugins": ["inline-webgl-constants"]
}

Via CLI

$ babel --plugins inline-webgl-constants script.js

Via Node API

require('babel-core').transform('code', {
  plugins: ['inline-webgl-constants']
});

Keywords

babel-plugin

FAQs

Package last updated on 01 Feb 2021

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