简体   繁体   English

在使用electronic-builder构建的电子应用程序中包含Bootstrap

[英]Including Bootstrap in an electron app built with electron-builder

How do I include Bootstrap in an Electron app built with electron-builder? 如何在用电子构建器构建的电子应用程序中包含Bootstrap? Ideally, I'd like to use the npm package so I my app/packages.json looks like this: 理想情况下,我想使用npm包,所以我的app / packages.json如下所示:

{
  ...
  "main": "main.js",
  "dependencies": {
    "bootstrap": "^3.3.7"
  }
}

but app/node_modules remains empty. 但是app / node_modules保持为空。 I have the same dependency and devDependecy in my top-level packages.json but that makes not difference either in what ends up being packaged. 我在顶层packages.json中具有相同的依赖项和devDependecy,但这在打包内容上没有区别。

Do I have to copy them manually? 我必须手动复制它们吗? Do I have to include it in a different way? 我是否必须以其他方式包含它?

Packed into asar archive by default. 默认情况下打包到asar存档中。 If you mean not packaged app, but your project dir — npm install is not called, it is your responsibility to install dependencies to project dir. 如果您的意思不是未打包的应用程序,而是您的项目目录-未调用npm install,则有责任将依赖项安装到项目目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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