     .pipe filter('!**/main.ls')
     .pipe lsc({bare:true}) .on 'error', gutil.log
     .pipe cond isRelease, uglify()
-    .pipe gulp.dest (path.join outputdir, 'lib')
+    .pipe gulp.dest (out 'lib')
 
 gulp.task 'browserify', ['script'], ->
   gulp.src SOURCES



isRelease = gutil.env.release?
outputdir = gutil.env.outputdir || 'app'

# sources
SOURCES  = ['src/*.ls']

HTMLS    = ['html/*.html']
IMAGES   = ['img/*.jpg', 'img/*.png', 'img/*.gif']

# outdir
out = (dir) ->
    ret = gutil.env.outputdir || 'app'
    return ret unless dir
    path.join ret, dir


# compile
