Upgrade to Pro — share decks privately, control downloads, hide ads and more …

faucet-pipeline @ Ruby on Ice

faucet-pipeline @ Ruby on Ice

A new asset pipeline that is framework agnostic

Lucas Dohmen

January 28, 2018
Tweet

More Decks by Lucas Dohmen

Other Decks in Programming

Transcript

  1. •Open Source •Written in Node.js •Built upon existing tooling (Rollup,

    Babel, node-sass, Autoprefixer, Browserslist, chokidar) •Web framework agnostic
  2. Pick & Choose • Bundle modern JavaScript modules into a

    single distribution file • Combine Sass modules into a single CSS file • Copy static files
  3. module.exports = { }; js: [{ source: "./index.js", target: "./public/app.js"

    }], sass: [{ source: "./index.scss", target: "./public/app.css" }],
  4. module.exports = { }; js: [{ source: "./index.js", target: "./public/app.js"

    }], sass: [{ source: "./index.scss", target: "./public/app.css" }], static: [{ source: "./images", target: "./public/images" }]
  5. .browserslistrc > 1% Last 2 versions IE 11 㱺 CSS

    will automatically be prefixed accordingly
  6. .browserslistrc > 1% Last 2 versions IE 11 㱺 CSS

    will automatically be prefixed accordingly 㱺 JS will automatically be transformed accordingly
  7. Cache Busting • Can fingerprint your files • Creates a

    mapping JSON file that can be read by your app to figure out the fingerprinted names • That’s what a tiny gem does for Rails