Good points, but who really wants it to keep generating if you've got
compilation errors?

On Wednesday, February 6, 2013, Daniel Heath wrote:

> In lib/bonsai/exporter.rb:
>
> > @@ -112,19 +112,23 @@ def copy_assets
> >          end
> >        end
> >
> > -      def generate_css
> > -        Dir["#{Bonsai.root_dir}/public/**/*.{less,sass,scss}"].each do |cssfile|
> > -          css = Tilt.new(cssfile).render
> > -          path = "#{File.dirname(cssfile)}/#{File.basename(cssfile, ".*")}.css"
> > -
> > -          File.open(path, "w") {|file| file.write(css) }
> > +
> > +      def generate_assets
> > +        Dir["#{Bonsai.root_dir}/public/**/*.{less,sass,scss,coffee}"].each do |file|
> > +          begin
>
> By moving the begin inside the block, we still generate an error but avoid
> skipping the rest of the files.
> Previously, the broken stylesheet in the test fixtures meant that not all
> assets got compiled (which ones depend on the order your filesystem returns
> globs in)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/benschwarz/bonsai/pull/35/files#r2900980>.
>
>