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

crude-build

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crude-build - npm Package Compare versions

Comparing version 0.0.9 to 0.1.0

24

crude-build.js

@@ -100,3 +100,14 @@

window['${moduleName}'] = ${moduleName};
if (typeof define === 'function' && define['amd']) {
define([], function() {
return ${moduleName};
});
} else if (typeof exports === 'object') {
Object.defineProperty(${moduleName}, "__esModule", { 'value': true });
${moduleName}['default'] = ${moduleName};
${moduleName}['${moduleName}'] = ${moduleName};
module['exports'] = ${moduleName};
} else {
window['${moduleName}'] = ${moduleName};
}

@@ -110,2 +121,6 @@ })(this);

if (type === "var") {
str += "var module;\n";
}
for (let e of externs) {

@@ -142,5 +157,5 @@ switch (type) {

// Extract externs in format "/* import Quaternion from quaternion */"
// Extract externs in format "import Quaternion from quaternion;"
const externs = [];
sourceCode = sourceCode.replace(/\/\*\s*import\s*([a-z0-9.-]+)\s*from\s*([a-z0-9.-]+)\s*\*\//ig, function (_, name, inc) {
sourceCode = sourceCode.replace(/\s*import\s*([a-z0-9.-]+)\s*from\s*([a-z0-9.-]+)\s*;?/ig, function (_, name, inc) {
externs.push({ name, inc });

@@ -174,4 +189,3 @@ return '';

externs: 'externs.js',
emit_use_strict: true,
languageOut: 'ES6'
emit_use_strict: true
});

@@ -178,0 +192,0 @@

{
"name": "crude-build",
"title": "Crude Build",
"version": "0.0.9",
"version": "0.1.0",
"homepage": "https://github.com/rawify/CrudeBuild.js",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/rawify/CrudeBuild.js/issues",

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