Rewriting our shopping list application with single-file components
Now that we already know so much about components and how to use them, and also know nice techniques to make our code easier to write, let's get back to our shopping list and rewrite it as single-file component's Vue application. To have an easy setup, we can use vue-cli
with Webpack configuration. Actually, we've already done it in Chapter 2, Fundamentals - Installing and Using. So, just find this application and be prepared to start working on it. If you cannot find it, you can easily create it:
#install vue-cli if you still hadn't installed it $ npm install vue-cli -g #bootstrap the application $ vue init webpack shopping-list $ cd shopping-list $ npm install $ npm run dev ...
Get Learning Vue.js 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.