coffee-script-redux-brunch
Advanced tools
Comparing version
@@ -0,0 +0,0 @@ # coffee-script-brunch 1.4.1 (November 26, 2012) |
@@ -1,16 +0,16 @@ | ||
// Generated by CoffeeScript 1.4.0 | ||
// Generated by CoffeeScript 1.3.3 | ||
(function() { | ||
var CoffeeScriptCompiler, coffeescript; | ||
var CoffeeScriptReduxCompiler, coffeescript; | ||
coffeescript = require('coffee-script-redux'); | ||
module.exports = CoffeeScriptCompiler = (function() { | ||
module.exports = CoffeeScriptReduxCompiler = (function() { | ||
CoffeeScriptCompiler.prototype.brunchPlugin = true; | ||
CoffeeScriptReduxCompiler.prototype.brunchPlugin = true; | ||
CoffeeScriptCompiler.prototype.type = 'javascript'; | ||
CoffeeScriptReduxCompiler.prototype.type = 'javascript'; | ||
CoffeeScriptCompiler.prototype.extension = 'coffee'; | ||
CoffeeScriptReduxCompiler.prototype.extension = 'coffee'; | ||
function CoffeeScriptCompiler(config) { | ||
function CoffeeScriptReduxCompiler(config) { | ||
this.config = config; | ||
@@ -20,8 +20,15 @@ return; | ||
CoffeeScriptCompiler.prototype.compile = function(data, path, callback) { | ||
var error, result; | ||
CoffeeScriptReduxCompiler.prototype.compile = function(data, path, callback) { | ||
var csAst, error, jsAst, result; | ||
try { | ||
return result = coffeescript.compile(data, { | ||
bare: true | ||
csAst = coffeescript.parse(data, { | ||
raw: true | ||
}); | ||
jsAst = coffeescript.compile(csAst); | ||
result = coffeescript.js(jsAst); | ||
result = result.split("\n"); | ||
result.pop(); | ||
result.shift(); | ||
result.shift(); | ||
return result = result.join("\n"); | ||
} catch (err) { | ||
@@ -34,3 +41,3 @@ return error = err; | ||
return CoffeeScriptCompiler; | ||
return CoffeeScriptReduxCompiler; | ||
@@ -37,0 +44,0 @@ })(); |
{ | ||
"name": "coffee-script-redux-brunch", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Adds CoffeeScriptRedux support to brunch.", | ||
@@ -8,7 +8,7 @@ "author": "Dave Tonge", | ||
"type": "git", | ||
"url": "git@github.com:davidgtonge/coffee-script-brunch.git" | ||
"url": "git@github.com:davidgtonge/coffee-script-redux-brunch.git" | ||
}, | ||
"main": "./lib/index", | ||
"scripts": { | ||
"prepublish": "coffee -o lib/ src/", | ||
"prepublish": "node setup.js postinstall", | ||
"postinstall": "node setup.js postinstall", | ||
@@ -15,0 +15,0 @@ "test": "node setup.js test" |
@@ -0,0 +0,0 @@ ## coffee-script-brunch |
@@ -23,3 +23,3 @@ var exec = require('child_process').exec; | ||
if (exists) return; | ||
execute(['node_modules', 'coffee-script', 'bin', 'coffee'], '-o lib/ src/'); | ||
execute(['node_modules', 'coffee-script-redux', 'bin', 'coffee'], '-o lib/ src/'); | ||
}); | ||
@@ -26,0 +26,0 @@ } else if (mode === 'test') { |
global.expect = require('chai').expect; | ||
global.Plugin = require('../lib'); |
@@ -17,4 +17,4 @@ describe('Plugin', function() { | ||
it('should compile and produce valid result', function(done) { | ||
var content = 'a = 1'; | ||
var expected = 'var a;\n\na = 1;\n'; | ||
var content = 'a = 10'; | ||
var expected = " var a;\n a = 10;"; | ||
@@ -21,0 +21,0 @@ plugin.compile(content, 'file.coffee', function(error, data) { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
40426
34.41%81
9.46%1
-50%18
-5.26%2
100%