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

JavaScript Development Tools

JavaScript Development Tools

A short journey
VR Leasing – 2016-06-29

Avatar for Florian Hirsch

Florian Hirsch

June 29, 2016

More Decks by Florian Hirsch

Other Decks in Programming

Transcript

  1. Non-blocking I/O Thread-based networking is relatively inefficient and very difficult

    to use Blocking methods execute synchronously and non- blocking methods execute asynchronously var fs = require('fs'); // blocking var data = fs.readFileSync('./data.txt'); // non-blocking fs.readFile('./data.txt', function(err, data) { // callback will be executed when data is read }); 7
  2. 11

  3. “Use npm to install, share, and distribute code; manage dependencies

    in your projects; and share & receive feedback with others.” 15
  4. Hands on npm init # setup configuration package.json npm install

    # execute configuration npm search lodash npm install lodash --save --save-exact # add a dependency with exact version npm install gulp --save-dev # add a development dependency (local) 16
  5. Semver 1.2.3 [MAJOR.MINOR.PATCH] MAJOR version when you make incompatible API

    changes MINOR version when you add functionality in a backwards-compatible manner PATCH version when you make backwards-compatible bug fixes. (not to be confused with ) sentimentalversioning.org 18
  6. Tilde vs Caret ... and don't forget the major zero!

    pro tipp: ~1.2.3 – patch level (1.2.3 ... < 1.3.0) ^1.2.3 – minor level (1.2.3 ... < 2.0.0) * – latest version npm shrinkwrap 19
  7. $ sudo apt-get install -y nodejs & npm install bower

    & bower install jquery You are now ready to fade a div out. 09:12 - 9 Apr 2015 1.195 921 I Am Devloper @iamdevloper Folgen 21
  8. Hello PhantomJS var page = require('webpage').create(); page.open('https://www.vr-leasing-gruppe.de/', function(status) { console.log('Page

    loaded with status: ' + status); if (status === "success") { page.render('vrleasing.png'); } phantom.exit(); }); 29
  9. PostCSS .box { box-sizing: border-box; } gulp.task('styles', function() { return

    gulp.src('app/styles/main.scss') .pipe(autoprefixer({browsers: ['last 3 versions']})) .pipe(gulp.dest('dist/styles')); }); .box { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } 36