Skip to content
Browse files

Adds YamlCompiler

  • Loading branch information...
1 parent f84ab8e commit 09464d40286925b73d1c9376dc7e33a97355749b @dsc committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 compiler.co
View
10 compiler.co
@@ -622,6 +622,15 @@ class exports.JisonCompiler extends Compiler
parser.generate()
+class exports.YamlCompiler extends Compiler
+ id : 'yaml'
+ match : /\.json$/i
+ ext : '.yaml'
+ module : 'js-yaml'
+ compileSync : (data) ->
+ JSON.stringify @module.loadAll data
+ -> super ...
+
@@ -637,6 +646,7 @@ class exports.JisonCompiler extends Compiler
SassCompiler
JisonCompiler
SassRubyCompiler
+ YamlCompiler
].map register

0 comments on commit 09464d4

Please sign in to comment.
Something went wrong with that request. Please try again.