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.7
to
1.0.8
+10
-11
lib/index.js

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

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

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

function ReactCompiler(config) {
var _ref, _ref1, _ref2;
var ref, ref1, ref2, ref3, ref4;
this.config = config;
this.harmony = ((_ref = this.config) != null ? (_ref1 = _ref.plugins) != null ? (_ref2 = _ref1.react) != null ? _ref2.harmony : void 0 : void 0 : void 0) === true;
this.harmony = ((ref = this.config) != null ? (ref1 = ref.plugins) != null ? (ref2 = ref1.react) != null ? ref2.harmony : void 0 : void 0 : void 0) === true;
this.options = ((ref3 = this.config) != null ? (ref4 = ref3.plugins) != null ? ref4.react : void 0 : void 0) || {};
}
ReactCompiler.prototype.compile = function(params, callback) {
var err, output, source, visitorList;
var err, output, source;
source = params.data;
visitorList = this.harmony ? visitors.getAllVisitors() : visitors.transformVisitors.react;
try {
output = transform(visitorList, source).code;
output = react.transformWithDetails(source, this.options);
} catch (_error) {
err = _error;
console.log("ERROR", err);
console.dir(output);
return callback(err.toString());
}
return callback(null, {
data: output
data: output.code
});

@@ -38,0 +37,0 @@ };

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

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

"dependencies": {
"react-tools": ">=0.12.1",
"jstransform": "^8.2.0"
"react-tools": "0.12.1"
},

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

@@ -13,4 +13,6 @@ ## react-brunch

react:
harmony: yes # include some es6 transforms
# options passed through to `react-tools.main.transformWithDetails()`
harmony: yes # include some es6 transforms
sourceMap: no # generate inline source maps
stripTypes: no # strip type annotations
# Usual brunch config stuf...

@@ -35,2 +37,3 @@ files:

## Usage

@@ -37,0 +40,0 @@ Install the plugin via npm with `npm install --save react-brunch`.