How to enable twitter bootstrap in an electronic application?

This is my first electronic application based on the quick launch of the application. I want to add twitter bootstrap css. So I installed it as follows:

npm install bootstrap

And is included in index.html as follows:

<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">

When I run: npm startfrom the terminal, it works fine. However, when I try to build it using an electronic packaging device, for example:

npm run build

I get my own mac app "myApp.app", but when I open it, I don't see the styles.

The only files in the application besides node_modulesand package.jsonare: main.jsand index.html, and both of them are in the root directory.

Is there a step here that I am missing?

Edit

, css Resouces/app. css, ? , bootstrap npm?

+4
1

project.json : bootstrap, ? , , , --save:

npm install bootstrap --save

. fs-jetpack. fs-jetpack project.json OSX electron-packager. script "fs-jetpack". , "package.json", , . , ? "--prune = true" . , ?

, , :

<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">

, , , index.html ?

enter image description here

+5

Source: https://habr.com/ru/post/1672140/


All Articles