Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

react-brunch

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-brunch - npm Package Compare versions

Comparing version
1.0.4
to
1.0.5
+12
-10
lib/index.js

@@ -1,6 +0,8 @@

// Generated by CoffeeScript 1.6.3
var ReactCompiler, transform;
// Generated by CoffeeScript 1.7.1
var ReactCompiler, transform, visitors;
transform = require('react-tools').transform;
visitors = require('react-tools/vendor/fbtransform/visitors');
transform = require('jstransform').transform;
module.exports = ReactCompiler = (function() {

@@ -16,17 +18,17 @@ ReactCompiler.prototype.brunchPlugin = true;

function ReactCompiler(config) {
var _ref, _ref1, _ref2;
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
this.config = config;
this.includeHeader = ((_ref = this.config) != null ? (_ref1 = _ref.plugins) != null ? (_ref2 = _ref1.react) != null ? _ref2.autoIncludeCommentBlock : void 0 : void 0 : void 0) === true;
this.harmony = ((_ref3 = this.config) != null ? (_ref4 = _ref3.plugins) != null ? (_ref5 = _ref4.react) != null ? _ref5.harmony : void 0 : void 0 : void 0) === true;
}
ReactCompiler.prototype.compile = function(params, callback) {
var err, output, source;
source = params.data;
if (this.includeHeader) {
source = "/** @jsx React.DOM */\n" + source;
}
var err, output, source, visitorList;
source = this.includeHeader ? "/** @jsx React.DOM */\n" + params.data : params.data;
visitorList = this.harmony ? visitors.getAllVisitors() : visitors.transformVisitors.react;
try {
output = transform(source);
output = transform(visitorList, source).code;
} catch (_error) {
err = _error;
console.log("ERROR", err);
return callback(err.toString());

@@ -33,0 +35,0 @@ }

{
"name": "react-brunch",
"version": "1.0.4",
"version": "1.0.5",
"description": "Adds React.js support to brunch.",

@@ -25,3 +25,4 @@ "author": "Matt McCray",

"dependencies": {
"react-tools": "~0.8.0"
"react-tools": "~0.9.0",
"jstransform": "~3.0.0"
},

@@ -28,0 +29,0 @@ "devDependencies": {

@@ -17,2 +17,3 @@ ## react-brunch

autoIncludeCommentBlock: yes
harmony: yes # include some es6 transforms

@@ -19,0 +20,0 @@ # Usual brunch config stuf...