从凉亭中删除了依赖关系

时间:2014-02-17 15:07:33

标签: javascript json angularjs

我正在为我的网络应用程序使用AngularJS,以及用于设置我的环境的自耕农。我想将此markdown-directive添加到我的依赖项中。我安装了所有东西,仍然:在bower.json文件中缺少该条目。

所以我在

中添加了我文件的路径
  1. bower.json(只是条目)

  2. karma.conf.js(路径)

  3. 我还在index.html文件中添加了路径。当我运行grunt服务时,index.html文件中的路径被删除,我收到此错误消息:

    showdown was not injected in your file.
    Please go take a look in "app/bower_components/showdown" for the file you need, then manually include it in your file.
    
      

    我能做什么,以便链接保留在我的index.html文件中?

    我知道,我可以在服务器启动后添加它,但每次重新启动grunt时,脚本标记都会被删除。

2 个答案:

答案 0 :(得分:2)

好的,我继续尝试解决这个问题。我发现了什么:

  

Bower需要插件根文件夹中的* .js文件。 showdown.js文件位于“压缩”文件夹中。

对未来“文件未注入”问题可能很有趣。

答案 1 :(得分:0)

我有同样的问题并解决了它,但在项目bower.json文件中包含一个覆盖,告诉它用于showdown的文件

"overrides": {
        "showdown": {
            "main": [
                "src/showdown.js"
            ]
        }
    }