Permalink
Browse files

Handle .coffee extensions by default

  • Loading branch information...
1 parent c9cb8e2 commit c53104838ccbd41d6e66c3feaac7a8df45a4aa6d @jnordberg committed Nov 28, 2013
Showing with 5 additions and 3 deletions.
  1. +2 −2 package.json
  2. +3 −1 plugin.coffee
View
@@ -1,6 +1,6 @@
{
"name": "wintersmith-browserify",
- "version": "0.2.3",
+ "version": "0.2.4",
"author": "Johan Nordberg <code@johan-nordberg.com>",
"description": "Browserify plugin for Wintersmith",
"license": "MIT",
@@ -12,7 +12,7 @@
"dependencies": {
"browserify": "2.x",
"coffee-script": ">= 1.4.0",
- "caching-coffeeify": "~0.2.0"
+ "caching-coffeeify": "~0.3.0"
},
"homepage": "https://github.com/jnordberg/wintersmith-browserify",
"repository": "git://github.com/jnordberg/wintersmith-browserify.git"
View
@@ -7,14 +7,16 @@ module.exports = (env, callback) ->
options.debug ?= (env.mode is 'preview')
options.externals ?= {}
options.ignore ?= []
+ options.extensions ?= ['.coffee']
for transform, i in options.transforms
options.transforms[i] = require transform
class BrowserifyPlugin extends env.ContentPlugin
constructor: (@filepath) ->
- @bundler = browserify()
+ @bundler = browserify
+ extensions: options.extensions
@bundler.add @filepath.full
externals = options.externals[@filepath.relative] or []
@bundler.external file for file in externals

0 comments on commit c531048

Please sign in to comment.