angular.js - After yeoman creates the framework, how to run the dist directory
phpcn_u1582
phpcn_u1582 2017-05-15 16:58:39
0
2
706

dist is generated, my question is:

1.
The things in the dist directory are different from the things in the app.
It should be the dist directory when it is published online. But as soon as I started the service, I jumped directly to the app directory and ran index.html,
instead of running the files in the dist directory as I imagined.

2.
I looked at the html file. The css and js inside are compressed, but I didn’t find any third-party plug-ins, such as bootstrap,
angular, etc. I don’t have js, so I don’t know what’s going on. . . Find the solution! ! !

phpcn_u1582
phpcn_u1582

reply all(2)
PHPzhong
  1. For development, you can use the following command to run the contents of dist:

    grunt serve:dist

  2. By default, all third-party js will be merged into verdor.xxxx.js, and your own js will be merged into script.xxxx.js
    The corresponding third-party css will be merged into verdor.xxxx.css, and your own css will be Merge into main.xxxx.css

伊谢尔伦

1. Carefully read the Generator you use yeoman. Generally speaking, it will provide detailed instructions on how to run the development environment or production environment.
2. Read README.md
3. Open package.json. There are instructions for npm related operations in the 'scripts' object.
4. Open Gruntfile.js, which contains various instructions such as entry files and export files.

In addition, grunt does the compression for you.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template