早午餐构建不会创建目录和文件

时间:2015-05-06 03:34:23

标签: hapijs brunch

我正在用早午餐作为资产管理工具构建一个小型的hapijs应用程序。

运行早午餐构建不会生成任何已编译的文件。 我的项目结构与结构样本类似 https://github.com/brunch/brunch/tree/stable/docs

brunch-config.coffee:

    exports.config =

        server:
            path: 'index.js'
            port: 8000
        paths:
            public: 'public'
        conventions:
            ignored: 'app/templates'
        files:
            javascripts:
                joinTo:
                    'js/app.js': /^app/
                    'js/vendor.js': /^vendor/

            stylesheets:
                defaultExtension: 'css'
                joinTo:'css/app.css': /^app/


$ brunch build -d 产生:

      brunch:watch Loaded plugins:  +0ms
      brunch:watch File 'app' received event 'addDir' +9ms
      brunch:watch File 'vendor' received event 'addDir' +20ms
      brunch:watch File 'package.json' received event 'add' +4ms
      brunch:watch File 'brunch-config.coffee' received event 'add' +0ms
      brunch:watch File 'app/assets' received event 'addDir' +5ms
      brunch:watch File 'app/templates' received event 'addDir' +1ms
      brunch:file-list Reading 'app/style.css' +2ms
      brunch:watch File 'app/style.css' received event 'add' +2ms
      brunch:watch File 'vendor/css' received event 'addDir' +0ms
      brunch:watch File 'vendor/scripts' received event 'addDir' +1ms
      brunch:watch File 'app/assets/images' received event 'addDir' +4ms
      brunch:file-list Reading 'app/templates/index.html' +1ms
      brunch:watch File 'app/templates/index.html' received event 'add' +0ms
      brunch:file-list Reading 'vendor/css/normalize.css' +0ms
      brunch:watch File 'vendor/css/normalize.css' received event 'add' +0ms
      brunch:file-list Reading 'vendor/css/skeleton.css' +0ms
      brunch:watch File 'vendor/css/skeleton.css' received event 'add' +0ms
'add' +1ms
      brunch:file-list Reading 'vendor/scripts/jquery-1.11.2.min.js' +0ms
      brunch:watch File 'vendor/scripts/jquery-1.11.2.min.js' received event 'add' +0ms

我错过了什么吗? 谢谢你的帮助

1 个答案:

答案 0 :(得分:2)

显然我必须首先安装强制性插件,例如javascript-brunch和css-brunch(或任何[style-language] -brunch插件,具体取决于你的风格语言)。
这件事很微妙,并没有在早午餐文档中明确描述。不得不重读并重读早午餐指南https://github.com/brunch/brunch-guide/blob/master/content/en/chapter04-starting-from-scratch.md以获得'aha'时刻。