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

Front-end tooling and DX for WordPress Developm...

Front-end tooling and DX for WordPress Development - WCAhmedabad 2018

Ahmedabad WordPress Meetup

December 01, 2018
Tweet

More Decks by Ahmedabad WordPress Meetup

Other Decks in Technology

Transcript

  1. MODERN FRONT- END TERRAIN front­end web === JS, CSS, HTML.

    new language features. development tooling. large scale web application.
  2. ES6 ECMAScript2015 ECMAScript === JavaScript released in 2015, 4 years

    after ES5 easier large-scale software development. exploringjs.com
  3. SASS CSS with superpowers super-set of CSS. sweet features to

    make CSS scale. battle tested and industry approved. sass­lang.com
  4. NPM PACKAGES install npm i lodash axios main.js import _

    from 'lodash'; import axios from 'axios'; const peopleWhoLoveWP = axios .get('/users') .then(users => _.filter(users, user => user.loveWP)); npmjs.com
  5. #3. WEBPACK static module bundler for modern JavaScript applications. modular

    JS/CSS code and imports. fonts, images and other les. can use babel and sass compiler.
  6. SETUP APP Write an entry-point javascript le. Tell webpack to

    use the entry-point. use different loaders. HMR with webpack-dev-server.
  7. so we have to con gure babel? webpack? node-sass? ipity

    op? uppity oop? and we have to do that everytime? how do we tell WP to use stuff from webpack? how do we have webpack-dev-server for HMR? LET US SEE
  8. wpack.io webpack and browser-sync based front-end tooling for WordPress (OSS

    - MIT Licensed) develop modern large-scale front-end heavy WordPress plugins and themes out of the box babel, sass and more. works with any local wp dev server. integrate with any project you have. dev server with live reload and HMR.
  9. INTEGRATE Install nodejs. Add - npx @wpackio/cli Bootstrap - npm

    run bootstrap PHP - composer require wpackio/enqueue Server - npm start Build - npm run build Pack - npm run archive
  10. RECAP front-end tooling provides awesome DX. is easier to setup

    today. is essential to create modern apps. can be integrated with WP development.