简体   繁体   中英

Brunch add animate.css

I am new to brunch and just want to add animate.css to one page. I already installed animate.css via npm and added it to package.json. My brunch-config looks like this:

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

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

No idea how to include animate.css to my page. Any suggestions?

THX

The CSS file is not watched by brunch. For a simple solution, just add the path manually to you stylesheets like this:

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

Read more about the pattern matching in the docs: http://brunch.io/docs/config.html#pattern-matching

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM