【问题标题】:Brunch add animate.css早午餐添加 animate.css
【发布时间】:2018-05-07 05:32:28
【问题描述】:

我是早午餐新手,只想将 animate.css 添加到一页。 我已经通过 npm 安装了 animate.css 并将其添加到 package.json。 我的早午餐配置如下所示:

module.exports = {
  npm: {
  globals: {
    $: 'jquery'
  },
  styles: {
    animate: ['css/animate.css']
  }
},

  files: {
  javascripts: {
    joinTo: {
      'libraries.js': /^(?!app\/)/,
      'app.js': /^app\//
    }
  },
    stylesheets: {joinTo: 'app.css'}
  }
}

不知道如何将 animate.css 包含到我的页面中。 有什么建议吗?

谢谢

【问题讨论】:

    标签: npm animate.css brunch


    【解决方案1】:

    早午餐没有观看 CSS 文件。对于一个简单的解决方案,只需将路径手动添加到样式表中,如下所示:

    stylesheets: {
        joinTo: { 'app.css': [
            'path/to/animatie.css',   // include specific file
            /\.css$/                    // all files with .css extension
        ] }
    }
    

    阅读文档中有关模式匹配的更多信息:http://brunch.io/docs/config.html#pattern-matching

    【讨论】:

      猜你喜欢
      • 2018-08-27
      • 2018-07-17
      • 2016-12-14
      • 2016-01-19
      • 1970-01-01
      • 2019-01-04
      • 1970-01-01
      • 2015-09-03
      • 1970-01-01
      相关资源
      最近更新 更多