Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-glsl

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-glsl - npm Package Compare versions

Comparing version 0.0.1-alpha.2 to 0.0.1

2

lib/bundle.js

@@ -1,3 +0,1 @@

/* eslint-disable no-redeclare */
/**

@@ -4,0 +2,0 @@ * Mostly taken from https://github.com/glslify/glslify-bundle

22

lib/utils.js

@@ -14,6 +14,6 @@ function resolveImport(identifier, declaration) {

if (declaration.type === 'VariableDeclaration') {
var children = declaration.declarations;
for (var i = 0; i < children.length; ++i) {
const children = declaration.declarations;
for (let i = 0; i < children.length; ++i) {
if (children[i].id === identifier) {
var rhs = children[i].init;
const rhs = children[i].init;
if (

@@ -37,3 +37,3 @@ rhs &&

function resolveModule(path, name) {
var binding = path.scope.getBinding(name);
const binding = path.scope.getBinding(name);
if (!binding) {

@@ -84,11 +84,15 @@ return '';

case 'Identifier':
// TODO: handle other constants here
const binding = path.scope.getBinding(expression.name);
if (!binding) {
if (expression.name === '__dirname') {
return env.cwd;
if (binding) {
const initPath = binding.path.get('init');
if (initPath.node) {
return evalConstant(env, initPath, initPath.node);
}
} else if (expression.name === '__dirname') {
return env.cwd;
}
throw new Error(
`glslify-babel: cannot resolve glslify(), unknown reference "${
`glslify-babel: cannot resolve glslify() call, unknown or non-initialized identifier "${
expression.name

@@ -95,0 +99,0 @@ }"`

{
"name": "babel-plugin-glsl",
"description": "Process GLSL code with glslify",
"version": "0.0.1-alpha.2",
"version": "0.0.1",
"author": "Onno Visser <visser.onno@gmail.com>",

@@ -27,3 +27,3 @@ "bugs": {

"index.js",
"lib/*"
"lib"
],

@@ -30,0 +30,0 @@ "homepage": "https://github.com/onnovisser/babel-plugin-glsl#readme",

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