我想在早午餐中使用鬍子模板。這是我的config.coffee文件:如何讓鬍子模板在早午餐中工作
{languages, plugins} = require 'brunch-extensions'
# Make config loadable via require() for brunch.
exports.config =
# Available plugins:
# * AssetsPlugin: copy `app/assets` contents to `build/`
plugins: [plugins.AssetsPlugin]
# Contains a list of output filenames that your application would generate.
# Format:
#
# 'filename':
# languages:
# 'regExp, with which input files will be matched': language class
# order:
# before: [files, that would be loaded before anything else]
# after: [files, that would be loaded after anything else]
#
files:
'scripts/app.js':
languages:
'\.js$': languages.JavaScriptLanguage
'\.coffee$': languages.CoffeeScriptLanguage
'\.eco$': languages.EcoLanguage
'\.mustache$': languages.HoganLanguage
order:
before: [
'vendor/scripts/console-helper.js'
'vendor/scripts/jquery-1.7.js'
'vendor/scripts/underscore-1.1.7.js'
'vendor/scripts/backbone-0.5.3.js'
]
'styles/app.css':
languages:
'\.css$': languages.CSSLanguage
'\.styl$': languages.StylusLanguage
order:
before: ['vendor/styles/normalize.css']
after: ['vendor/styles/helpers.css']
但開始brunch watch
,當我得到了以下錯誤:
[17:27:45]: [Brunch]: cannot parse config entry
config.files['scripts/app.js'].languages['.mustache$']: TypeError: undefined is not a function.
您能否解決這個問題 – jsf 2012-02-27 02:26:58
不是。看起來他們放棄了鬍鬚支持,因爲我在語言文件夾中找不到任何參考。 – 2012-02-27 07:39:27