Cowboy-coder / bundle-up

An asset manager for nodejs
MIT License
56 stars 22 forks source link

Fix for windows assets path #17

Closed Thau closed 12 years ago

Thau commented 12 years ago

When bundle-up is called from Windows, it uses the file path to generate the compiled assets url, resulting in things like "/\generated\bundle\asdfg.css".

This little patch fixes that.

Cowboy-coder commented 12 years ago

Thanks! Does all the tests pass in windows?

npm test
Thau commented 12 years ago

Right now it crashes with a memory allocation problem. I'm trying to fix it.

Thau commented 12 years ago

Have you realized your test runner isn't running every test?

Cowboy-coder commented 12 years ago

Really?

Thau commented 12 years ago

Yep, try running them file by file. You'll notice one otf_compiler_spec failing, but it doesn't fail when you run npm test.

Cowboy-coder commented 12 years ago

True!

✖ 1 of 46 tests failed:

  1) OnTheFlyCompiler should re-compile main.styl when imported file change:
     Error: expected '/Users/fredriklindin/progg/bundle-up/node_modules/stylus/lib/functions/index.styl' to equal '/Users/fredriklindin/progg/bundle-up/test/files/stylus/typography.styl'
      at Assertion.assert (/Users/fredriklindin/progg/bundle-up/node_modules/expect.js/expect.js:99:13)
      at Assertion.equal (/Users/fredriklindin/progg/bundle-up/node_modules/expect.js/expect.js:200:10)
      at Request._callback (/Users/fredriklindin/progg/bundle-up/test/otf_compiler_spec.coffee:87:40)
      at Request.callback (/Users/fredriklindin/progg/bundle-up/node_modules/request/main.js:119:22)
      at Request.<anonymous> (native)
      at Request.emit (events.js:70:17)
      at Request.<anonymous> (/Users/fredriklindin/progg/bundle-up/node_modules/request/main.js:521:16)
      at Request.emit (events.js:67:17)
      at IncomingMessage.<anonymous> (/Users/fredriklindin/progg/bundle-up/node_modules/request/main.js:483:14)
      at IncomingMessage.emit (events.js:88:20)
      at HTTPParser.onMessageComplete (http.js:137:23)
      at Socket.ondata (http.js:1150:24)
      at TCP.onread (net.js:374:27)