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

Tools and Workflow - London Ajax

Tools and Workflow - London Ajax

Learn about how in a responsive world we can look at using tools and adapting our workflow to become more producting

Jonathan Fielding

April 09, 2014

Transcript

80 slides
  1. @jonthanfielding #FrontendTooling What tools can I use to enhance my

    web development? Where do these tools fit in a development workflow?
  2. @jonthanfielding #FrontendTooling What do scaffolding tools do? • Setup a

    boilerplate • Install dependencies and sometimes - • configure build tools • setup source control
  3. @jonthanfielding #FrontendTooling What are abstractions? • Abstract away from the

    languages of the web • Aim to make development quicker, simpler • Compile to the browsers native language
  4. @jonthanfielding #FrontendTooling Examples of abstractions • CSS Preprocessors 
 e.g

    Sass, Stylus and Less • HTML Abstractions 
 e.g HAML, Markdown • Javascript Abstractions 
 e.g Typescript, CoffeeScript, Dart
  5. @jonthanfielding #FrontendTooling Sass Syntax @import “variables";! @import “mixins";! ! .class-name

    {! background: #000;! p {! @include font-size(14px);! color: $text-color;! ! span {! color: #eee;! }! }! } Import other Sass files Use mixin to generate CSS Nesting Use variable to define color
  6. @jonthanfielding #FrontendTooling Compiled CSS /* line 1, ../sass/screen.scss */! .class-name

    {! background: #000;! }! /* line 3, ../sass/screen.scss */! .class-name p {! font-size: 14px;! color: #fff;! }! /* line 6, ../sass/screen.scss */! .class-name p span {! color: #eee;! }!
  7. @jonthanfielding #FrontendTooling What is Less? An abstraction of CSS called

    a 
 CSS pre-processor which is written in JavaScript
  8. @jonthanfielding #FrontendTooling Less Syntax @import “variables.less”;! @import “mixin.less”! ! .class-name

    {! background: #000;! p {! ! ! .font14();! color: #fff;! ! span {! color: #eee;! }! }! } Import other Sass files Use mixin to generate CSS Nesting
  9. @jonthanfielding #FrontendTooling Compiled CSS .class-name {! background: #000;! }! !

    .class-name p {! font-size: 14px;! color: #fff;! }! ! .class-name p span {! color: #eee;! }!
  10. @jonthanfielding #FrontendTooling What is Markdown? A text formatting engine that

    can be compiled into other languages, commonly used to generate HTML
  11. @jonthanfielding #FrontendTooling Markdown Syntax #Main Heading! ! ##Secondary Heading! !

    Integer posuere erat a ante venenatis dapibus posuere velit aliquet.! ! Integer posuere erat a ante venenatis dapibus posuere velit aliquet.! ! ###Todo List! ! * Compile markdown Heading 1 Paragraphs Heading 2 Heading 3 List
  12. @jonthanfielding #FrontendTooling Compiled HTML <h1>Main Heading</h1> ! <h2>Secondary Heading</h2> <p>Integer

    posuere erat a ante venenatis dapibus posuere velit aliquet.</p> <p>Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p> ! <h3>Todo List</h3> <ul> <li>Compile markdown</li> </ul>
  13. @jonthanfielding #FrontendTooling What is Iteration? • Every time we save

    our code and view it in our browser we are creating an iteration of the site • We save, refresh our browser, go back to our editor
  14. @jonthanfielding #FrontendTooling What are iteration tools? • Tools that enable

    us to quickly iterate by automating steps we need to take after each save
  15. @jonthanfielding #FrontendTooling What is Grunt? Grunt is a task runner

    which enables us to automate tasks by defining tasks it should run
  16. @jonthanfielding #FrontendTooling What tasks can Grunt run? • Compilation of

    Abstractions • Unit Testing • Linting • Concatenation • Minification • and many more
  17. @jonthanfielding #FrontendTooling Create a Gruntfile.js module.exports = function(grunt) { //Grunt

    configuration goes here grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), ! }); };
  18. @jonthanfielding #FrontendTooling Setting up a task In the Gruntfile.js grunt.initConfig({!

    pkg: grunt.file.readJSON('package.json'),! compass: {! dev: {! options: {! sassDir: 'sass',! cssDir: 'css',! imagesDir: 'images',! environment: 'development',! httpGeneratedImagesPath: ' images'! }! }! }! });! Task Target
  19. @jonthanfielding #FrontendTooling Check out my new book • Learn how

    to make your sites responsive • Chapter on development tools and workflow • http://bitly.com/NXusZn • Discount code: 30HT14
  20. @jonthanfielding #FrontendTooling TalkTalk is hiring • Looking for 2-3 Senior

    Developers • Looking for 1-2 Mid-weight Developers • Grab me if your interested

More Decks by Jonathan Fielding

Other Decks in Technology