A
A
acspro2017-02-19 14:19:46
phpstorm
acspro, 2017-02-19 14:19:46

How to correctly connect bootstrap 4 version to Laravel using phpStorm?

Hello Guru. Tell me how to correctly connect bootstrap 4 using phpStrom and Laravel. The first time I did this - I added a dependency on bootstrap 4 using composer and then in the resources\assets\sass\ folder in the app.scss file I connected from the vendor twlb/bootstrap boostrap.scss and set the file watch to the esources\assets\sass\ folder in public / css .. But then I have to copy everything manually later to public (js scripts) I understand that there is such an Elixir tool based on gulp. I installed node js globally and then did npm install --global gulp-cli. Then I executed npm -install -no-bin-links in the local directory - the node_modules folder appeared. Then it is written that the gulpfile.js file should be at the root, but it is not there. Well, I manually created and wrote a couple of lines from the official laravel documentation - specifically

elixir(function(mix) {
    mix.sass('app.scss');
});

Then I tried to type gulp but he cursed and I realized that I did not understand at all what I was doing and how. I want both jquery and other scripts to be loaded automatically with the latest versions, sсss is compiled into the desired folder in public. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Ernest Faizullin, 2017-02-19
@erniesto77

how did gulp "swear"? The text of the error in the studio. may need to be added to gulpfile

const elixir = require('laravel-elixir');

elixir(function(mix) {
    mix.sass('app.scss');
});

A
acspro, 2017-02-19
@acspro

Earned. For some reason I did not see the elixir. Installed with npm install laravel-elixir

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question