1

我使用 yeoman angular-generator 开始了一个 web 项目,当我运行 grunt serve 时效果很好,但是在使用 grunt build 和 grunt serve:dist 之后,我的项目被破坏了。css 和图像没有显示,我的检查元素显示 $('.foo').masonry() 不是函数。我对 angular、yeoman 和 grunt 很陌生,我真的不知道为什么它在 grunt serve:dist 中被破坏,但在 grunt serve 中效果很好,任何帮助都将不胜感激。

这是我的 index.html,Gruntfile.js 自生成以来没有变化。

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">
    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    <!-- build:css(.) styles/vendor.css -->
    <!-- bower:css -->
    <link rel='stylesheet' href='bower_components/bootstrap/dist/css/bootstrap.css' />
    <!-- endbower -->
    <!-- endbuild -->
    <!-- build:css(.tmp) styles/main.css -->
    <link rel="stylesheet" href="styles/main.css">

    <script src="./scripts/libs/jquery-2.1.4.min.js"></script>
    <script src="./scripts/libs/greensock/src/minified/TweenMax.min.js"></script>
    <!-- endbuild -->
  </head>
  <body ng-app="yeoboyApp">

    <div id="view-port" class="container-fluid">
      <div ng-view="" autoscroll="true"></div>
    </div>

    <!-- build:js(.) scripts/vendor.js -->
    <!-- bower:js -->
    <script src="bower_components/jquery/dist/jquery.js"></script>
    <script src="bower_components/angular/angular.js"></script>
    <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
    <script src="bower_components/angular-animate/angular-animate.js"></script>
    <script src="bower_components/angular-cookies/angular-cookies.js"></script>
    <script src="bower_components/angular-resource/angular-resource.js"></script>
    <script src="bower_components/angular-route/angular-route.js"></script>
    <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
    <script src="bower_components/angular-touch/angular-touch.js"></script>
    <script src="bower_components/skrollr/src/skrollr.js"></script>
    <script src="bower_components/angular-skrollr/dist/angular-skrollr.js"></script>
    <!-- endbower -->
        <script src="./scripts/libs/skrollr.min.js"></script>
        <script src="./scripts/libs/masonry.pkgd.min.js"></script>
    <!-- endbuild -->
        <!-- build:js({.tmp,app}) scripts/scripts.js -->
        <script src="scripts/app.js"></script>
        <script src="scripts/controllers/main.js"></script>
        <script src="scripts/controllers/project.js"></script>
        <script src="scripts/controllers/exposurements.js"></script>
        <script src="scripts/controllers/google.js"></script>
        <script src="scripts/controllers/htc.js"></script>
        <script src="scripts/controllers/portbound.js"></script>
        <script src="scripts/controllers/massive.js"></script>
        <script src="scripts/controllers/churn.js"></script>
        <script src="scripts/controllers/tessalate.js"></script>
        <script src="scripts/controllers/tempsense.js"></script>
        <script src="scripts/controllers/website.js"></script>
        <!-- endbuild -->
</body>
</html>

我还应该提供其他信息吗?

4

0 回答 0