   (selectors) ->
     eventStream.map (file, callback) ->
       $ = cheerio.load file.contents.toString()
-      tagsToGo = 0
       for selector, manipulation of selectors
-        $(selector).each (tag) ->
-          tagsToGo += 1
-          manipulation $(this), (error) ->
-            tagsToGo -= 1
-            if tagsToGo is 0
-              file.contents = new Buffer $.html()
-              callback null, file
+        tags = $(selector)
+        if tags.length is 0
+          callback null, file
+        else
+          tagsToGo = tags.length
+          tags.each ->
+            manipulation $(this), ->
+              tagsToGo -= 1
+              if tagsToGo is 0
+                file.contents = new Buffer $.html()
+                callback null, file
+
+compileInlineTags = ->
+  CoffeeScript = require 'coffee-script'
+  stylus = require 'stylus'
+  nib = require 'nib'
+
+  manipulateTags
+    'script[type="text/coffeescript"]': (tag, callback) ->
+      tag.attr 'type', null
+      tag.html try
+        CoffeeScript.compile tag.html()
+      catch e
+        e.toString()
+      callback null
+
+    'style[type="text/stylus"]': (tag, callback) ->
+      tag.attr 'type', null
+      stylus tag.html()
+        .use nib()
+        .import 'nib'
+        .render (error, content) ->
+          tag.html content
+          callback error
 
 gulp.task 'html', ->
   ect = require 'gulp-ect'
-  cheerio = require 'cheerio'
-  CoffeeScript = require 'coffee-script'
-  stylus = require 'stylus'
-  nib = require 'nib'
   htmlFileToDirectory = require 'gulp-html-file-to-directory'
   merge = require 'lodash.merge'
 


  gulp.src files.js
    .pipe cache 'js', optimizeMemory: true
    .pipe transform ext: 'js', squelch: true, (file, callback) ->
      b = browserify file.path, extensions: ['.coffee']
      b.transform coffeeify
      b.bundle callback

    eventStream.map (file, callback) ->
      fileExt = path.extname file.path
      if fileExt is options?.from or not options?.from?
        transformation file, (error, result) ->
          # TODO: Gulp has a nice util for logging.
          console.log error.toString() if error?

          if options?.to?
            file.path = file.path.slice(0, file.path.lastIndexOf fileExt) + options.to

          file.contents = new Buffer error?.toString() ? result

          callback error, file

      else
        # Extension didn't match, so skip it.
        callback null, file

# TODO: Here's another module.
manipulateTags = do ->
  eventStream = require 'event-stream'
  cheerio = require 'cheerio'
