简体   繁体   中英

Aurelia au run --watch... not watching

I downloaded an Aurelia project for testing purpose. After restoring the packages ( npm install ) and running the application ( au run --watch ). Now I see Start watching... I was curious about doing some changes (for example in contact-list.html) and seeing the website adjusting after pressing F5 (because of watching). It does not work. My changes are not reflecting in the running website. In the shell prompt where it is watching, nothing happened.

You can test by yourself with the project zipped below.

Zip of the Aurelia project

If I create a new Aurelia project from scratch ( au new ) and following the wizard, the watching works pretty well.

I don't know why it does not work in the project I downloaded (code provided by a Book for learning Aurelia).

What book is this?

Part of the problem is that the version of the CLI you are using is 2 years old. I would recommend getting the latest version of the CLI, creating a new project that uses RequireJS

  1. au new
  2. give new project a name
  3. choose custom (3)
  4. choose RequireJS (2)
  5. choose Babel (1)
  6. choose defaults for the rest
  7. copy the src folder from your zip file over to it the newly created project
  8. You'll need to run npm install bootstrap@3.3.6 --save or yarn add bootstrap@3.3.6 to pull down bootstrap.
  9. Copy the link to bootstrap's css from your zip file's index.html to the new project
  10. Delete the Promise.config line in src/main.js .
  11. Then just run au run ( --watch is no longer needed). It should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM