This is Devhints.io cheatsheets — a collection of cheatsheets I've written.

# Brunch

## Paths

    /
      app/
        assets/
      vendor/
      public/
      config.coffee

## Config

    module.exports = {
      files: {
        javascripts: {  # or 'stylesheets' or 'templates'
          order: {
            before: [ 'normalize.css' ],
            after:  [ 'helpers.css' ],

          joinTo: 'app.js',
          joinTo: {
            'js/app.js':    /^app/,
            'js/vendor.js': /^vendor/
          },
          pluginHelpers: 'js/vendor.js'
        }
      }

      paths: {
        public: 'public',                      # where to compile
        watched: ['app','test','vendor'],      # what to monitor
     }

      modules: {
        wrapper: 'amd',
        definition: 'amd',
        nameCleaner: (path) => path.replace(/^app\//, '')
      }

      npm: { styles, globals }

      plugins: {
        sass: { ... }
      }

      // brunch w --apply testing
      // BRUNCH_ENV=testing brunch build
      overrides: {
        production: {
          optimize: true,
          sourceMaps: false,
          plugins: { autoReload: { enabled: false } }
        }
      }

      onCompile: (files, assets) => { ... }

## Plugins

    plugins:
      uglify:
        mangle: true
        compress:
          global_defs:
            DEBUG: false

## Extensions

Compile to CSS

- stylus-brunch
- less-brunch
- sass-brunch

Compile to HTML

- static-jade-brunch

Embedded templates

- emblem-brunch

Etc

- uglify-js-brunch
- jshint-brunch
- imageoptimizer-brunch

## References

- https://github.com/brunch/brunch/blob/master/docs/config.md

Devhints.io cheatsheets is a collection of cheatsheets I've written over the years. Suggestions and corrections? Send them in. I'm Rico Sta. Cruz. Check out my Today I learned blog for more.