Permalink
Browse files

Fixes compass_plugin on win32

  • Loading branch information...
Ryan J Daw
Ryan J Daw committed Mar 14, 2013
1 parent 5b37c9d commit 546d87bd02910b062af149b205e67c8052aff566
Showing with 13 additions and 6 deletions.
  1. +2 −0 CHANGELOG
  2. +2 −2 package.json
  3. +9 −4 src/compass_plugin.coffee
View
@@ -1,3 +1,5 @@
+v0.3.17 - Fixes compass_plugin on win32
+
v0.3.16 - Adds warning about file size
v0.3.15 - Fixes permissions on uploaded tarfiles
View
@@ -1,6 +1,6 @@
{
"name": "mobify-client",
- "version": "0.3.16",
+ "version": "0.3.17",
"description": "Tools for building and compiling mobify.js adaptations",
"author": "Mobify <dev@mobify.com>",
"homepage": "http://www.mobifyjs.com",
@@ -13,7 +13,7 @@
"fstream": "0.1.19",
"tar": "0.1.16",
"uglify-js": "1.3.3",
- "clean-css": "https://github.com/rrjamie/clean-css/tarball/9db3294535c260d17844c9215b0a676969dc928e",
+ "clean-css": "https://nodeload.github.com/rrjamie/clean-css/legacy.tar.gz/9db3294535c260d17844c9215b0a676969dc928e",
"wrench": "1.3.9",
"connect": "2.4.5",
"express": "2.5.11"
View
@@ -3,18 +3,23 @@ Preview = require './preview.coffee'
Build = require './build.coffee'
+COMPASS_PROC = if process.platform is 'win32'
+ "compass.bat"
+else
+ "compass"
+
class CompassPlugin
bindPreview: (preview_server) ->
console.log "Binding Compass Preview"
- ChildProcess.exec 'compass clean', (err, stdout, stderr) ->
+ ChildProcess.exec "#{COMPASS_PROC} clean", (err, stdout, stderr) ->
if err
console.log "Failed to clean SCSS files. Please manually clean files."
console.log stdout
console.log stderr
- child = ChildProcess.spawn 'compass', ['watch']
+ child = ChildProcess.spawn "#{COMPASS_PROC}", ['watch']
child.stderr.on 'data', (data) ->
console.log "Compass: #{data}"
@@ -32,14 +37,14 @@ class CompassPlugin
build.addHook 'prebuild', (callback) ->
console.log 'Compass Compile'
- ChildProcess.exec 'compass clean', (err, stdout, stderr) ->
+ ChildProcess.exec "#{COMPASS_PROC} clean", (err, stdout, stderr) ->
if err
console.log "Failed to clean SCSS files. Please manually clean files."
console.log stdout
console.log stderr
- ChildProcess.exec 'compass compile -e production', (err, stdout, stderr) ->
+ ChildProcess.exec "#{COMPASS_PROC} -e production", (err, stdout, stderr) ->
if err
callback err
return

0 comments on commit 546d87b

Please sign in to comment.