tasks/joosy.coffee in joosy-1.2.0.alpha.41 vs tasks/joosy.coffee in joosy-1.2.0.alpha.51
- old
+ new
@@ -37,40 +37,37 @@
}
assets:
instance: (environment='development') ->
Mincer.logger.use console
- Mincer.StylusEngine.registerConfigurator (stylus) ->
+ Mincer.CoffeeEngine.configure bare: false
+ Mincer.StylusEngine.configure (stylus) ->
stylus.options.paths.push Path.join(process.cwd(), paths.public)
stylus.define '$environment', environment
stylus.define '$config', grunt.config.get('joosy.config') || {}
stylus.use require('nib')()
assets = new Mincer.Environment(process.cwd())
assets.appendPath paths.javascript
assets.appendPath paths.stylesheets
assets.appendPath 'vendor'
assets.appendPath 'bower_components'
- assets.appendPath 'node_modules/joosy/src'
+ assets.appendPath 'node_modules/joosy/source'
assets
compile: (environment, map, callbacks) ->
assets = grunt.joosy.assets.instance(environment)
deepness = 0
for entry in map
do (entry) ->
- deepness++
asset = assets.findAsset entry.src
callbacks.error? "Cannot find #{entry.src}" unless asset
+ grunt.file.write entry.dest, asset.toString()
+ callbacks.compiled? asset, entry.dest
- asset.compile (err) ->
- deepness--
- callbacks.error? asset, err if err
- grunt.file.write entry.dest, asset.toString()
- callbacks.compiled? asset, entry.dest
- callbacks.success?() if deepness == 0
+ callbacks.success?()
haml:
compile: (file, partials=paths.haml, environment='development', locals={}) ->
HAMLC = require 'haml-coffee'
\ No newline at end of file