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

Dealing with your Gulp addiction

Dealing with your Gulp addiction

We’ve all been there. New project, a chance to finally use those gulp modules you’ve been reading about, lets do it!. 3 Weeks later you’ve got a 700 line Gulpfile and it’s always breaking. You’re spending just as long maintaining the file as doing actual work, and you’re pretty sure that half of them aren’t actually running any more.

Having been there myself this is my guide for breaking out of the cycle.

Barney Scott

April 28, 2016
Tweet

Other Decks in Programming

Transcript

  1. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  2. GIVE YOURSELF RULES • Re-use your task runner between projects

    • One new module per project • Only add modules at the start of the project • Ask yourself if the project really needs this module.
  3. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  4. GIVE OTHERS RULES • Discuss what you’re doing • Write

    down the result • Version the notes
  5. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  6. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  7. SPLITTING UP TASKS • Group by logical action • Bake

    in quality (linters etc) • Makes it easier to Re-Use single parts • Reduces cognitive load Step 1
  8. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  9. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  10. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  11. THE PROBLEM We keep building complicated, difficult to manage, fragile

    task runners that change with each project. The only person that mostly understands it is the person who originally wrote it.
  12. ANYTHING ELSE? • Lint it - ESLint / JS Hint

    / JS Lint • run-sequence - Gulp 4 • Lazy load plugins
  13. WHERE ARE WE NOW • Simplified your tasks • Made

    them more robust • Talking about what you’re doing • Moving at a sensible rate of change • Treating it like code
  14. WHAT IS IT? • Very stripped down base project •

    Series of curated tasks split in to NPM modules • Command line tool to help
  15. WHY? • Speed of getting started • Easy upgrade path

    • Design in the browser • Focus on quality http://github.com/cartridge