【问题标题】:Cordova: How to include .js .css files from node_modules after npm installCordova:如何在 npm 安装后从 node_modules 包含 .js .css 文件
【发布时间】:2016-10-02 05:14:38
【问题描述】:

如何让我的应用在安装 npm 后读取 .js 和 .css 文件?

我所做的是:

npm install bootstrap@3

之后,引导文件夹进入我的 node_modules 文件夹。 /node_modules/bootstrap 我使用 grunt 编译 css 和 js 文件:

grunt dist

它会在 /node_modules/bootstrap/ 中创建一个 dist 文件夹。

我现在所做的是将 dist 文件夹从“/node_modules/bootstrap/”移动到我的公共文件夹“/www”中,这样​​我就可以将它包含在位于我的公共文件夹“/www/index.html”中的页面中

但不知何故,这感觉不对,我不确定我是否走对了路。

四处寻找一些资源,但无法获得太多信息。任何人都可以提供解决方案或将我引导到一些正确的资源,以便我可以了解更多信息。谢谢。

【问题讨论】:

    标签: javascript css node.js twitter-bootstrap cordova


    【解决方案1】:

    我认为您实际上做得很好,因为引导程序仅基于那些 .css 和 .js 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-24
      • 1970-01-01
      • 2016-11-23
      • 2017-12-12
      • 2019-03-17
      • 2011-11-07
      • 2016-03-14
      相关资源
      最近更新 更多