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

Babel

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Babel - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

._.DS_Store

6

._package.json

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR����#�#com.macromates.caret{
column = 20;
line = 14;
Mac OS X  2��ATTR���"�"com.macromates.caret{
column = 19;
line = 3;
}

@@ -10,33 +10,39 @@ (function() {

template: function(file, callback) {
return Babel.file("template", file, callback);
return Babel.typedFile("template", file, callback);
},
data: function(file, callback) {
return Babel.file("data", file, callback);
return Babel.typedFile("data", file, callback);
},
source: function(file, callback) {
return Babel.typedFile("script", file, callback);
},
script: function(file, callback) {
return Babel.file("script", file, callback);
return Babel.source(file, function(err, source) {
return callback(err, new Function("__values", " with(__values) { " + source + " } "));
});
},
stylesheet: function(file, callback) {
return Babel.file("stylesheet", file, callback);
return Babel.typedFile("stylesheet", file, callback);
},
file: function(type, file, callback) {
typedFile: function(type, file, callback) {
var extension;
extension = Path.extname(file).substr(1);
return Step(function() {
Babel.translator(type, extension, this.parallel());
return Babel.plain(file, this.parallel());
}, function(err, translator, source) {
if (err) {
return callback(err);
}
return translator(source, this);
}, callback);
},
plain: function(file, callback) {
return Path.exists(file, function(exists) {
if (exists) {
return Step(function() {
Babel.translator(type, extension, this.parallel());
return Fs.readFile(file, "utf8", this.parallel());
}, function(err, translator, source) {
if (err) {
throw err;
}
if (translator) {
return translator(source);
} else {
return null;
}
}, callback);
return Fs.readFile(file, "utf8", function(err, source) {
return callback(err, source);
});
} else {
return callback(null, null);
return callback(null, "");
}

@@ -60,5 +66,13 @@ });

return Path.exists(file, __bind(function(exists) {
translator = exists ? require(file) : false;
this.translators[type][extension] = translator;
return callback(null, translator);
if (exists) {
translator = require(file);
if (!translator) {
return callback("Invalid '" + type + "' translator for '" + extension + "'");
} else {
this.translators[type][extension] = translator;
return callback(null, translator);
}
} else {
return callback("Could not find '" + type + "' translator for '" + extension + "'");
}
}, this));

@@ -72,28 +86,44 @@ }

}
return Path.exists(dir, function(exists) {
if (exists) {
return Step(function() {
return Fs.readdir(dir, this);
}, function(err, files) {
var file, group, _i, _len;
if (err) {
callback(err);
}
if (!files.length) {
return this(null, []);
}
group = this.group();
for (_i = 0, _len = files.length; _i < _len; _i++) {
file = files[_i];
if (!_.include(Babel.ignoreFiles, file)) {
iterator(Path.join(dir, file), group());
}
}
return;
}, function(err, results) {
return callback(err, _.compact(results));
});
} else {
return callback(null, []);
return Step(function() {
return Fs.readdir(dir, this);
}, function(err, files) {
var file, group, _i, _len;
if (files == null) {
files = [];
}
if (err) {
files = [];
}
files = _.reject(files, function(file) {
return _.include(Babel.ignoreFiles, file);
});
this.parallel()(null, files);
if (files.length) {
group = this.group();
}
for (_i = 0, _len = files.length; _i < _len; _i++) {
file = files[_i];
iterator(Path.join(dir, file), group());
}
return;
}, function(err, files, results) {
var file, name, object, result, touple, _i, _len, _ref;
if (files == null) {
files = [];
}
if (results == null) {
results = [];
}
if (err) {
callback(err);
}
object = {};
_ref = _.zip(files, results);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
touple = _ref[_i];
file = touple[0], result = touple[1];
name = Path.basename(file, Path.extname(file));
object[name] = result;
}
return callback(null, object);
});

@@ -100,0 +130,0 @@ }

{
"name": "Babel",
"description": "Babel puts a soft cushion between you all the cool new file formats being developed for node.js such as CoffeeScript, SASS, and Jade.",
"version": "0.0.0",
"version": "0.0.1",
"author": "Lucas Wojciechowski <lucas@lucaswoj.com> (http://lucaswoj.com)",
"main": "lib/babel",
"main": "src/babel",
"scripts": {

@@ -8,0 +8,0 @@ "test": "cake test"

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR���"�"com.macromates.caret{
Mac OS X  2��ATTR�n��"�"com.macromates.caret{
column = 12;
line = 1;
}

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR���!�!com.macromates.caret{
Mac OS X  2��ATTR�`��!�!com.macromates.caret{
column = 4;
line = 0;
}

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR���"�"com.macromates.caret{
Mac OS X  2��ATTR�\��"�"com.macromates.caret{
column = 11;
line = 2;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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