Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
91
-5.21%
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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.