Giter Club home page Giter Club logo

vuejsinactioncode's Introduction

Vue.js in Action

Complete files for the Vue.js in Action book!

Grab the book at https://www.manning.com/books/vue-js-in-action

Feel free to submit a PR if you find any problem with any of the code examples in the book!

FAQ

Can I run any code in any of the chapters?

No, the code you see in each folder may or may not be runnable. In the book I have snippets of code. You must combine the snippets of code into a runnable app. However, I have included the completed apps in each folder as well.

Do I need Vue CLI?

Yes and no. At the start of the book all the examples are single HTML pages that link out to the Vue.js CDN. In later chapters I converted over my Pet Store app to a Vue CLI app.

How do I run the Pet Store App

To run the pet store app change directories into the pet store directory and run npm install. Then run 'npm run dev'. Beware, you may need to change the port if it's already being used. This is found in the config/index.js.

What port does the pet store app run

I changed the configuration so the port is on 8081.

Help I found a bug!

Submit a PR and I'll look at it. After the book is released I may or may not accept pull requests. As of now I will accept them. (note: I'm really behind on PRs so I apologize if it takes a few weeks or longer for me to get to them)

vuejsinactioncode's People

Contributors

askras avatar erikch avatar golubvladimir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vuejsinactioncode's Issues

Incomplete CSS file in Chapter 2

I can't believe no one has commented on this! The app.css file for Chapters 2- 7 lacks rules for row, col, col-expand and price. It would be nice not to have to reinvent them.

Missing body tag

Hi,

Seems that on file index.html in folder chapter-02 is missing the opening of body tag.

shake animation not working

was unable to create the shake animation on the 'inventory-message' class span in chapter 8 without adding display=inline-block css.

Chapter 4: mustache error

I found a little error in Chapter 4, adding-buttons.html on line 32. Method value has one mustache. Moreover, book has one mustache too in that place.

The template compiler is not available

Hello, Erik!
I have a problem in chapter7. I've completed all the changes, but when I run a server with "npm run serve" (I use vue-cli 3) I get a warning:
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

(found in )

So I have no output data because of that and I have no idea how to fix it. I hope you can make it clearer for me.
VueWarning

Link in book comes to xxx site

How you can see, book in russian format divided publisher site link with "-" symbol and make link to xxx site.
Maybe it's not horrible problem, bad it's a really bad for book reputation if someone don't understand why link is broken. I'm just want you to know this problem.
Hope i helped


issue

special characters on chapter02 code samples and utf8

Hello!
I was reading through chapter 2 and noticed the ending curly quotes are different in these lines and can give some issues.

https://github.com/ErikCH/VuejsInActionCode/blob/master/chapter-02/product-markup-cont.html#L10

https://github.com/ErikCH/VuejsInActionCode/blob/master/chapter-02/v-text-binding.html#L10

Also on https://github.com/ErikCH/VuejsInActionCode/blob/master/chapter-02/index.html the meta tag <meta charset="UTF-8"> might be needed to render special characters like $

These are small typos but I can submit a PR if you want.

Chapter 11 - itunes-search erroring

I am having below error in browser even though I installed all dependencies and created files in order in vuetify/ i-tunes project:
Error
Module build failed (from ./node_modules/stylus-loader/index.js): Error: C:\Users\deniz\Documents\vuejs in action\itunes-search\assets\app.styl:3:10 1| 2| // Import Vuetify styling 3| @require '~vuetify/src/stylus/main' ---------------^ failed to locate @require file ~vuetify/src/stylus/main.styl at CachedPathEvaluator.visitImport (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus-loader\lib\evaluator.js:157:21) at CachedPathEvaluator.Visitor.visit (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\visitor\index.js:28:40) at CachedPathEvaluator.Evaluator.visit (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\visitor\evaluator.js:160:18) at CachedPathEvaluator.Evaluator.visitRoot (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\visitor\evaluator.js:707:27) at CachedPathEvaluator.Visitor.visit (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\visitor\index.js:28:40) at CachedPathEvaluator.Evaluator.visit (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\visitor\evaluator.js:160:18) at CachedPathEvaluator.Evaluator.evaluate (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\visitor\evaluator.js:247:15) at Renderer.render (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus\lib\renderer.js:86:26) at C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\stylus-loader\index.js:167:12 at tryCatchReject (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\when\lib\makePromise.js:840:30) at runContinuation1 (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\when\lib\makePromise.js:799:4) at Fulfilled.when (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\when\lib\makePromise.js:590:4) at Pending.run (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\when\lib\makePromise.js:481:13) at Scheduler._drain (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\when\lib\Scheduler.js:62:19) at Scheduler.drain (C:\Users\deniz\Documents\vuejs in action\itunes-search\node_modules\when\lib\Scheduler.js:27:9) at processTicksAndRejections (internal/process/task_queues.js:79:11)

Vue 2 Reference

Given that Vue has been at version 3 for a while now, it would be nice to have line 4 of the code changed to

    <script src="https://unpkg.com/[email protected]"></script>

As it is, the simple reference to unpkg.com/vue brings in Vue 3, which doesn't work. Newbies like me take a while to figure out why the code isn't working.

/chapter-09/jsx-example/package.json may missing js-yaml dependency

Software version and OS info:

OS: windows 10
node: 8.0.0
npm: 5.0.0
vue-cli: 2.9.2

Error output:

 error  in ./src/components/HelloWorld.vue

Module build failed: Error: Cannot find module 'js-yaml'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\evan\Downloads\VuejsInActionCode-master\VuejsInActionCode-master\chapter-09\jsx-example\node_modules\vue-loader\node_modules\cosmi
config\lib\loadRc.js:3:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\evan\Downloads\VuejsInActionCode-master\VuejsInActionCode-master\chapter-09\jsx-example\node_modules\vue-loader\node_modules\cosmi
config\lib\createExplorer.js:6:14)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)

Solution:

npm i --save-dev js-yaml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.