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

closure-loader

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

closure-loader - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

8

index.js

@@ -10,3 +10,2 @@ var loaderUtils = require("loader-utils"),

module.exports = function (source) {

@@ -21,2 +20,3 @@ var query = loaderUtils.parseQuery(this.query),

config = buildConfig(query, this.options[query.config || "closureLoader"]);
provideMap = mapBuilder(config.paths);

@@ -28,4 +28,2 @@

//console.log(source);
return source;

@@ -104,3 +102,7 @@ };

function createRequire(key, localVar, provideMap) {
if (!provideMap[key]) {
throw new Error("Can't find closure dependency " + key);
}
return "googRequire('" + key + "', " + localVar + "); " + key + " = require('" + provideMap[key] + "')." + key;
}
{
"name": "closure-loader",
"version": "0.1.1",
"version": "0.1.2",
"description": "Webpack loader for google closure library dependencies",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,4 +27,4 @@ # Closure library dependency loader for [Webpack](http://webpack.github.io/)

**NOTE**: Usually the closure lib simply creates all namespaces on the *global* scope (i.e. the window object).
This is *not* the case if you use this loader. Every file ("module") has its own scope just like it would have
**NOTE**: Usually the closure lib simply creates all namespaces on the **global** scope (i.e. the window object).
This is **not** the case if you use this loader. Every file ("module") has its own scope just like it would have
if you used CommonJS syntax.

@@ -103,5 +103,5 @@

Here are the configuration options specific for this loader:
- *paths* (array): An array of path strings. The loader will search all `*.js` files within theses
- **paths** (array): An array of path strings. The loader will search all `*.js` files within theses
paths for `goog.provide()` statements.
- *es6mode* (boolean, default: false): If enabled it will add the value of the first `goog.provide()`
- **es6mode** (boolean, default: false): If enabled it will add the value of the first `goog.provide()`
as default export for usage with babel. For this reason it will also export the corresponding flag

@@ -108,0 +108,0 @@ `module.exports.__esModule = true`

Sorry, the diff of this file is not supported yet

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