arboleya / coffee-toaster

Minimalist build system for CoffeeScript.
114 stars 23 forks source link

toaster -w fails if you have .DS_Store file on source folder #33

Closed hems closed 11 years ago

hems commented 12 years ago

My source files:

coffee/ coffee/app coffee/app/.DS_Store coffee/app/app.coffee coffee/vendors

// Calling toaste -w fails $ toaster -w

/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1 "+this.filepath)),this.filename=/[\w-]+.[\w-]+/.exec(this.filepath)[0],this.f ^ TypeError: Cannot read property '0' of null at f.t.Script.f.getinfo (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:8688) at new f (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:8158) at l.t.Builder.l.init (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:12960) at l.t.Builder.l.init (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:13040) at new l (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:11901) at Toast.t.Toast.Toast.toast (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:23818) at Toast.__bind as toast at Toast.eval (eval at Toast (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:22357)) at new Toast (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:22352) at new f (/usr/local/lib/node_modules/coffee-toaster/lib/toaster.js:1:24550)

// I Guess the problem is on src/toaster/core/script.coffee Script error: line 29 : @filename = /[\w-]+.[\w-]+/.exec( @filepath )[ 0 ]

// current workaround $ find . -name .DS_Store | xargs rm -rf

arboleya commented 12 years ago

Yes it is, will take a look soon

Thanks :)

mlen commented 12 years ago

My suggestion here: It'd be great to be able to configure ignored files (via list of globs in config file or something like that). Vim leaves .swp files and toaster tries to compile them too.

arboleya commented 12 years ago

Hi Mateusz, thanks for you suggestion, it'll be a good addition to the excluded directive, which is already present.

arboleya commented 12 years ago

Until the next version do not come up, you can ignore files like this:

toast 'src'
    exclude: ['.DS_Store', '.swp']
    release: '...'
    debug: '...'
zx1986 commented 11 years ago

ERROR Parse error on line 1: Unexpected '' at file: .update_data.coffee.swp

oh! exclude could just like gitignore!

davidcroda commented 11 years ago

is there ever a reason for it to read "." prefixed files? Would a default exclusion of . files make sense?

arboleya commented 11 years ago

No reason, it as a bug. Fixed now in 0.6.6, please update and let me know if something weird happens.

Good to mention the current functionality of the exclude property: https://github.com/serpentem/coffee-toaster#config-options-exclude